]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/apic: Add update_vector() callback for APIC drivers
authorNeeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Thu, 28 Aug 2025 11:02:42 +0000 (16:32 +0530)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 1 Sep 2025 10:36:46 +0000 (12:36 +0200)
commit60791ef3751cb0ceccd6f5ac98276153745c7980
treeaa29cf247fc196ff49e05677865cd88c6a824a9a
parent45e2cef568cdf87cb06c9783b45c8f08d1ab1cec
x86/apic: Add update_vector() callback for APIC drivers

Add an update_vector() callback to allow APIC drivers to perform driver
specific operations on external vector allocation/teardown on a CPU. This
callback will be used by the Secure AVIC APIC driver to configure the vectors
which a guest vCPU allows the hypervisor to send to it.

As system vectors have fixed vector assignments and are not dynamically
allocated, add an apic_update_vector() public API to facilitate
update_vector() callback invocation for them. This will be used for Secure
AVIC enabled guests to allow the hypervisor to inject system vectors which are
emulated by the hypervisor such as APIC timer vector and
HYPERVISOR_CALLBACK_VECTOR.

While at it, cleanup line break in apic_update_irq_cfg().

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>
Link: https://lore.kernel.org/20250828110255.208779-3-Neeraj.Upadhyay@amd.com
arch/x86/include/asm/apic.h
arch/x86/kernel/apic/vector.c