Re: [PATCH] KVM: x86: Ignore cpuid faulting in SMM
From: Jim Mattson
Date: Mon Mar 02 2026 - 18:24:01 EST
On Mon, Mar 2, 2026 at 2:46 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
> > --- a/arch/x86/kvm/emulate.c
> > +++ b/arch/x86/kvm/emulate.c
> > @@ -3583,10 +3583,10 @@ static int em_cpuid(struct x86_emulate_ctxt *ctxt)
> > u64 msr = 0;
> >
> > ctxt->ops->get_msr(ctxt, MSR_MISC_FEATURES_ENABLES, &msr);
> > - if (msr & MSR_MISC_FEATURES_ENABLES_CPUID_FAULT &&
> > - ctxt->ops->cpl(ctxt)) {
> > + if (!ctxt->ops->is_smm(ctxt) &&
> > + (msr & MSR_MISC_FEATURES_ENABLES_CPUID_FAULT &&
> > + ctxt->ops->cpl(ctxt)))
>
> I assume you intended the parentheses to wrap the bitwise-AND. I'll fixup to
> this when applying.
>
> if (!ctxt->ops->is_smm(ctxt) &&
> (msr & MSR_MISC_FEATURES_ENABLES_CPUID_FAULT) &&
> ctxt->ops->cpl(ctxt))
Yes, thanks. /facepalm