Re: [PATCH 26/28] KVM: SVM: enable GMET and set it in MMU role

Sean Christopherson
2026-05-01T14:38:54Z

On Fri, May 01, 2026, Paolo Bonzini wrote:
> On Thu, Apr 30, 2026 at 9:15 PM Sean Christopherson <seanjc@google.com> wrote:
> >
> > On Thu, Apr 30, 2026, Paolo Bonzini wrote:
> > > diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> > > index e7fdd7a9c280..3895d8794366 100644
> > > --- a/arch/x86/kvm/svm/svm.c
> > > +++ b/arch/x86/kvm/svm/svm.c
> > > @@ -138,6 +138,9 @@ module_param(pause_filter_count_max, ushort, 0444);
> > > bool __ro_after_init npt_enabled = true;
> > > module_param_named(npt, npt_enabled, bool, 0444);
> > >
> > > +bool gmet_enabled = true;
> >
> > This really should be hardcoded false, with no module param, until "enable GMET
> > for guests". Otherwise stopping here means KVM is over-reporting support.
>
> Are module parameters reporting support of nested features?

Not strictly speaking, no. But I do think most users, myself included, assume
that feature xyz is fully supported if its associated module param exist. Though
I completely agree this is an unusual case since the MBEC/GMET aren't really
supported for non-nested, but KVM still consumes the module param.

> This is I think the only point where I disagree, I think.

No worries, I'm a-ok with this one as-is. And I can see it being useful as a
bisection point.