From: Tom Lendacky <thomas.lendacky@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
Borislav Petkov <bp@alien8.de>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
hughsient@gmail.com,
Martin Fernandez <martin.fernandez@eclypsium.com>,
linux-kernel@vger.kernel.org,
Brijesh Singh <brijesh.singh@amd.com>
Subject: Re: [PATCH v2 0/4] Only export SME/SEV/SEV_ES features when activated
Date: Fri, 11 Feb 2022 15:13:56 -0600 [thread overview]
Message-ID: <0c3b0565-e80a-2f92-46b4-52f1d70c6f87@amd.com> (raw)
In-Reply-To: <20220211210255.9820-1-mario.limonciello@amd.com>
On 2/11/22 15:02, Mario Limonciello wrote:
> Currently SME/SEV/SEV_ES feature flags will export if the CPU supports
> them but even if the kernel has not enabled the features for any reason.
>
> To let userspace react to these feature flags, only set them when the
> kernel has activated them.
>
You really need to wait for more feedback before issuing a new version so
quickly. Especially since you asked a question about doing this just for
SME to which I agreed.
Also, you've used cc_platform_has() incorrectly in patches 1 and 2, so SEV
support is broke in the hypervisor with these changes.
Please just fix the SME concern that you have.
Thanks,
Tom
> changes from v1->v2:
> * Squash old patches 1/2 together
> * Add new patches to KVM/CCP code to use `cc_platform_has` instead
> * Don't use `cc_platform_has` in the early code, just check `sme_me_mask`
> and `sev_status` directly.
> * Split out SME and SEV/SEV_ES clearing as separate patches in case
> SEV/SEV_ES need other more involved work that what is in this series so
> far.
>
> Mario Limonciello (4):
> crypto: ccp: Use cc_platform_has to determine SEV presence
> KVM: SVM: Use cc_platform_has instead of CPU feature flags
> x86/cpu: clear SME features when not in use
> x86/cpu: clear SEV/SEV_ES features when not in use
>
> arch/x86/kernel/cpu/amd.c | 10 ++++++++++
> arch/x86/kernel/process.c | 5 ++++-
> arch/x86/kvm/svm/sev.c | 4 ++--
> drivers/crypto/ccp/sev-dev.c | 2 +-
> 4 files changed, 17 insertions(+), 4 deletions(-)
>
prev parent reply other threads:[~2022-02-11 21:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 21:02 [PATCH v2 0/4] Only export SME/SEV/SEV_ES features when activated Mario Limonciello
2022-02-11 21:02 ` [PATCH v2 1/4] crypto: ccp: Use cc_platform_has to determine SEV presence Mario Limonciello
2022-02-11 21:02 ` [PATCH v2 2/4] KVM: SVM: Use cc_platform_has instead of CPU feature flags Mario Limonciello
2022-02-11 21:02 ` [PATCH v2 3/4] x86/cpu: clear SME features when not in use Mario Limonciello
2022-02-11 21:17 ` Tom Lendacky
2022-02-11 21:02 ` [PATCH v2 4/4] x86/cpu: clear SEV/SEV_ES " Mario Limonciello
2022-02-11 21:13 ` Tom Lendacky [this message]
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=0c3b0565-e80a-2f92-46b4-52f1d70c6f87@amd.com \
--to=thomas.lendacky@amd.com \
--cc=bp@alien8.de \
--cc=brijesh.singh@amd.com \
--cc=hughsient@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=martin.fernandez@eclypsium.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.