lkml.org 
[lkml]   [2021]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] x86/feat_ctl: Add new VMX feature, Tertiary VM-Execution control
On Mon, Aug 02, 2021, Zeng Guang wrote:
> On 7/29/2021 7:44 AM, Sean Christopherson wrote:
> > On Fri, Jul 16, 2021, Zeng Guang wrote:
> > > @@ -42,6 +44,13 @@ static void init_vmx_capabilities(struct cpuinfo_x86 *c)
> > > rdmsr_safe(MSR_IA32_VMX_PROCBASED_CTLS2, &ign, &supported);
> > > c->vmx_capability[SECONDARY_CTLS] = supported;
> > > + /*
> > > + * For tertiary execution controls MSR, it's actually a 64bit allowed-1.
> > > + */
> > > + rdmsr_safe(MSR_IA32_VMX_PROCBASED_CTLS3, &ign, &supported);
> > > + c->vmx_capability[TERTIARY_CTLS_LOW] = ign;
> > > + c->vmx_capability[TERTIARY_CTLS_HIGH] = supported;
> > Assuming only the lower 32 bits are going to be used for the near future (next
> > few years), what about defining just TERTIARY_CTLS_LOW and then doing:
> >
> > /*
> > * Tertiary controls are 64-bit allowed-1, so unlikely other MSRs, the
> > * upper bits are ignored (because they're not used, yet...).
> > */
> > rdmsr_safe(MSR_IA32_VMX_PROCBASED_CTLS3, &supported, &ign);
> > c->vmx_capability[TERTIARY_CTLS_LOW] = supported;
> >
> > I.e. punt the ugliness issue down the road a few years.
> Prefer to keep it complete, and use new variables like low/high consistent
> with its function meaning. Ok for that ?

Ya, either way works.

\
 
 \ /
  Last update: 2021-08-02 18:21    [W:0.113 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site