From: sashiko-bot@kernel.org
To: "Jörg Rödel" <joro@8bytes.org>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v2 2/8] KVM: SVM: Implement GET_AP_APIC_IDS NAE event
Date: Tue, 08 Sep 2026 10:51:04 +0000 [thread overview]
Message-ID: <20260908105104.D57211F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908103338.427254-3-joro@8bytes.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The new SVM_VMGEXIT_GET_APIC_IDS feature is unconditionally enabled and advertised to the guest, breaking the default-off policy and live migration capability.
--
commit b3798f7802c495f4483b09adbdba116cdb452f71
Author: Joerg Roedel <joerg.roedel@amd.com>
KVM: SVM: Implement GET_AP_APIC_IDS NAE event
This commit implements the GHCB APIC ID list feature to allow SNP guests to
discover vCPUs needing VMSAs without INIT-SIPI. It handles undersized buffers
and copies online vCPU APIC IDs to guest memory.
> diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
> index 5705723f1f412..c16eca9983f37 100644
> --- a/arch/x86/kvm/svm/sev.c
> +++ b/arch/x86/kvm/svm/sev.c
> @@ -40,7 +40,9 @@
> #define GHCB_VERSION_MAX 2ULL
> #define GHCB_VERSION_MIN 1ULL
>
> -#define GHCB_HV_FT_SUPPORTED (GHCB_HV_FT_SNP | GHCB_HV_FT_SNP_AP_CREATION)
> +#define GHCB_HV_FT_SUPPORTED (GHCB_HV_FT_SNP | \
> + GHCB_HV_FT_SNP_AP_CREATION | \
> + GHCB_HV_FT_APIC_ID_LIST)
[Severity: High]
Does unconditionally adding GHCB_HV_FT_APIC_ID_LIST bypass userspace
capability negotiation?
KVM subsystem guidelines mandate that any new behavior the guest can observe
must be off by default and discoverable through the architecture's standard
enumeration interface.
If a VM boots on a kernel with this patch, observes the feature via the
GHCB_MSR_HV_FT_REQ MSR, and is then live-migrated to an older kernel that
lacks support, could it cause the VM to crash when it attempts to use the
NAE event? Should this feature require explicit opt-in from host userspace
(e.g., via a KVM_CAP_ check) before advertising it to the guest?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908103338.427254-1-joro@8bytes.org?part=2
next prev parent reply other threads:[~2026-09-08 10:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 10:33 [PATCH v2 0/8] KVM: SVM: Support direct setting of VMSA for SEV-SNP guests Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 1/8] KVM: SEV: Document SNP direct VMSA userspace ABI Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 2/8] KVM: SVM: Implement GET_AP_APIC_IDS NAE event Jörg Rödel
2026-09-08 10:51 ` sashiko-bot [this message]
2026-09-08 10:33 ` [PATCH v2 3/8] KVM: SVM: Hold SRCU while reloading guest-owned VMSAs Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 4/8] KVM: SEV: Add direct VMSA capability Jörg Rödel
2026-09-08 10:53 ` sashiko-bot
2026-09-08 10:33 ` [PATCH v2 5/8] KVM: SEV: Allow VMSA pages in SNP launch updates Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 6/8] KVM: SEV: Add SNP vCPU state get and set commands Jörg Rödel
2026-09-08 10:49 ` sashiko-bot
2026-09-08 10:33 ` [PATCH v2 7/8] KVM: selftests: Test the SNP APIC-ID-list GHCB request Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 8/8] KVM: selftests: Test SNP vCPU state and direct VMSA launch Jörg Rödel
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=20260908105104.D57211F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=joro@8bytes.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox