Skip to content

Commit df038fc

Browse files
KaigeFujren1
authored andcommitted
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 <kaige.fu@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
1 parent 43e4bd4 commit df038fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hypervisor/arch/x86/vmx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ int vmx_write_cr4(struct vcpu *vcpu, uint64_t cr4)
524524

525525
static void init_guest_state(struct vcpu *vcpu)
526526
{
527-
uint64_t field;
527+
uint32_t field;
528528
uint64_t value;
529529
uint32_t value32;
530530
uint64_t value64;
@@ -978,7 +978,7 @@ static void init_guest_state(struct vcpu *vcpu)
978978

979979
static void init_host_state(__unused struct vcpu *vcpu)
980980
{
981-
uint64_t field;
981+
uint32_t field;
982982
uint16_t value16;
983983
uint32_t value32;
984984
uint64_t value64;
@@ -1448,7 +1448,7 @@ static void init_exit_ctrl(__unused struct vcpu *vcpu)
14481448
#ifdef CONFIG_EFI_STUB
14491449
static void override_uefi_vmcs(struct vcpu *vcpu)
14501450
{
1451-
uint64_t field;
1451+
uint32_t field;
14521452
struct run_context *cur_context =
14531453
&vcpu->arch_vcpu.contexts[vcpu->arch_vcpu.cur_context];
14541454

0 commit comments

Comments
 (0)