mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Only export SME/SEV/SEV_ES features when activated
@ 2022-02-11 21:02 Mario Limonciello
  2022-02-11 21:02 ` [PATCH v2 1/4] crypto: ccp: Use cc_platform_has to determine SEV presence Mario Limonciello
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Mario Limonciello @ 2022-02-11 21:02 UTC (permalink / raw)
  To: Borislav Petkov, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)
  Cc: Kees Cook, Thomas Lendacky, hughsient, Martin Fernandez,
	linux-kernel, Brijesh Singh, Mario Limonciello

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.

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(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-11 21:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2 0/4] Only export SME/SEV/SEV_ES features when activated Tom Lendacky

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®