From: Tom Lendacky <thomas.lendacky@amd.com>
To: Borislav Petkov <bp@alien8.de>, Michael Roth <michael.roth@amd.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Sean Christopherson <seanjc@google.com>,
stable@kernel.org
Subject: Re: [PATCH] x86/sev: Guard sev_evict_cache() with CONFIG_AMD_MEM_ENCRYPT
Date: Sat, 13 Sep 2025 09:29:47 -0500 [thread overview]
Message-ID: <56877590-a7c8-4dbd-b334-ae9cbbf62bf1@amd.com> (raw)
In-Reply-To: <20250912210201.GFaMSKSSvK55XIwR3e@fat_crate.local>
On 9/12/25 16:02, Borislav Petkov wrote:
> On Fri, Sep 12, 2025 at 03:49:29PM -0500, Michael Roth wrote:
>> I think that's actually the concerning thing. If someone built a guest
>> kernel with CONFIG_KVM_AMD_SEV=y they might be under the impression that
>> this is performing evictions when it's actually just a stub function.
>
> That sooo needs to be in the commit message...
I can send a v2 or if you want to modify the commit message with the
following:
The sev_evict_cache() is guest-related code and should be guarded by
CONFIG_AMD_MEM_ENCRYPT, not CONFIG_KVM_AMD_SEV.
CONFIG_AMD_MEM_ENCRYPT=y is required for a guest to run properly as an
SEV-SNP guest, but a guest kernel built with CONFIG_KVM_AMD_SEV=n would
get the stub function of sev_evict_cache() instead of the version that
performs the actual eviction. Move the function declarations under the
appropriate #ifdef.
Let me know.
Thanks,
Tom
>
next prev parent reply other threads:[~2025-09-13 14:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-12 20:29 Tom Lendacky
2025-09-12 20:39 ` Michael Roth
2025-09-12 20:42 ` Borislav Petkov
2025-09-12 20:49 ` Michael Roth
2025-09-12 21:02 ` Borislav Petkov
2025-09-13 14:29 ` Tom Lendacky [this message]
2025-09-13 15:38 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56877590-a7c8-4dbd-b334-ae9cbbf62bf1@amd.com \
--to=thomas.lendacky@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®