RE: [PATCH v3 1/2] KVM: VMX: Cleanup VMX basic information defines and usages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >> @@ -6964,7 +6975,7 @@ static void nested_vmx_setup_basic(struct
> nested_vmx_msrs *msrs)
> >>   		VMCS12_REVISION |
> >>   		VMX_BASIC_TRUE_CTLS |
> >>   		((u64)VMCS12_SIZE << VMX_BASIC_VMCS_SIZE_SHIFT) |
> >> -		(VMX_BASIC_MEM_TYPE_WB <<
> VMX_BASIC_MEM_TYPE_SHIFT);
> >> +		(MEM_TYPE_WB << VMX_BASIC_MEM_TYPE_SHIFT);
> >>
> >
> > ... here, we can remove the two _SHIFT but define below instead:
> >
> >    #define VMX_BASIC_VMCS12_SIZE	((u64)VMCS12_SIZE << 32)
> >    #define VMX_BASIC_MEM_TYPE_WB	(MEM_TYPE_WB << 50)
> 
> I personally don't like such names, unless we can name them in a better way.
> 
> >
> > And use above two macros in nested_vmx_setup_basic()?

A second thought on this, I agree this is better.  And I will post v4.

Thanks!
    Xin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux