mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +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:
@@ -12,9 +12,9 @@
|
||||
*/
|
||||
#define NR_VMX_EXIT_REASONS 65U
|
||||
|
||||
static int unhandled_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
static int xsetbv_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
static int wbinvd_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
static int32_t unhandled_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
static int32_t xsetbv_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
static int32_t wbinvd_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
|
||||
/* VM Dispatch table for Exit condition handling */
|
||||
static const struct vm_exit_dispatch dispatch_table[NR_VMX_EXIT_REASONS] = {
|
||||
@@ -152,11 +152,11 @@ static const struct vm_exit_dispatch dispatch_table[NR_VMX_EXIT_REASONS] = {
|
||||
.handler = unhandled_vmexit_handler}
|
||||
};
|
||||
|
||||
int vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
int32_t vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
struct vm_exit_dispatch *dispatch = NULL;
|
||||
uint16_t basic_exit_reason;
|
||||
int ret;
|
||||
int32_t ret;
|
||||
|
||||
if (get_cpu_id() != vcpu->pcpu_id) {
|
||||
pr_fatal("vcpu is not running on its pcpu!");
|
||||
@@ -228,7 +228,7 @@ int vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int unhandled_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
static int32_t unhandled_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
pr_fatal("Error: Unhandled VM exit condition from guest at 0x%016llx ",
|
||||
exec_vmread(VMX_GUEST_RIP));
|
||||
@@ -243,7 +243,7 @@ static int unhandled_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cpuid_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
int32_t cpuid_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
uint64_t rax, rbx, rcx, rdx;
|
||||
|
||||
@@ -263,7 +263,7 @@ int cpuid_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cr_access_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
int32_t cr_access_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
uint64_t reg;
|
||||
uint32_t idx;
|
||||
@@ -318,9 +318,9 @@ int cr_access_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
* XSETBV instruction set's the XCR0 that is used to tell for which
|
||||
* components states can be saved on a context switch using xsave.
|
||||
*/
|
||||
static int xsetbv_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
static int32_t xsetbv_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
int idx;
|
||||
int32_t idx;
|
||||
uint64_t val64;
|
||||
|
||||
val64 = exec_vmread(VMX_GUEST_CR4);
|
||||
@@ -362,7 +362,7 @@ static int xsetbv_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wbinvd_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
static int32_t wbinvd_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
if (!iommu_snoop_supported(vcpu->vm)) {
|
||||
cache_flush_invalidate_all();
|
||||
|
||||
Reference in New Issue
Block a user