From: sashiko-bot@kernel.org
To: "Jim Mattson" <jmattson@google.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: nSVM: Gate CET state copy in svm_copy_vmrun_state() on guest SHSTK
Date: Thu, 12 Nov 2026 21:32:53 +0000 [thread overview]
Message-ID: <sashiko-outbox-211867@kernel.org> (raw)
In-Reply-To: <20261112212628.265262-1-jmattson@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] KVM: nSVM: undeclared vcpu in svm_copy_vmrun_state() breaks
build
--
commit 11b89023661c173dccf1cc07088879a6b4ff0bef
Author: Jim Mattson <jmattson@google.com>
KVM: nSVM: Gate CET state copy in svm_copy_vmrun_state() on guest SHSTK
This commit changes svm_copy_vmrun_state() to check
guest_cpu_cap_has(vcpu, X86_FEATURE_SHSTK) instead of
kvm_cpu_cap_has(X86_FEATURE_SHSTK) before copying CET shadow stack fields.
> diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
> index f9090b601efaa..2a1c279bd54a1 100644
> --- a/arch/x86/kvm/svm/nested.c
> +++ b/arch/x86/kvm/svm/nested.c
> @@ -1218,7 +1218,7 @@ void svm_copy_vmrun_state(struct vmcb_save_area *to_save,
> to_save->rip = from_save->rip;
> to_save->cpl = 0;
>
> - if (kvm_cpu_cap_has(X86_FEATURE_SHSTK)) {
> + if (guest_cpu_cap_has(vcpu, X86_FEATURE_SHSTK)) {
> to_save->s_cet = from_save->s_cet;
> to_save->isst_addr = from_save->isst_addr;
> to_save->ssp = from_save->ssp;
[Severity: High]
Does this fail to build because vcpu is undeclared in
svm_copy_vmrun_state()? The function only takes to_save and from_save, so
its signature and callers in svm_set_nested_state(), svm_enter_smm(), and
svm_leave_smm() need to pass vcpu as well.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112212628.265262-1-jmattson@google.com?part=1
next prev parent reply other threads:[~2026-11-12 21:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 21:26 [PATCH] KVM: nSVM: Gate CET state copy in svm_copy_vmrun_state() on guest SHSTK Jim Mattson
2026-11-12 21:32 ` sashiko-bot [this message]
2026-11-12 22:22 ` Jim Mattson
2026-11-12 22:41 ` Yosry Ahmed
2026-11-12 23:16 ` Jim Mattson
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=sashiko-outbox-211867@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.