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

From: Li, Xin3
Date: Thu Jan 18 2024 - 00:16:29 EST


> On Fri, 2024-01-12 at 01:34 -0800, Xin Li wrote:
> > Define VMX basic information fields with BIT_ULL()/GENMASK_ULL(), and
> > replace hardcoded VMX basic numbers with these field macros.
> >
> > Per Sean's ask, save the full/raw value of MSR_IA32_VMX_BASIC in the
> > global vmcs_config as type u64 to get rid of the hi/lo crud, and then
> > use VMX_BASIC helpers to extract info as needed.
> >
> > Tested-by: Shan Kang <shan.kang@xxxxxxxxx>
> > Signed-off-by: Xin Li <xin3.li@xxxxxxxxx>
> > ---
> >
>
> [...]
>
> > +/* x86 memory types, explicitly used in VMX only */
> > +#define MEM_TYPE_WB 0x6ULL
> > +#define MEM_TYPE_UC 0x0ULL
> > +
>
> [...]
>
> > -#define VMX_EPTP_MT_WB 0x6ull
> > -#define VMX_EPTP_MT_UC 0x0ull
>
> Could you also put some words to the changelog to justify your change around
> memory type macros?

NP.