linux-coco.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] Move initializing SEV/SNP functionality to KVM
@ 2024-12-16 23:56 Ashish Kalra
  2024-12-16 23:57 ` [PATCH v2 1/9] crypto: ccp: Move dev_info/err messages for SEV/SNP initialization Ashish Kalra
                   ` (9 more replies)
  0 siblings, 10 replies; 32+ messages in thread
From: Ashish Kalra @ 2024-12-16 23:56 UTC (permalink / raw)
  To: seanjc, pbonzini, tglx, mingo, bp, dave.hansen, x86, hpa,
	thomas.lendacky, john.allen, herbert, davem
  Cc: michael.roth, dionnaglaze, kvm, linux-kernel, linux-crypto,
	linux-coco

From: Ashish Kalra <ashish.kalra@amd.com>

Remove initializing SEV/SNP functionality from PSP driver and instead add
support to KVM to explicitly initialize the PSP if KVM wants to use
SEV/SNP functionality.

This removes SEV/SNP initialization at PSP module probe time and does
on-demand SEV/SNP initialization when KVM really wants to use 
SEV/SNP functionality. This will allow running legacy non-confidential
VMs without initializating SEV functionality. 

This will assist in adding SNP CipherTextHiding support and SEV firmware
hotloading support in KVM without sharing SEV ASID management and SNP
guest context support between PSP driver and KVM and keeping all that
support only in KVM.

The on-demand SEV initialization support requires a fix in QEMU to 
remove check for SEV initialization to be done prior to launching
SEV/SEV-ES VMs. 
NOTE: With the above fix for QEMU, older QEMU versions will be broken
with respect to launching SEV/SEV-ES VMs with the newer kernel/KVM as
older QEMU versions require SEV initialization to be done before
launching SEV/SEV-ES VMs.

v2:
- Added support for separate SEV and SNP platform initalization, while
SNP platform initialization is done at KVM module load time, SEV 
platform initialization is done on demand at SEV/SEV-ES VM launch.
- Added support for separate SEV and SNP platform shutdown, both 
SEV and SNP shutdown done at KVM module unload time, only SEV
shutdown down when all SEV/SEV-ES VMs have been destroyed, this
allows SEV firmware hotloading support anytime during system lifetime.
- Updated commit messages for couple of patches in the series with
reference to the feedback received on v1 patches.

Ashish Kalra (9):
  crypto: ccp: Move dev_info/err messages for SEV/SNP initialization
  crypto: ccp: Fix implicit SEV/SNP init and shutdown in ioctls
  crypto: ccp: Reset TMR size at SNP Shutdown
  crypto: ccp: Register SNP panic notifier only if SNP is enabled
  crypto: ccp: Add new SEV platform shutdown API
  crypto: ccp: Add new SEV/SNP platform shutdown API
  crypto: ccp: Add new SEV/SNP platform initialization API
  KVM: SVM: Add support to initialize SEV/SNP functionality in KVM
  crypto: ccp: Move SEV/SNP Platform initialization to KVM

 arch/x86/kvm/svm/sev.c       |  33 +++-
 drivers/crypto/ccp/sev-dev.c | 283 ++++++++++++++++++++++++-----------
 include/linux/psp-sev.h      |  27 +++-
 3 files changed, 248 insertions(+), 95 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-01-07  2:59 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 23:56 [PATCH v2 0/9] Move initializing SEV/SNP functionality to KVM Ashish Kalra
2024-12-16 23:57 ` [PATCH v2 1/9] crypto: ccp: Move dev_info/err messages for SEV/SNP initialization Ashish Kalra
2024-12-27  8:58   ` Alexey Kardashevskiy
2024-12-16 23:57 ` [PATCH v2 2/9] crypto: ccp: Fix implicit SEV/SNP init and shutdown in ioctls Ashish Kalra
2024-12-27  8:59   ` Alexey Kardashevskiy
2024-12-16 23:58 ` [PATCH v2 3/9] crypto: ccp: Reset TMR size at SNP Shutdown Ashish Kalra
2024-12-27  9:07   ` Alexey Kardashevskiy
2025-01-03 17:00     ` Tom Lendacky
2025-01-07  2:59       ` Alexey Kardashevskiy
2024-12-16 23:58 ` [PATCH v2 4/9] crypto: ccp: Register SNP panic notifier only if SNP is enabled Ashish Kalra
2024-12-17 22:51   ` Dionna Amalie Glaze
2024-12-27  9:13   ` Alexey Kardashevskiy
2024-12-16 23:58 ` [PATCH v2 5/9] crypto: ccp: Add new SEV platform shutdown API Ashish Kalra
2024-12-16 23:59 ` [PATCH v2 6/9] crypto: ccp: Add new SEV/SNP " Ashish Kalra
2024-12-16 23:59 ` [PATCH v2 7/9] crypto: ccp: Add new SEV/SNP platform initialization API Ashish Kalra
2024-12-27 10:25   ` Alexey Kardashevskiy
2024-12-16 23:59 ` [PATCH v2 8/9] KVM: SVM: Add support to initialize SEV/SNP functionality in KVM Ashish Kalra
2024-12-27 10:36   ` Alexey Kardashevskiy
2024-12-17  0:00 ` [PATCH v2 9/9] crypto: ccp: Move SEV/SNP Platform initialization to KVM Ashish Kalra
2024-12-27 10:29   ` Alexey Kardashevskiy
2024-12-17 16:00 ` [PATCH v2 0/9] Move initializing SEV/SNP functionality " Dionna Amalie Glaze
2024-12-17 21:16   ` Kalra, Ashish
2024-12-17 21:37     ` Sean Christopherson
2024-12-17 23:16       ` Kalra, Ashish
2024-12-18 18:11         ` Daniel P. Berrangé
2024-12-18 19:10         ` Sean Christopherson
2024-12-19  1:11           ` Kalra, Ashish
2024-12-19 22:04             ` Kalra, Ashish
2024-12-19 23:12               ` Dionna Amalie Glaze
2024-12-20  8:49               ` Daniel P. Berrangé
2024-12-20 16:25                 ` Sean Christopherson
2024-12-20 19:52                   ` Kalra, Ashish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).