linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add SEV-SNP CipherTextHiding feature support
@ 2024-09-17 20:15 Ashish Kalra
  2024-09-17 20:16 ` [PATCH v2 1/3] crypto: ccp: New bit-field definitions for SNP_PLATFORM_STATUS command Ashish Kalra
                   ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Ashish Kalra @ 2024-09-17 20:15 UTC (permalink / raw)
  To: seanjc, pbonzini, tglx, mingo, bp, dave.hansen, hpa, herbert
  Cc: x86, john.allen, davem, thomas.lendacky, michael.roth, kvm,
	linux-kernel, linux-crypto

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

Ciphertext hiding prevents host accesses from reading the ciphertext
of SNP guest private memory. Instead of reading ciphertext, the host
will see constant default values (0xff).

Ciphertext hiding separates the ASID space into SNP guest ASIDs and 
host ASIDs. All SNP active guests must have an ASID less than or
equal to MAX_SNP_ASID provided to the SNP_INIT_EX command.
All SEV-legacy guests must be greater than MAX_SNP_ASID.

This patch-set adds a new module parameter to the CCP driver defined
as psp_max_snp_asid which is a user configurable MAX_SNP_ASID to
define the system-wide maximum SNP ASID value. If this value is
not set, then the ASID space is equally divided between SEV-SNP
and SEV-ES guests.

v2:
- Fix and add more description to commit logs.
- Rename sev_cache_snp_platform_status_and_discover_features() to 
snp_get_platform_data().
- Add check in snp_get_platform_data to guard against being called
after SNP_INIT_EX.
- Fix comments for new structure field definitions being added.
- Fix naming for new structure being added.
- Add new vm-type parameter to sev_asid_new().
- Fix identation.
- Rename CCP module parameters psp_cth_enabled to cipher_text_hiding and 
psp_max_snp_asid to max_snp_asid.
- Rename max_snp_asid to snp_max_snp_asid. 

Ashish Kalra (3):
  crypto: ccp: New bit-field definitions for SNP_PLATFORM_STATUS command
  crypto: ccp: Add support for SNP_FEATURE_INFO command
  x86/sev: Add SEV-SNP CipherTextHiding support

 arch/x86/kvm/svm/sev.c       | 26 ++++++++--
 drivers/crypto/ccp/sev-dev.c | 99 ++++++++++++++++++++++++++++++++++++
 drivers/crypto/ccp/sev-dev.h |  3 ++
 include/linux/psp-sev.h      | 41 ++++++++++++++-
 include/uapi/linux/psp-sev.h | 10 +++-
 5 files changed, 171 insertions(+), 8 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2024-12-12  0:03 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-17 20:15 [PATCH v2 0/3] Add SEV-SNP CipherTextHiding feature support Ashish Kalra
2024-09-17 20:16 ` [PATCH v2 1/3] crypto: ccp: New bit-field definitions for SNP_PLATFORM_STATUS command Ashish Kalra
2024-10-01 21:40   ` Peter Gonda
2024-10-02 18:52   ` Tom Lendacky
2024-09-17 20:16 ` [PATCH v2 2/3] crypto: ccp: Add support for SNP_FEATURE_INFO command Ashish Kalra
2024-10-02 21:18   ` Tom Lendacky
2024-10-02 21:19     ` Tom Lendacky
2024-10-02 21:40       ` Kalra, Ashish
2024-10-02 21:49         ` Tom Lendacky
2024-09-17 20:16 ` [PATCH v2 3/3] x86/sev: Add SEV-SNP CipherTextHiding support Ashish Kalra
2024-10-02 14:58   ` Peter Gonda
2024-10-02 18:44     ` Kalra, Ashish
2024-10-03 14:04       ` Peter Gonda
2024-10-03 22:09         ` Ashish Kalra
2024-10-11 16:04       ` Sean Christopherson
2024-11-20  3:14         ` Kalra, Ashish
2024-11-20 21:53           ` Sean Christopherson
2024-11-20 23:43             ` Kalra, Ashish
2024-11-21 14:57               ` Kalra, Ashish
2024-11-21 16:56                 ` Sean Christopherson
2024-11-21 17:24                   ` Tom Lendacky
2024-11-21 17:42                     ` Sean Christopherson
2024-11-21 21:00                       ` Kalra, Ashish
2024-12-06 22:30                         ` Sean Christopherson
2024-12-07  5:21                           ` Kalra, Ashish
2024-12-10  1:30                             ` Sean Christopherson
2024-12-10 21:32                               ` Kalra, Ashish
2024-12-10 22:57                                 ` Sean Christopherson
2024-12-11  0:48                                   ` Kalra, Ashish
2024-12-11  1:01                                     ` Kalra, Ashish
2024-12-12  0:02                                       ` Kalra, Ashish
2024-10-02 21:46   ` Tom Lendacky
2024-10-02 21:52   ` Tom Lendacky
2024-10-11 16:10   ` Sean Christopherson

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