From: Melody Wang <huibo.wang@amd.com>
To: <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Tom Lendacky <thomas.lendacky@amd.com>,
Melody Wang <huibo.wang@amd.com>
Subject: [PATCH v1 8/8] x86/sev: Indicate that Alternate Injection is supported in the guest
Date: Sat, 29 Aug 2026 03:39:46 +0000 [thread overview]
Message-ID: <b36f4a4b3df092227f8c6d0e1a5ac3a4f5cee3e9.1787973545.git.huibo.wang@amd.com> (raw)
In-Reply-To: <cover.1787973545.git.huibo.wang@amd.com>
Now the Alternate Injection support is complete, add it to the present
SNP features.
Signed-off-by: Melody Wang <huibo.wang@amd.com>
---
arch/x86/boot/compressed/sev.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c
index 479b74c75b4b..cec1ef473691 100644
--- a/arch/x86/boot/compressed/sev.c
+++ b/arch/x86/boot/compressed/sev.c
@@ -197,6 +197,12 @@ bool sev_es_check_ghcb_fault(unsigned long address)
#define SNP_FEATURE_SECURE_AVIC 0
#endif
+#ifdef CONFIG_AMD_ALTERNATE_INJ
+#define SNP_FEATURE_ALTERNATE_INJ MSR_AMD64_SNP_ALTERNATE_INJ
+#else
+#define SNP_FEATURE_ALTERNATE_INJ 0
+#endif
+
/*
* SNP_FEATURES_IMPL is the mask of SNP features that are implemented
* by the guest kernel. As and when a new feature is implemented in the
@@ -204,7 +210,8 @@ bool sev_es_check_ghcb_fault(unsigned long address)
*/
#define SNP_FEATURES_IMPL (MSR_AMD64_SNP_DEBUG_SWAP | \
MSR_AMD64_SNP_SECURE_TSC | \
- SNP_FEATURE_SECURE_AVIC)
+ SNP_FEATURE_SECURE_AVIC | \
+ SNP_FEATURE_ALTERNATE_INJ)
u64 snp_get_unsupported_features(u64 status)
{
--
2.43.0
prev parent reply other threads:[~2026-08-29 3:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 3:39 [PATCH v1 0/8] Alternate Injection: Secure Interrupt Delivery for SEV-SNP Guests - Guest Support Melody Wang
2026-08-29 3:39 ` [PATCH v1 1/8] x86/sev: Make SVSM calls preemption-safe Melody Wang
2026-09-01 1:19 ` Borislav Petkov
2026-09-10 8:53 ` Stefano Garzarella
2026-09-22 2:51 ` Borislav Petkov
2026-08-29 3:39 ` [PATCH v1 2/8] x86/sev: Add support for Alternate Injection Melody Wang
2026-09-03 0:44 ` Borislav Petkov
2026-08-29 3:39 ` [PATCH v1 3/8] x86/apic: Add an SVSM APIC driver Melody Wang
2026-09-06 2:09 ` Borislav Petkov
2026-08-29 3:39 ` [PATCH v1 4/8] x86/sev: Route unsupported APIC register accesses to the hypervisor APIC emulation Melody Wang
2026-09-09 0:30 ` Borislav Petkov
2026-08-29 3:39 ` [PATCH v1 5/8] x86/sev: Add a function to contain all SEV-specific setup operations Melody Wang
2026-09-09 19:54 ` Borislav Petkov
2026-08-29 3:39 ` [PATCH v1 6/8] x86/sev: Register the guest with the SVSM APIC protocol Melody Wang
2026-09-10 1:34 ` Borislav Petkov
2026-08-29 3:39 ` [PATCH v1 7/8] x86/sev: Allow the guest to configure interrupt vectors for the hypervisor Melody Wang
2026-09-11 3:27 ` Borislav Petkov
2026-08-29 3:39 ` Melody Wang [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=b36f4a4b3df092227f8c6d0e1a5ac3a4f5cee3e9.1787973545.git.huibo.wang@amd.com \
--to=huibo.wang@amd.com \
--cc=linux-kernel@vger.kernel.org \
--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®