mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kim Phillips <kim.phillips@amd.com>
To: "Kalra, Ashish" <ashish.kalra@amd.com>,
	Randy Dunlap <rdunlap@infradead.org>, <corbet@lwn.net>,
	<seanjc@google.com>, <pbonzini@redhat.com>, <tglx@linutronix.de>,
	<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>,
	<x86@kernel.org>, <hpa@zytor.com>, <thomas.lendacky@amd.com>,
	<herbert@gondor.apana.org>
Cc: <akpm@linux-foundation.org>, <rostedt@goodmis.org>,
	<paulmck@kernel.org>, <michael.roth@amd.com>,
	<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<kvm@vger.kernel.org>
Subject: Re: [PATCH v9 2/2] KVM: SEV: Add SEV-SNP CipherTextHiding support
Date: Thu, 21 Aug 2025 06:06:57 -0500	[thread overview]
Message-ID: <46cf87e2-8100-47ef-b19e-f6a1b76f660d@amd.com> (raw)
In-Reply-To: <db253af8-1248-4d68-adec-83e318924cd8@amd.com>

On 8/21/25 5:58 AM, Kalra, Ashish wrote:
> On 8/21/2025 5:30 AM, Kim Phillips wrote:
>> On 8/20/25 6:23 PM, Kalra, Ashish wrote:
>>> On 8/20/2025 5:45 PM, Randy Dunlap wrote:
>>>> On 8/20/25 1:50 PM, Ashish Kalra wrote:
>>>>> @@ -3064,10 +3070,32 @@ void __init sev_hardware_setup(void)
>>>>>    out:
>>>>>        if (sev_enabled) {
>>>>>            init_args.probe = true;
>>>>> +
>>>>> +        if (sev_is_snp_ciphertext_hiding_supported())
>>>>> +            init_args.max_snp_asid = min(nr_ciphertext_hiding_asids,
>>>>> +                             min_sev_asid - 1);
>>>>> +
>>>>>            if (sev_platform_init(&init_args))
>>>>>                sev_supported = sev_es_supported = sev_snp_supported = false;
>>>>>            else if (sev_snp_supported)
>>>>>                sev_snp_supported = is_sev_snp_initialized();
>>>>> +
>>>>> +        if (sev_snp_supported)
>>>>> +            nr_ciphertext_hiding_asids = init_args.max_snp_asid;
>>>>> +
>>>>> +        /*
>>>>> +         * If ciphertext hiding is enabled, the joint SEV-ES/SEV-SNP
>>>>> +         * ASID range is partitioned into separate SEV-ES and SEV-SNP
>>>>> +         * ASID ranges, with the SEV-SNP range being [1..max_snp_asid]
>>>>> +         * and the SEV-ES range being [max_snp_asid..max_sev_es_asid].
>>>>                                        [max_snp_asid + 1..max_sev_es_asid]
>>>> ?
>>> Yes.
>> So why wouldn't you have left Sean's original "(max_snp_asid..max_sev_es_asid]" as-is?
>>
>> Kim
>>
> Because that i believe is a typo and the correct SEV-ES range is [max_snp_asid + 1..max_sev_es_asid].

It's not, though.

[max_snp_asid..max_sev_es_asid]

and

(max_snp_asid..max_sev_es_asid]

are two completely different things.


You also modified Sean's Documentation/ changes.  A consistent "joint 
SEV-ES+SEV-SNP" is preferred.

Thanks,

Kim

  reply	other threads:[~2025-08-21 11:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 20:49 [PATCH v9 0/2] Add SEV-SNP CipherTextHiding feature support Ashish Kalra
2025-08-20 20:50 ` [PATCH v9 1/2] KVM: SEV: Introduce new min,max sev_es and sev_snp asid variables Ashish Kalra
2025-08-20 20:50 ` [PATCH v9 2/2] KVM: SEV: Add SEV-SNP CipherTextHiding support Ashish Kalra
2025-08-20 22:45   ` Randy Dunlap
2025-08-20 23:23     ` Kalra, Ashish
2025-08-21 10:30       ` Kim Phillips
2025-08-21 10:58         ` Kalra, Ashish
2025-08-21 11:06           ` Kim Phillips [this message]
2025-08-21 14:16             ` Sean Christopherson
2025-08-21 15:21               ` Kalra, Ashish
2025-09-19  0:10 ` [PATCH v9 0/2] Add SEV-SNP CipherTextHiding feature support 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=46cf87e2-8100-47ef-b19e-f6a1b76f660d@amd.com \
    --to=kim.phillips@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=ashish.kalra@amd.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=herbert@gondor.apana.org \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --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®