]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/apic: Add new driver for Secure AVIC
authorNeeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Thu, 28 Aug 2025 07:03:17 +0000 (12:33 +0530)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 28 Aug 2025 15:57:19 +0000 (17:57 +0200)
commit30c2b98aa84c76f2ae60e66dd4ec2d9497713359
treee83949c919410e4a1a9306bd938d559821c02f6f
parent1b558e14f3c17dc29ce2e8cd0b8bd385e108734b
x86/apic: Add new driver for Secure AVIC

The Secure AVIC feature provides SEV-SNP guests hardware acceleration for
performance sensitive APIC accesses while securely managing the guest-owned
APIC state through the use of a private APIC backing page.

This helps prevent the hypervisor from generating unexpected interrupts for
a vCPU or otherwise violate architectural assumptions around the APIC
behavior.

Add a new x2APIC driver that will serve as the base of the Secure AVIC
support. It is initially the same as the x2APIC physical driver (without IPI
callbacks), but will be modified as features are implemented.

As the new driver does not implement Secure AVIC features yet, if the
hypervisor sets the Secure AVIC bit in SEV_STATUS, maintain the existing
behavior to enforce the guest termination.

  [ bp: Massage commit message. ]

Co-developed-by: Kishon Vijay Abraham I <kvijayab@amd.com>
Signed-off-by: Kishon Vijay Abraham I <kvijayab@amd.com>
Signed-off-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tianyu Lan <tiala@microsoft.com>
Link: https://lore.kernel.org/20250828070334.208401-2-Neeraj.Upadhyay@amd.com
arch/x86/Kconfig
arch/x86/boot/compressed/sev.c
arch/x86/coco/core.c
arch/x86/coco/sev/core.c
arch/x86/include/asm/msr-index.h
arch/x86/kernel/apic/Makefile
arch/x86/kernel/apic/x2apic_savic.c [new file with mode: 0644]
include/linux/cc_platform.h