Re: [PATCH] KVM: x86: Advertise that the SMM_CTL MSR is not supported

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

 



On Fri, Oct 07, 2022, Sean Christopherson wrote:
> On Fri, Oct 07, 2022, Jim Mattson wrote:
> > CPUID.80000021H:EAX[bit 9] indicates that the SMM_CTL MSR (0xc0010116)
> > is not supported. This defeature can be advertised by
> > KVM_GET_SUPPORTED_CPUID regardless of whether or not the host
> > enumerates it.
> 
> Might be worth noting that KVM will only enumerate the bit if the host happens to
> have a max extend leaf > 80000021.
> > 
> > Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
> > ---
> >  arch/x86/kvm/cpuid.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> > index 2796dde06302..b748fac2ae37 100644
> > --- a/arch/x86/kvm/cpuid.c
> > +++ b/arch/x86/kvm/cpuid.c
> > @@ -1199,8 +1199,12 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
> >  		 * Other defined bits are for MSRs that KVM does not expose:
> >  		 *   EAX      3      SPCL, SMM page configuration lock
> >  		 *   EAX      13     PCMSR, Prefetch control MSR
> > +		 *
> > +		 * KVM doesn't support SMM_CTL.
> > +		 *   EAX       9     SMM_CTL MSR is not supported
> >  		 */
> >  		entry->eax &= BIT(0) | BIT(2) | BIT(6);
> 
> I don't suppose I can bribe you to add a kvm_only_cpuid_leafs entry for these? :-)

Ha!  Someone else must have heard me whining :-)

https://lore.kernel.org/all/20221129235816.188737-5-kim.phillips@xxxxxxx



[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