RE: [PATCH v6 4/9] KVM: VMX: Move MSR_IA32_VMX_BASIC bit defines to asm/vmx.h

From: Li, Xin3
Date: Tue Apr 02 2024 - 01:02:00 EST


> On 3/9/2024 9:27 AM, Sean Christopherson wrote:
> > From: Xin Li <xin3.li@xxxxxxxxx>
> >
> > Move the bit defines for MSR_IA32_VMX_BASIC from msr-index.h to vmx.h
> > so that they are colocated with other VMX MSR bit defines, and with
> > the helpers that extract specific information from an MSR_IA32_VMX_BASIC
> value.
>
> My understanding of msr-index.h is, it contains the index of various MSRs and the
> bit definitions of each MSRs.

"index" in the name kind of tell what it wants to focus.

> Put the definition of each bit or bits below the definition of MSR index instead of
> dispersed in different headers looks more intact for me.

You're right when there is no other proper header for a MSR field definition.

While the Linux code is maintained in the manner of "divide and conquer",
thus I would say the VMX fields definitions belong to the KVM community,
and fortunately, there is such a vmx header.

BTW, It looks to me that some perf MSRs and fields are not in msr-index.h,
which avoids bothering the tip maintainers all the time.

Thanks!
Xin