From: "Kalra, Ashish" <ashish.kalra@amd.com>
To: Tom Lendacky <thomas.lendacky@amd.com>,
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,
michael.roth@amd.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH 3/3] x86/sev: Add SEV-SNP CipherTextHiding support
Date: Thu, 15 Aug 2024 15:30:58 -0500 [thread overview]
Message-ID: <85d4d61e-b56b-4e8e-ba3d-f239b648f47c@amd.com> (raw)
In-Reply-To: <afafee48-4a74-85a0-8455-640eb2d59948@amd.com>
Hi Tom,
On 8/15/2024 10:58 AM, Tom Lendacky wrote:
>> +
>> static bool psp_dead;
>> static int psp_timeout;
>>
>> @@ -1053,6 +1069,36 @@ static void snp_set_hsave_pa(void *arg)
>> wrmsrl(MSR_VM_HSAVE_PA, 0);
>> }
>>
>> +static void sev_snp_enable_ciphertext_hiding(struct sev_data_snp_init_ex *data, int *error)
>> +{
>> + struct psp_device *psp = psp_master;
>> + struct sev_device *sev;
>> + unsigned int edx;
>> +
>> + sev = psp->sev_data;
>> +
>> + /*
>> + * Check if CipherTextHiding feature is supported and enabled
>> + * in the Platform/BIOS.
>> + */
>> + if (sev->feat_info.ecx & FEAT_CIPHERTEXTHIDING_SUPPORTED &&
>> + sev->snp_plat_status.ciphertext_hiding_cap) {
> I'm not sure you need both checks. Either the platform status or the
> feature info check should be enough. Can you check on that?
>
FEATURE_INFO only indicates if SEV FW is capable of ciphertext hiding and SNP_PLATFORM_STATUS ciphertext_hiding_cap bit indicates if the CTH feature is enabled in BIOS, so both checks are needed.
Thanks, Ashish
prev parent reply other threads:[~2024-08-15 20:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 19:41 [PATCH 0/3] Add SEV-SNP CipherTextHiding feature support Ashish Kalra
2024-08-12 19:42 ` [PATCH 1/3] crypto: ccp: Extend SNP_PLATFORM_STATUS command Ashish Kalra
2024-08-14 21:53 ` Tom Lendacky
2024-08-12 19:42 ` [PATCH 2/3] crypto: ccp: Add support for SNP_FEATURE_INFO command Ashish Kalra
2024-08-14 22:51 ` Tom Lendacky
2024-08-12 19:42 ` [PATCH 3/3] x86/sev: Add SEV-SNP CipherTextHiding support Ashish Kalra
2024-08-15 15:58 ` Tom Lendacky
2024-08-15 20:30 ` Kalra, Ashish [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=85d4d61e-b56b-4e8e-ba3d-f239b648f47c@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
all inboxes | Powered by JetHome®