From df038fc0db721d9a7e0f62e5bd764611fd9fa0ca Mon Sep 17 00:00:00 2001 From: Kaige Fu Date: Tue, 10 Jul 2018 11:45:40 +0800 Subject: [PATCH] HV: vmx: Change variable field to uint32_t With field defined as uint64_t, there are some implicit type conversions when calling exec_vmwrite/read functions which takes a uint32_t for the first parameter. This patch fixes it by change field to uint32_t. v1 - > v2: - Keep the field as it is and change the defination of field to uint32_t. Signed-off-by: Kaige Fu Reviewed-by: Junjie Mao --- hypervisor/arch/x86/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hypervisor/arch/x86/vmx.c b/hypervisor/arch/x86/vmx.c index c088ad80c..1af434581 100644 --- a/hypervisor/arch/x86/vmx.c +++ b/hypervisor/arch/x86/vmx.c @@ -524,7 +524,7 @@ int vmx_write_cr4(struct vcpu *vcpu, uint64_t cr4) static void init_guest_state(struct vcpu *vcpu) { - uint64_t field; + uint32_t field; uint64_t value; uint32_t value32; uint64_t value64; @@ -978,7 +978,7 @@ static void init_guest_state(struct vcpu *vcpu) static void init_host_state(__unused struct vcpu *vcpu) { - uint64_t field; + uint32_t field; uint16_t value16; uint32_t value32; uint64_t value64; @@ -1448,7 +1448,7 @@ static void init_exit_ctrl(__unused struct vcpu *vcpu) #ifdef CONFIG_EFI_STUB static void override_uefi_vmcs(struct vcpu *vcpu) { - uint64_t field; + uint32_t field; struct run_context *cur_context = &vcpu->arch_vcpu.contexts[vcpu->arch_vcpu.cur_context];