Re: [PATCH v3 11/12] KVM: x86: Guard .gmem_prepare() declarations with HAVE_KVM_GMEM_PREPARE=y
From: Sean Christopherson
Date: Mon Jul 06 2026 - 19:16:55 EST
On Wed, Jul 01, 2026, Michael Roth wrote:
> On Tue, Jun 30, 2026 at 03:26:06PM -0700, Sean Christopherson wrote:
> > Wrap the .gmem_prepare() declarations with HAVE_KVM_GMEM_PREPARE so that
> > non-SEV code doesn't try to wire up a callback without doing the necessary
> > enabling.
> >
> > No functional change intended.
> >
> > Fixes: 3bb2531e20bf ("KVM: guest_memfd: Add hook for initializing memory")
> > Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
>
> Reviewed-by: Michael Roth <michael.roth@xxxxxxx>
>
> Not sure about the need for the Fixes tag, but it certainly guards against
> some future problems.
Copy+pasting my response[*] from a similar comment about a liberal Fixes tag:
: > This LGTM, though I'm not sure this deserves a fixes tag.
:
: Yeah, it's borderline. Because KVM (x86) doesn't do AUTOSEL, i.e. requires an
: explicit "Cc: stable@xxxxxxxxxxxxxxx" for the vast majority of cases, we can be
: very liberal with Fixes. And so I like to use Fixes to create a paper trail for
: anything where a commit did something that would have necessitate a new version
: of the patch, had it been caught in code review.
[*] https://lore.kernel.org/all/akMLDayXmzhmvJBG@xxxxxxxxxx