From: Sean Christopherson <seanjc@google.com>
To: John Allen <john.allen@amd.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
x86@kernel.org, pbonzini@redhat.com, dave.hansen@intel.com,
rick.p.edgecombe@intel.com, mlevitsk@redhat.com,
weijiang.yang@intel.com, chao.gao@intel.com, bp@alien8.de,
dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com,
tglx@linutronix.de, thomas.lendacky@amd.com
Subject: Re: [PATCH v4 0/5] Enable Shadow Stack Virtualization for SVM
Date: Mon, 15 Sep 2025 09:46:48 -0700 [thread overview]
Message-ID: <aMhC-EkMW0XSxxk6@google.com> (raw)
In-Reply-To: <aMgoGLL65vUPGYW0@AUSJOHALLEN.amd.com>
On Mon, Sep 15, 2025, John Allen wrote:
> On Fri, Sep 12, 2025 at 03:54:31PM -0700, Sean Christopherson wrote:
> > On Mon, Sep 08, 2025, John Allen wrote:
> > > This series adds support for shadow stack in SVM guests
> > ^
> > |
> > some
> >
> > I mean, who cares about nested, right?
> >
> > Sorry for being snippy, but I am more than a bit peeved that we're effectively
> > on revision 6 of this series, and apparently no one has thought to do even basic
> > tested of nested SVM.
>
> Hi Sean,
>
> I have been testing nested with this feature (or so I thought).
The issue here is that Linux only supports shadow stacks at CPL3, i.e. only
exercises MSR_IA32_U_CET, and for whatever reason the KVM-Unit-Test only tests
MSR_IA32_U_CET too (and is stupidly not compatible with AMD due to requiring
SHSTK *and* IBT). So just running those in nested won't provide any coverage
for S_CET.
> Can you explain what you did to test and what wasn't working?
Read/write MSR_IA32_S_CET to a non-zero value from L2 by running the proposed
selftest[*] in L1. Because KVM doesn't propagate S_CET to/from vmcb12, the
writes from L2 are effectively lost.
An ever better way to cover this would be a selftest or KUT test to explicitly
read/write MSRs in L2, and/or fill vmcs12/vmcb12 from L1 and verify L2 sees the
desired value.
https://lore.kernel.org/all/20250912232319.429659-37-seanjc@google.com
> Apologies, and thanks for taking the time to look into the problem.
No worries, I didn't intend to single you out, I was essentially just yelling at
everyone involved :-)
prev parent reply other threads:[~2025-09-15 16:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-08 20:17 [PATCH v4 0/5] Enable Shadow Stack Virtualization for SVM John Allen
2025-09-08 20:17 ` [PATCH v4 1/5] KVM: x86: SVM: Emulate reads and writes to shadow stack MSRs John Allen
2025-09-12 22:55 ` Sean Christopherson
2025-09-08 20:17 ` [PATCH v4 2/5] KVM: x86: SVM: Update dump_vmcb with shadow stack save area additions John Allen
2025-09-08 20:17 ` [PATCH v4 3/5] KVM: x86: SVM: Pass through shadow stack MSRs John Allen
2025-09-08 20:17 ` [PATCH v4 4/5] KVM: SVM: Add MSR_IA32_XSS to the GHCB for hypervisor kernel John Allen
2025-09-10 21:24 ` Sean Christopherson
2025-09-11 15:23 ` John Allen
2025-09-08 20:17 ` [PATCH v4 5/5] KVM: SVM: Enable shadow stack virtualization for SVM John Allen
2025-09-12 22:54 ` [PATCH v4 0/5] Enable Shadow Stack Virtualization " Sean Christopherson
2025-09-15 14:52 ` John Allen
2025-09-15 16:46 ` Sean Christopherson [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=aMhC-EkMW0XSxxk6@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=chao.gao@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=john.allen@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=weijiang.yang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.