From: Ashish Kalra <Ashish.Kalra@amd.com>
To: <seanjc@google.com>, <pbonzini@redhat.com>, <tglx@linutronix.de>,
<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>,
<hpa@zytor.com>, <herbert@gondor.apana.org.au>
Cc: <x86@kernel.org>, <john.allen@amd.com>, <davem@davemloft.net>,
<thomas.lendacky@amd.com>, <michael.roth@amd.com>,
<kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-crypto@vger.kernel.org>
Subject: [PATCH v3 0/4] Add SEV-SNP CipherTextHiding feature support
Date: Tue, 22 Apr 2025 00:24:00 +0000 [thread overview]
Message-ID: <cover.1745279916.git.ashish.kalra@amd.com> (raw)
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 two new module parameters to the KVM module
to enable SNP CipherTextHiding support and 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.
v3:
- rebase to linux-next.
- rebase on top of support to move SEV-SNP initialization to
KVM module from CCP driver.
- Split CipherTextHiding support between CCP driver and KVM module
with KVM module calling into CCP driver to initialize SNP with
CipherTextHiding enabled and MAX ASID usable for SNP guest if
KVM is enabling CipherTextHiding feature.
- Move module parameters to enable CipherTextHiding feature and
MAX ASID usable for SNP guests from CCP driver to KVM module
which allows KVM to be responsible for enabling CipherTextHiding
feature if end-user requests it.
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 (4):
crypto: ccp: New bit-field definitions for SNP_PLATFORM_STATUS command
crypto: ccp: Add support for SNP_FEATURE_INFO command
crypto: ccp: Add support to enable CipherTextHiding on SNP_INIT_EX
KVM: SVM: Add SEV-SNP CipherTextHiding support
arch/x86/kvm/svm/sev.c | 50 ++++++++++++++++++++---
drivers/crypto/ccp/sev-dev.c | 78 ++++++++++++++++++++++++++++++++++--
drivers/crypto/ccp/sev-dev.h | 3 ++
include/linux/psp-sev.h | 47 +++++++++++++++++++++-
include/uapi/linux/psp-sev.h | 10 ++++-
5 files changed, 177 insertions(+), 11 deletions(-)
--
2.34.1
next reply other threads:[~2025-04-22 0:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 0:24 Ashish Kalra [this message]
2025-04-22 0:24 ` [PATCH v3 1/4] crypto: ccp: New bit-field definitions for SNP_PLATFORM_STATUS command Ashish Kalra
2025-04-22 0:24 ` [PATCH v3 2/4] crypto: ccp: Add support for SNP_FEATURE_INFO command Ashish Kalra
2025-04-23 21:21 ` Tom Lendacky
2025-04-24 14:38 ` Francesco Lavra
2025-04-22 0:25 ` [PATCH v3 3/4] crypto: ccp: Add support to enable CipherTextHiding on SNP_INIT_EX Ashish Kalra
2025-04-23 22:19 ` Tom Lendacky
2025-05-07 5:44 ` kernel test robot
2025-04-22 0:25 ` [PATCH v3 4/4] KVM: SVM: Add SEV-SNP CipherTextHiding support Ashish Kalra
2025-04-23 21:15 ` Sean Christopherson
2025-04-25 19:46 ` Kalra, Ashish
2025-04-26 0:00 ` Sean Christopherson
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=cover.1745279916.git.ashish.kalra@amd.com \
--to=ashish.kalra@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=john.allen@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.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 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).