mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-04 10:25:00 +00:00
hv: use int32_t replace int
Since it's typedef in "include/lib/types.h" Tracked-On: #861 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -59,7 +59,7 @@ void ptirq_intx_ack(struct acrn_vm *vm, uint8_t virt_pin, enum ptirq_vpin_source
|
||||
* @pre info != NULL
|
||||
*
|
||||
*/
|
||||
int ptirq_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t entry_nr, struct ptirq_msi_info *info);
|
||||
int32_t ptirq_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t entry_nr, struct ptirq_msi_info *info);
|
||||
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ int ptirq_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t entry_nr, s
|
||||
* @pre vm != NULL
|
||||
*
|
||||
*/
|
||||
int ptirq_intx_pin_remap(struct acrn_vm *vm, uint8_t virt_pin, enum ptirq_vpin_source vpin_src);
|
||||
int32_t ptirq_intx_pin_remap(struct acrn_vm *vm, uint8_t virt_pin, enum ptirq_vpin_source vpin_src);
|
||||
|
||||
/**
|
||||
* @brief Add an interrupt remapping entry for INTx as pre-hold mapping.
|
||||
@@ -103,7 +103,7 @@ int ptirq_intx_pin_remap(struct acrn_vm *vm, uint8_t virt_pin, enum ptirq_vpin_s
|
||||
* @pre vm != NULL
|
||||
*
|
||||
*/
|
||||
int ptirq_add_intx_remapping(struct acrn_vm *vm, uint8_t virt_pin, uint8_t phys_pin, bool pic_pin);
|
||||
int32_t ptirq_add_intx_remapping(struct acrn_vm *vm, uint8_t virt_pin, uint8_t phys_pin, bool pic_pin);
|
||||
|
||||
/**
|
||||
* @brief Remove an interrupt remapping entry for INTx.
|
||||
@@ -140,7 +140,7 @@ void ptirq_remove_intx_remapping(struct acrn_vm *vm, uint8_t virt_pin, bool pic_
|
||||
* @pre vm != NULL
|
||||
*
|
||||
*/
|
||||
int ptirq_add_msix_remapping(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t phys_bdf, uint32_t vector_count);
|
||||
int32_t ptirq_add_msix_remapping(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t phys_bdf, uint32_t vector_count);
|
||||
|
||||
/**
|
||||
* @brief Remove interrupt remapping entry/entries for MSI/MSI-x.
|
||||
|
@@ -211,7 +211,7 @@ extern uint8_t ld_bss_end;
|
||||
/* In trampoline range, hold the jump target which trampline will jump to */
|
||||
extern uint64_t main_entry[1];
|
||||
|
||||
extern int ibrs_type;
|
||||
extern int32_t ibrs_type;
|
||||
extern spinlock_t trampoline_spinlock;
|
||||
|
||||
/*
|
||||
@@ -526,7 +526,7 @@ msr_write(uint32_t reg_num, uint64_t value64)
|
||||
}
|
||||
|
||||
static inline void
|
||||
write_xcr(int reg, uint64_t val)
|
||||
write_xcr(int32_t reg, uint64_t val)
|
||||
{
|
||||
uint32_t low, high;
|
||||
|
||||
|
@@ -135,7 +135,7 @@ static inline void cpuid_subleaf(uint32_t leaf, uint32_t subleaf,
|
||||
asm_cpuid(eax, ebx, ecx, edx);
|
||||
}
|
||||
|
||||
int set_vcpuid_entries(struct acrn_vm *vm);
|
||||
int32_t set_vcpuid_entries(struct acrn_vm *vm);
|
||||
void guest_cpuid(struct acrn_vcpu *vcpu,
|
||||
uint32_t *eax, uint32_t *ebx,
|
||||
uint32_t *ecx, uint32_t *edx);
|
||||
|
@@ -70,7 +70,8 @@
|
||||
#define LDTR_AR (0x0082U) /* LDT, type must be 2, refer to SDM Vol3 26.3.1.2 */
|
||||
#define TR_AR (0x008bU) /* TSS (busy), refer to SDM Vol3 26.3.1.2 */
|
||||
|
||||
int prepare_vm0_memmap(struct acrn_vm *vm);
|
||||
int32_t prepare_vm0_memmap(struct acrn_vm *vm);
|
||||
|
||||
/* Definition for a mem map lookup */
|
||||
struct vm_lu_mem_map {
|
||||
struct list_head list; /* EPT mem map lookup list*/
|
||||
@@ -93,22 +94,22 @@ enum vm_paging_mode {
|
||||
*/
|
||||
uint64_t vcpumask2pcpumask(struct acrn_vm *vm, uint64_t vdmask);
|
||||
|
||||
int gva2gpa(struct acrn_vcpu *vcpu, uint64_t gva, uint64_t *gpa, uint32_t *err_code);
|
||||
int32_t gva2gpa(struct acrn_vcpu *vcpu, uint64_t gva, uint64_t *gpa, uint32_t *err_code);
|
||||
|
||||
enum vm_paging_mode get_vcpu_paging_mode(struct acrn_vcpu *vcpu);
|
||||
|
||||
int rdmsr_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int wrmsr_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t rdmsr_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t wrmsr_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
void init_msr_emulation(struct acrn_vcpu *vcpu);
|
||||
|
||||
uint32_t vmsr_get_guest_msr_index(uint32_t msr);
|
||||
|
||||
struct run_context;
|
||||
int vmx_vmrun(struct run_context *context, int ops, int ibrs);
|
||||
int32_t vmx_vmrun(struct run_context *context, int32_t ops, int32_t ibrs);
|
||||
|
||||
int general_sw_loader(struct acrn_vm *vm);
|
||||
int32_t general_sw_loader(struct acrn_vm *vm);
|
||||
|
||||
typedef int (*vm_sw_loader_t)(struct acrn_vm *vm);
|
||||
typedef int32_t (*vm_sw_loader_t)(struct acrn_vm *vm);
|
||||
extern vm_sw_loader_t vm_sw_loader;
|
||||
/**
|
||||
* @brief Data transfering between hypervisor and VM
|
||||
@@ -134,7 +135,7 @@ extern vm_sw_loader_t vm_sw_loader;
|
||||
* continuous
|
||||
* @pre Pointer vm is non-NULL
|
||||
*/
|
||||
int copy_from_gpa(struct acrn_vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
|
||||
int32_t copy_from_gpa(struct acrn_vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
|
||||
/**
|
||||
* @brief Copy data from HV address space to VM GPA space
|
||||
*
|
||||
@@ -153,7 +154,7 @@ int copy_from_gpa(struct acrn_vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
|
||||
* continuous
|
||||
* @pre Pointer vm is non-NULL
|
||||
*/
|
||||
int copy_to_gpa(struct acrn_vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
|
||||
int32_t copy_to_gpa(struct acrn_vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
|
||||
/**
|
||||
* @brief Copy data from VM GVA space to HV address space
|
||||
*
|
||||
@@ -167,7 +168,7 @@ int copy_to_gpa(struct acrn_vm *vm, void *h_ptr, uint64_t gpa, uint32_t size);
|
||||
* @param[out] err_code The page fault flags
|
||||
* @param[out] fault_addr The GVA address that causes a page fault
|
||||
*/
|
||||
int copy_from_gva(struct acrn_vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
int32_t copy_from_gva(struct acrn_vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
uint32_t size, uint32_t *err_code, uint64_t *fault_addr);
|
||||
/**
|
||||
* @brief Copy data from HV address space to VM GVA space
|
||||
@@ -182,7 +183,7 @@ int copy_from_gva(struct acrn_vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
* @param[out] err_code The page fault flags
|
||||
* @param[out] fault_addr The GVA address that causes a page fault
|
||||
*/
|
||||
int copy_to_gva(struct acrn_vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
int32_t copy_to_gva(struct acrn_vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
uint32_t size, uint32_t *err_code, uint64_t *fault_addr);
|
||||
/**
|
||||
* @}
|
||||
|
@@ -8,8 +8,8 @@
|
||||
#define GUEST_PM_H
|
||||
|
||||
void vm_setup_cpu_state(struct acrn_vm *vm);
|
||||
int vm_load_pm_s_state(struct acrn_vm *vm);
|
||||
int validate_pstate(const struct acrn_vm *vm, uint64_t perf_ctl);
|
||||
int32_t vm_load_pm_s_state(struct acrn_vm *vm);
|
||||
int32_t validate_pstate(const struct acrn_vm *vm, uint64_t perf_ctl);
|
||||
void register_pm1ab_handler(struct acrn_vm *vm);
|
||||
|
||||
#endif /* PM_H */
|
||||
|
@@ -26,6 +26,6 @@ struct mptable_info;
|
||||
extern struct mptable_info mptable_vm1;
|
||||
extern struct mptable_info mptable_vm2;
|
||||
|
||||
int mptable_build(struct acrn_vm *vm);
|
||||
int32_t mptable_build(struct acrn_vm *vm);
|
||||
|
||||
#endif /* MPTABLE_H */
|
||||
|
@@ -204,7 +204,7 @@ struct acrn_vcpu_arch {
|
||||
uint8_t vmcs[PAGE_SIZE];
|
||||
/* per vcpu lapic */
|
||||
struct acrn_vlapic vlapic;
|
||||
int cur_context;
|
||||
int32_t cur_context;
|
||||
struct cpu_context contexts[NR_WORLD];
|
||||
|
||||
/* common MSRs, world_msrs[] is a subset of it */
|
||||
@@ -551,7 +551,7 @@ struct acrn_vcpu* get_ever_run_vcpu(uint16_t pcpu_id);
|
||||
*
|
||||
* @retval 0 vcpu created successfully, other values failed.
|
||||
*/
|
||||
int create_vcpu(uint16_t pcpu_id, struct acrn_vm *vm, struct acrn_vcpu **rtn_vcpu_handle);
|
||||
int32_t create_vcpu(uint16_t pcpu_id, struct acrn_vm *vm, struct acrn_vcpu **rtn_vcpu_handle);
|
||||
|
||||
/**
|
||||
* @brief run into non-root mode based on vcpu setting
|
||||
@@ -564,9 +564,9 @@ int create_vcpu(uint16_t pcpu_id, struct acrn_vm *vm, struct acrn_vcpu **rtn_vcp
|
||||
*
|
||||
* @retval 0 vcpu run successfully, other values failed.
|
||||
*/
|
||||
int run_vcpu(struct acrn_vcpu *vcpu);
|
||||
int32_t run_vcpu(struct acrn_vcpu *vcpu);
|
||||
|
||||
int shutdown_vcpu(struct acrn_vcpu *vcpu);
|
||||
int32_t shutdown_vcpu(struct acrn_vcpu *vcpu);
|
||||
|
||||
/**
|
||||
* @brief unmap the vcpu with pcpu and free its vlapic
|
||||
@@ -623,7 +623,7 @@ void schedule_vcpu(struct acrn_vcpu *vcpu);
|
||||
* @param[inout] vm pointer to vm data structure
|
||||
* @param[in] pcpu_id which the vcpu will be mapped
|
||||
*/
|
||||
int prepare_vcpu(struct acrn_vm *vm, uint16_t pcpu_id);
|
||||
int32_t prepare_vcpu(struct acrn_vm *vm, uint16_t pcpu_id);
|
||||
|
||||
void request_vcpu_pre_work(struct acrn_vcpu *vcpu, uint16_t pre_work_id);
|
||||
|
||||
|
@@ -104,7 +104,7 @@ void vioapic_update_tmr(struct acrn_vcpu *vcpu);
|
||||
uint32_t vioapic_pincount(const struct acrn_vm *vm);
|
||||
void vioapic_process_eoi(struct acrn_vm *vm, uint32_t vector);
|
||||
void vioapic_get_rte(struct acrn_vm *vm, uint32_t pin, union ioapic_rte *rte);
|
||||
int vioapic_mmio_access_handler(struct io_request *io_req, void *handler_private_data);
|
||||
int32_t vioapic_mmio_access_handler(struct io_request *io_req, void *handler_private_data);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@@ -75,7 +75,7 @@ struct acrn_vlapic {
|
||||
struct acrn_vcpu *vcpu;
|
||||
|
||||
uint32_t esr_pending;
|
||||
int esr_firing;
|
||||
int32_t esr_firing;
|
||||
|
||||
struct vlapic_timer vtimer;
|
||||
|
||||
@@ -134,7 +134,7 @@ uint64_t vlapic_get_cr8(const struct acrn_vlapic *vlapic);
|
||||
* @remark The vector does not automatically transition to the ISR as a
|
||||
* result of calling this function.
|
||||
*/
|
||||
int vlapic_pending_intr(const struct acrn_vlapic *vlapic, uint32_t *vecptr);
|
||||
int32_t vlapic_pending_intr(const struct acrn_vlapic *vlapic, uint32_t *vecptr);
|
||||
|
||||
/**
|
||||
* @brief Accept virtual interrupt.
|
||||
@@ -181,8 +181,8 @@ void vlapic_post_intr(uint16_t dest_pcpu_id);
|
||||
*/
|
||||
uint64_t apicv_get_pir_desc_paddr(struct acrn_vcpu *vcpu);
|
||||
|
||||
int vlapic_rdmsr(struct acrn_vcpu *vcpu, uint32_t msr, uint64_t *rval);
|
||||
int vlapic_wrmsr(struct acrn_vcpu *vcpu, uint32_t msr, uint64_t wval);
|
||||
int32_t vlapic_rdmsr(struct acrn_vcpu *vcpu, uint32_t msr, uint64_t *rval);
|
||||
int32_t vlapic_wrmsr(struct acrn_vcpu *vcpu, uint32_t msr, uint64_t wval);
|
||||
|
||||
/*
|
||||
* Signals to the LAPIC that an interrupt at 'vector' needs to be generated
|
||||
@@ -265,7 +265,7 @@ void vlapic_set_tmr_one_vec(struct acrn_vlapic *vlapic, uint32_t delmode,
|
||||
|
||||
void vlapic_apicv_batch_set_tmr(struct acrn_vlapic *vlapic);
|
||||
uint32_t vlapic_get_apicid(struct acrn_vlapic *vlapic);
|
||||
int vlapic_create(struct acrn_vcpu *vcpu);
|
||||
int32_t vlapic_create(struct acrn_vcpu *vcpu);
|
||||
/*
|
||||
* @pre vcpu != NULL
|
||||
*/
|
||||
@@ -277,10 +277,10 @@ bool vlapic_enabled(const struct acrn_vlapic *vlapic);
|
||||
uint64_t vlapic_apicv_get_apic_access_addr(void);
|
||||
uint64_t vlapic_apicv_get_apic_page_addr(struct acrn_vlapic *vlapic);
|
||||
void vlapic_apicv_inject_pir(struct acrn_vlapic *vlapic);
|
||||
int apic_access_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int apic_write_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int veoi_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int tpr_below_threshold_vmexit_handler(__unused struct acrn_vcpu *vcpu);
|
||||
int32_t apic_access_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t apic_write_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t veoi_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t tpr_below_threshold_vmexit_handler(__unused struct acrn_vcpu *vcpu);
|
||||
void calcvdest(struct acrn_vm *vm, uint64_t *dmask, uint32_t dest, bool phys);
|
||||
|
||||
/**
|
||||
|
@@ -48,7 +48,7 @@ struct sw_kernel_info {
|
||||
};
|
||||
|
||||
struct vm_sw_info {
|
||||
int kernel_type; /* Guest kernel type */
|
||||
int32_t kernel_type; /* Guest kernel type */
|
||||
/* Kernel information (common for all guest types) */
|
||||
struct sw_kernel_info kernel_info;
|
||||
/* Additional information specific to Linux guests */
|
||||
@@ -164,7 +164,7 @@ struct acrn_vm {
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
struct vpci_vdev_array {
|
||||
int num_pci_vdev;
|
||||
int32_t num_pci_vdev;
|
||||
struct pci_vdev vpci_vdev_list[];
|
||||
};
|
||||
#endif
|
||||
@@ -257,14 +257,14 @@ vm_ioapic(struct acrn_vm *vm)
|
||||
return (struct acrn_vioapic *)&(vm->arch_vm.vioapic);
|
||||
}
|
||||
|
||||
int shutdown_vm(struct acrn_vm *vm);
|
||||
int32_t shutdown_vm(struct acrn_vm *vm);
|
||||
void pause_vm(struct acrn_vm *vm);
|
||||
void resume_vm(struct acrn_vm *vm);
|
||||
void resume_vm_from_s3(struct acrn_vm *vm, uint32_t wakeup_vec);
|
||||
int start_vm(struct acrn_vm *vm);
|
||||
int reset_vm(struct acrn_vm *vm);
|
||||
int create_vm(struct vm_description *vm_desc, struct acrn_vm **rtn_vm);
|
||||
int prepare_vm(uint16_t pcpu_id);
|
||||
int32_t start_vm(struct acrn_vm *vm);
|
||||
int32_t reset_vm(struct acrn_vm *vm);
|
||||
int32_t create_vm(struct vm_description *vm_desc, struct acrn_vm **rtn_vm);
|
||||
int32_t prepare_vm(uint16_t pcpu_id);
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
const struct vm_description_array *get_vm_desc_base(void);
|
||||
@@ -274,7 +274,7 @@ struct acrn_vm *get_vm_from_vmid(uint16_t vm_id);
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
struct vm_description_array {
|
||||
int num_vm_desc;
|
||||
int32_t num_vm_desc;
|
||||
struct vm_description vm_desc_array[];
|
||||
};
|
||||
|
||||
|
@@ -115,7 +115,7 @@ struct vm_io_handler_desc {
|
||||
|
||||
/* Typedef for MMIO handler and range check routine */
|
||||
struct mmio_request;
|
||||
typedef int (*hv_mem_io_handler_t)(struct io_request *io_req, void *handler_private_data);
|
||||
typedef int32_t (*hv_mem_io_handler_t)(struct io_request *io_req, void *handler_private_data);
|
||||
|
||||
/**
|
||||
* @brief Structure for MMIO handler node
|
||||
@@ -223,7 +223,7 @@ void register_io_emulation_handler(struct acrn_vm *vm, uint32_t pio_idx,
|
||||
* @retval 0 Registration succeeds
|
||||
* @retval -EINVAL \p read_write is NULL, \p end is not larger than \p start or \p vm has been launched
|
||||
*/
|
||||
int register_mmio_emulation_handler(struct acrn_vm *vm,
|
||||
int32_t register_mmio_emulation_handler(struct acrn_vm *vm,
|
||||
hv_mem_io_handler_t read_write, uint64_t start,
|
||||
uint64_t end, void *handler_private_data);
|
||||
|
||||
|
@@ -137,7 +137,7 @@ uint32_t irq_to_vector(uint32_t irq);
|
||||
*
|
||||
* @pre vcpu != NULL
|
||||
*/
|
||||
int vcpu_queue_exception(struct acrn_vcpu *vcpu, uint32_t vector, uint32_t err_code);
|
||||
int32_t vcpu_queue_exception(struct acrn_vcpu *vcpu, uint32_t vector, uint32_t err_code);
|
||||
|
||||
/**
|
||||
* @brief Inject external interrupt to guest.
|
||||
@@ -223,10 +223,10 @@ void vcpu_make_request(struct acrn_vcpu *vcpu, uint16_t eventid);
|
||||
/*
|
||||
* @pre vcpu != NULL
|
||||
*/
|
||||
int exception_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int interrupt_window_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int external_interrupt_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int acrn_handle_pending_request(struct acrn_vcpu *vcpu);
|
||||
int32_t exception_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t interrupt_window_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t external_interrupt_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t acrn_handle_pending_request(struct acrn_vcpu *vcpu);
|
||||
|
||||
/**
|
||||
* @brief Initialize the interrupt
|
||||
|
@@ -122,7 +122,7 @@ void mmu_modify_or_del(uint64_t *pml4_page, uint64_t vaddr_base, uint64_t size,
|
||||
* @retval 0 on success
|
||||
* @retval -ENODEV Don't support EPT or VPID capability
|
||||
*/
|
||||
int check_vmx_mmu_cap(void);
|
||||
int32_t check_vmx_mmu_cap(void);
|
||||
/**
|
||||
* @brief VPID allocation
|
||||
*
|
||||
@@ -293,7 +293,7 @@ void ept_mr_del(struct acrn_vm *vm, uint64_t *pml4_page, uint64_t gpa,
|
||||
* @retval -EINVAL fail to handle the EPT violation
|
||||
* @retval 0 Success to handle the EPT violation
|
||||
*/
|
||||
int ept_violation_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t ept_violation_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
/**
|
||||
* @brief EPT misconfiguration handling
|
||||
*
|
||||
@@ -302,7 +302,7 @@ int ept_violation_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
* @retval -EINVAL fail to handle the EPT misconfig
|
||||
* @retval 0 Success to handle the EPT misconfig
|
||||
*/
|
||||
int ept_misconfig_vmexit_handler(__unused struct acrn_vcpu *vcpu);
|
||||
int32_t ept_misconfig_vmexit_handler(__unused struct acrn_vcpu *vcpu);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@@ -78,8 +78,8 @@ struct multiboot_module {
|
||||
uint32_t mm_reserved;
|
||||
};
|
||||
|
||||
int parse_hv_cmdline(void);
|
||||
int init_vm_boot_info(struct acrn_vm *vm);
|
||||
int32_t parse_hv_cmdline(void);
|
||||
int32_t init_vm_boot_info(struct acrn_vm *vm);
|
||||
|
||||
/* boot_regs store the multiboot header address */
|
||||
extern uint32_t boot_regs[2];
|
||||
|
@@ -62,7 +62,7 @@ struct hv_timer {
|
||||
*/
|
||||
static inline void initialize_timer(struct hv_timer *timer,
|
||||
timer_handle_t func, void *priv_data,
|
||||
uint64_t fire_tsc, int mode, uint64_t period_in_cycle)
|
||||
uint64_t fire_tsc, int32_t mode, uint64_t period_in_cycle)
|
||||
{
|
||||
if (timer != NULL) {
|
||||
timer->func = func;
|
||||
@@ -96,7 +96,7 @@ static inline bool timer_expired(const struct hv_timer *timer)
|
||||
*
|
||||
* @remark Don't call it in the timer callback function or interrupt content.
|
||||
*/
|
||||
int add_timer(struct hv_timer *timer);
|
||||
int32_t add_timer(struct hv_timer *timer);
|
||||
|
||||
/**
|
||||
* @brief Delete a timer.
|
||||
|
@@ -126,7 +126,7 @@ struct trusty_startup_param {
|
||||
uint8_t padding[4];
|
||||
};
|
||||
|
||||
void switch_world(struct acrn_vcpu *vcpu, int next_world);
|
||||
void switch_world(struct acrn_vcpu *vcpu, int32_t next_world);
|
||||
bool initialize_trusty(struct acrn_vcpu *vcpu, uint64_t param);
|
||||
void destroy_secure_world(struct acrn_vm *vm, bool need_clr_mem);
|
||||
void save_sworld_context(struct acrn_vcpu *vcpu);
|
||||
|
@@ -8,14 +8,14 @@
|
||||
#define VMEXIT_H_
|
||||
|
||||
struct vm_exit_dispatch {
|
||||
int (*handler)(struct acrn_vcpu *);
|
||||
int32_t (*handler)(struct acrn_vcpu *);
|
||||
uint32_t need_exit_qualification;
|
||||
};
|
||||
|
||||
int vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int vmcall_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int cpuid_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int cr_access_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t vmcall_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t cpuid_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t cr_access_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
extern void vm_exit(void);
|
||||
static inline uint64_t
|
||||
vm_exit_qualification_bit_mask(uint64_t exit_qual, uint32_t msb, uint32_t lsb)
|
||||
|
@@ -459,7 +459,7 @@ void exec_vmclear(void *addr);
|
||||
void exec_vmptrld(void *addr);
|
||||
|
||||
uint64_t vmx_rdmsr_pat(const struct acrn_vcpu *vcpu);
|
||||
int vmx_wrmsr_pat(struct acrn_vcpu *vcpu, uint64_t value);
|
||||
int32_t vmx_wrmsr_pat(struct acrn_vcpu *vcpu, uint64_t value);
|
||||
|
||||
void vmx_write_cr0(struct acrn_vcpu *vcpu, uint64_t cr0);
|
||||
void vmx_write_cr4(struct acrn_vcpu *vcpu, uint64_t cr4);
|
||||
|
@@ -502,7 +502,7 @@ struct iommu_domain;
|
||||
* @pre domain != NULL
|
||||
*
|
||||
*/
|
||||
int assign_iommu_device(struct iommu_domain *domain, uint8_t bus, uint8_t devfun);
|
||||
int32_t assign_iommu_device(struct iommu_domain *domain, uint8_t bus, uint8_t devfun);
|
||||
|
||||
/**
|
||||
* @brief Unassign a device specified by bus & devfun from a iommu domain .
|
||||
@@ -519,7 +519,7 @@ int assign_iommu_device(struct iommu_domain *domain, uint8_t bus, uint8_t devfun
|
||||
* @pre domain != NULL
|
||||
*
|
||||
*/
|
||||
int unassign_iommu_device(const struct iommu_domain *domain, uint8_t bus, uint8_t devfun);
|
||||
int32_t unassign_iommu_device(const struct iommu_domain *domain, uint8_t bus, uint8_t devfun);
|
||||
|
||||
/**
|
||||
* @brief Create a iommu domain for a VM specified by vm_id.
|
||||
@@ -596,7 +596,7 @@ void resume_iommu(void);
|
||||
* @retval <0 on failure
|
||||
*
|
||||
*/
|
||||
int init_iommu(void);
|
||||
int32_t init_iommu(void);
|
||||
|
||||
/**
|
||||
* @brief Init VM0 domain of iommu.
|
||||
|
Reference in New Issue
Block a user