mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-28 00:06:55 +00:00
HV: prototyping non-static function
Includes header file of non-static function, and declare the in-file use function static. Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
8925eb5647
commit
90b342bd53
@ -3,6 +3,7 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
#include <hypervisor.h>
|
||||
#include <reboot.h>
|
||||
|
||||
int warm_reboot(void)
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ static uint64_t find_next_table(uint32_t table_offset, void *table_base)
|
||||
return sub_table_addr;
|
||||
}
|
||||
|
||||
void free_ept_mem(void *pml4_addr)
|
||||
static void free_ept_mem(void *pml4_addr)
|
||||
{
|
||||
void *pdpt_addr;
|
||||
void *pde_addr;
|
||||
|
@ -189,7 +189,8 @@ static void pm1ab_io_write(__unused struct vm_io_handler *hdlr,
|
||||
io_write(v, addr, width);
|
||||
}
|
||||
|
||||
void register_gas_io_handler(struct vm *vm, struct acpi_generic_address *gas)
|
||||
static void
|
||||
register_gas_io_handler(struct vm *vm, struct acpi_generic_address *gas)
|
||||
{
|
||||
uint8_t io_len[5] = {0, 1, 2, 4, 8};
|
||||
struct vm_io_range gas_io;
|
||||
|
@ -62,7 +62,7 @@ static inline const char *pinstate_str(bool asserted)
|
||||
return (asserted) ? "asserted" : "deasserted";
|
||||
}
|
||||
|
||||
struct vioapic *
|
||||
static struct vioapic *
|
||||
vm_ioapic(struct vm *vm)
|
||||
{
|
||||
return (struct vioapic *)vm->arch_vm.virt_ioapic;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "instr_emul.h"
|
||||
|
||||
#include "vlapic_priv.h"
|
||||
#include "vlapic.h"
|
||||
|
||||
#define VLAPIC_VERBOS 0
|
||||
#define PRIO(x) ((x) >> 4)
|
||||
@ -1709,7 +1710,7 @@ vlapic_enabled(struct vlapic *vlapic)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
vlapic_set_tmr(struct vlapic *vlapic, uint32_t vector, bool level)
|
||||
{
|
||||
struct lapic_regs *lapic;
|
||||
@ -1739,7 +1740,7 @@ vlapic_apicv_batch_set_tmr(struct vlapic *vlapic)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
vlapic_apicv_set_tmr(struct vlapic *vlapic, uint32_t vector, bool level)
|
||||
{
|
||||
if (vlapic->ops.apicv_set_tmr != NULL) {
|
||||
|
@ -51,7 +51,7 @@ static void enable_msr_interception(uint8_t *bitmap, uint32_t msr)
|
||||
}
|
||||
|
||||
/* not used now just leave it for some cases it may be used as API*/
|
||||
void disable_msr_interception(uint8_t *bitmap, uint32_t msr)
|
||||
static void disable_msr_interception(uint8_t *bitmap, uint32_t msr)
|
||||
{
|
||||
uint8_t *read_map;
|
||||
uint8_t *write_map;
|
||||
|
@ -929,7 +929,7 @@ static void vpic_elc_io_write(__unused struct vm_io_handler *hdlr,
|
||||
}
|
||||
}
|
||||
|
||||
void vpic_register_io_handler(struct vm *vm)
|
||||
static void vpic_register_io_handler(struct vm *vm)
|
||||
{
|
||||
struct vm_io_range master_range = {
|
||||
.flags = IO_ATTR_RW,
|
||||
|
@ -407,7 +407,7 @@ void setup_ioapic_irq(void)
|
||||
ASSERT(nr_gsi <= NR_MAX_GSI, "GSI table overflow");
|
||||
}
|
||||
|
||||
void dump_ioapic(void)
|
||||
static void dump_ioapic(void)
|
||||
{
|
||||
uint32_t irq;
|
||||
|
||||
@ -457,7 +457,7 @@ void resume_ioapic(void)
|
||||
}
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
void get_rte_info(struct ioapic_rte *rte, bool *mask, bool *irr,
|
||||
static void get_rte_info(struct ioapic_rte *rte, bool *mask, bool *irr,
|
||||
bool *phys, uint32_t *delmode, bool *level, uint32_t *vector, uint32_t *dest)
|
||||
{
|
||||
*mask = ((rte->lo_32 & IOAPIC_RTE_INTMASK) == IOAPIC_RTE_INTMSET);
|
||||
|
@ -398,7 +398,7 @@ void dispatch_exception(struct intr_excp_ctx *ctx)
|
||||
cpu_dead(pcpu_id);
|
||||
}
|
||||
|
||||
void handle_spurious_interrupt(uint32_t vector)
|
||||
static void handle_spurious_interrupt(uint32_t vector)
|
||||
{
|
||||
send_lapic_eoi();
|
||||
|
||||
|
@ -61,7 +61,7 @@ void setup_notification(void)
|
||||
dev_to_vector(notification_node));
|
||||
}
|
||||
|
||||
void cleanup_notification(void)
|
||||
static void cleanup_notification(void)
|
||||
{
|
||||
if (notification_node != NULL)
|
||||
unregister_handler_common(notification_node);
|
||||
|
@ -246,7 +246,7 @@ void exec_vmwrite64(unsigned int field_full, uint64_t value)
|
||||
asm volatile ("movw %%cs, %%ax" : "=a"(sel)); \
|
||||
}
|
||||
|
||||
uint32_t get_cs_access_rights(void)
|
||||
static uint32_t get_cs_access_rights(void)
|
||||
{
|
||||
uint32_t usable_ar;
|
||||
uint16_t sel_value;
|
||||
|
@ -175,7 +175,7 @@ probe_table(uint64_t address, const char *sig)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void *get_acpi_tbl(const char *sig)
|
||||
static void *get_acpi_tbl(const char *sig)
|
||||
{
|
||||
struct acpi_table_rsdp *rsdp;
|
||||
struct acpi_table_rsdt *rsdt;
|
||||
|
@ -403,7 +403,7 @@ int64_t hcall_notify_req_finish(uint64_t vmid, uint64_t vcpu_id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t _set_vm_memmap(struct vm *vm, struct vm *target_vm,
|
||||
static int64_t _set_vm_memmap(struct vm *vm, struct vm *target_vm,
|
||||
struct vm_set_memmap *memmap)
|
||||
{
|
||||
uint64_t hpa, base_paddr;
|
||||
|
@ -309,7 +309,7 @@ done:
|
||||
return reg;
|
||||
}
|
||||
|
||||
void vuart_register_io_handler(struct vm *vm)
|
||||
static void vuart_register_io_handler(struct vm *vm)
|
||||
{
|
||||
struct vm_io_range range = {
|
||||
.flags = IO_ATTR_RW,
|
||||
|
@ -242,6 +242,7 @@ struct stack_canary {
|
||||
uint8_t reserved[40];
|
||||
uint64_t canary;
|
||||
};
|
||||
void __stack_chk_fail(void);
|
||||
#endif
|
||||
|
||||
extern struct cpuinfo_x86 boot_cpu_data;
|
||||
@ -263,6 +264,8 @@ bool is_vapic_intr_delivery_supported(void);
|
||||
bool is_vapic_virt_reg_supported(void);
|
||||
bool cpu_has_cap(uint32_t bit);
|
||||
void load_cpu_state_data(void);
|
||||
void bsp_boot_init(void);
|
||||
void cpu_secondary_init(void);
|
||||
void start_cpus();
|
||||
void stop_cpus();
|
||||
|
||||
|
@ -72,6 +72,7 @@ int quick_handler_nolock(struct irq_desc *desc, void *handler_data);
|
||||
|
||||
int init_default_irqs(uint16_t cpu);
|
||||
|
||||
void dispatch_exception(struct intr_excp_ctx *ctx);
|
||||
void dispatch_interrupt(struct intr_excp_ctx *ctx);
|
||||
|
||||
void setup_notification(void);
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <rtl.h>
|
||||
#include <hkdf.h>
|
||||
|
||||
int hkdf_sha256(uint8_t *out_key, size_t out_len,
|
||||
const uint8_t *secret, size_t secret_len,
|
||||
|
@ -364,7 +364,7 @@ size_t strnlen_s(const char *str, size_t maxlen)
|
||||
return count;
|
||||
}
|
||||
|
||||
char hexdigit(int decimal_val)
|
||||
static char hexdigit(int decimal_val)
|
||||
{
|
||||
static const char hexdigits[] = { '0', '1', '2', '3', '4', '5', '6',
|
||||
'7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
|
||||
|
Loading…
Reference in New Issue
Block a user