From: Kim Phillips <kim.phillips@amd.com>
To: "Gupta, Pankaj" <pankaj.gupta@amd.com>, <kvm@vger.kernel.org>,
<linux-coco@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
Michael Roth <michael.roth@amd.com>,
Ashish Kalra <ashish.kalra@amd.com>,
"Nikunj A . Dadhania" <nikunj@amd.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Sean Christopherson <seanjc@google.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
"Kishon Vijay Abraham I" <kvijayab@amd.com>
Subject: Re: [PATCH v4 2/2] KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field
Date: Thu, 6 Mar 2025 17:04:03 -0600 [thread overview]
Message-ID: <19388b93-c311-4671-902c-096ad1b04650@amd.com> (raw)
In-Reply-To: <85d324ff-a1d3-4d7c-ae2c-68588b12deb3@amd.com>
On 3/5/25 11:28 PM, Gupta, Pankaj wrote:
> On 3/6/2025 1:38 AM, Kim Phillips wrote:
>> diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
>> index 9b7fa99ae951..b382fd251e5b 100644
>> --- a/arch/x86/include/asm/svm.h
>> +++ b/arch/x86/include/asm/svm.h
>> @@ -159,7 +159,10 @@ struct __attribute__ ((__packed__))
>> vmcb_control_area {
>> u64 avic_physical_id; /* Offset 0xf8 */
>> u8 reserved_7[8];
>> u64 vmsa_pa; /* Used for an SEV-ES guest */
>> - u8 reserved_8[720];
>> + u8 reserved_8[40];
>> + u64 allowed_sev_features; /* Offset 0x138 */
>> + u64 guest_sev_features; /* Offset 0x140 */
>
> Just thinking, if dumping error in logs would be
> useful for Admin in case of failure Or maybe we
> want to leave this to userspace?
Agreed. I'll add the following in the next version:
[ 435.580838] kvm_amd: allowed_sev_features:8000000000000001
[ 435.587738] kvm_amd: guest_sev_features: 0000000000000081
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 8abeab91d329..bff6e9c34586 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -3435,6 +3435,8 @@ static void dump_vmcb(struct kvm_vcpu *vcpu)
pr_err("%-20s%016llx\n", "avic_logical_id:", control->avic_logical_id);
pr_err("%-20s%016llx\n", "avic_physical_id:", control->avic_physical_id);
pr_err("%-20s%016llx\n", "vmsa_pa:", control->vmsa_pa);
+ pr_err("%-20s%016llx\n", "allowed_sev_features:", control->allowed_sev_features);
+ pr_err("%-20s%016llx\n", "guest_sev_features:", control->guest_sev_features);
pr_err("VMCB State Save Area:\n");
pr_err("%-5s s: %04x a: %04x l: %08x b: %016llx\n",
"es:",
Thank you for your review!
Kim
next prev parent reply other threads:[~2025-03-06 23:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 0:38 [PATCH v4 0/2] KVM: SEV: Add support for the ALLOWED_SEV_FEATURES feature Kim Phillips
2025-03-06 0:38 ` [PATCH v4 1/2] x86/cpufeatures: Add "Allowed SEV Features" Feature Kim Phillips
2025-03-06 5:28 ` Gupta, Pankaj
2025-03-06 16:59 ` Borislav Petkov
2025-03-06 0:38 ` [PATCH v4 2/2] KVM: SEV: Configure "ALLOWED_SEV_FEATURES" VMCB Field Kim Phillips
2025-03-06 5:28 ` Gupta, Pankaj
2025-03-06 23:04 ` Kim Phillips [this message]
2025-03-06 19:27 ` Tom Lendacky
2025-03-06 23:04 ` Kim Phillips
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=19388b93-c311-4671-902c-096ad1b04650@amd.com \
--to=kim.phillips@amd.com \
--cc=ashish.kalra@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvijayab@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=nikunj@amd.com \
--cc=pankaj.gupta@amd.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
/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®