[PATCH v1 0/8] Alternate Injection: Secure Interrupt Delivery for SEV-SNP Guests - Guest Support
From: Melody Wang
Date: Fri Aug 28 2026 - 23:40:17 EST
Hi all,
The revision fixes all of the review comments from version 0.
The changes include:
1. Changed a few commit messages, new file names, variables name and order,
function names and more comments for better understanding.
2. Added a pre-patch to fix the problem that in two functions in the the SVSM
vTPM guest implementation do not disable preemption when fetching CAA. It
is moving the CAA fetching operation inside svsm_perform_call_protocol().
This series relies on this fix too.
3. Removed svsm_do_call() helper function and some intermediary layer
functions in SVSM APIC driver.
4. Removed the Secure AVIC check in SVSM APIC driver since it will never be
touched.
5. Terminate boot when Alternate Injection is enabled in vmpl0.
6. Added a common function for SVSM APIC read and write.
7. Added a new SEV_TERM_SET_LINUX value for Alternate Injection and APIC ghcb
msr read/write.
8. Reworked sev_prepare() to reflect the error confitions correctly.
9. Moved allowing all of interrupts right after registering the SVSM APIC
protocol.
Thanks,
Melody
Changelog:
v0
--
Alternate Injection is a method to provide secure interrupt delivery for
SEV-SNP guests against malicious injection attacks. By handing over the
control of the interrupt injection to the guest itself, the security is
applied. Alternate Injection use Secure VM Service Module (SVSM), and APIC
emulation in the SVSM to secure interrupt delivery.
This is the guest side patches. The patch set includes the following:
1. Add support for enabling Alternate Injection.
2. Add support for the SVSM APIC protocol which uses a subset of the
X2APIC MSRs.
3. Add support to allow the guest OS to request Alternate
Injection.
Melody Wang (8):
x86/sev: Make SVSM calls preemption-safe
x86/sev: Add support for Alternate Injection
x86/apic: Add an SVSM APIC driver
x86/sev: Route unsupported APIC register accesses to the hypervisor
APIC emulation
x86/sev: Add a function to contain all SEV-specific setup operations
x86/sev: Register the guest with the SVSM APIC protocol
x86/sev: Allow the guest to configure interrupt vectors for the
hypervisor
x86/sev: Indicate that Alternate Injection is supported in the guest
arch/x86/Kconfig | 14 ++
arch/x86/boot/compressed/sev.c | 49 ++++-
arch/x86/boot/compressed/sev.h | 13 ++
arch/x86/coco/core.c | 3 +
arch/x86/coco/sev/core.c | 14 +-
arch/x86/coco/sev/svsm.c | 11 +-
arch/x86/include/asm/cpufeatures.h | 1 +
arch/x86/include/asm/msr-index.h | 4 +-
arch/x86/include/asm/sev-common.h | 2 +
arch/x86/include/asm/sev.h | 20 +-
arch/x86/kernel/apic/Makefile | 1 +
arch/x86/kernel/apic/x2apic_savic.c | 8 +-
arch/x86/kernel/apic/x2apic_svsm.c | 236 ++++++++++++++++++++++++
drivers/firmware/efi/libstub/x86-stub.c | 17 +-
include/linux/cc_platform.h | 8 +
15 files changed, 366 insertions(+), 35 deletions(-)
create mode 100644 arch/x86/kernel/apic/x2apic_svsm.c
--
2.43.0