]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
x86: irq: unconditionally define KVM interrupt vectors
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 23 Feb 2024 10:17:53 +0000 (05:17 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 23 Feb 2024 10:23:14 +0000 (05:23 -0500)
Unlike arch/x86/kernel/idt.c, FRED support chose to remove the #ifdefs
from the .c files and concentrate them in the headers, where unused
handlers are #define'd to NULL.

However, the constants for KVM's 3 posted interrupt vectors are still
defined conditionally in irq_vectors.h.  In the tree that FRED support was
developed on, this is innocuous because CONFIG_HAVE_KVM was effectively
always set.  With the cleanups that recently went into the KVM tree to
remove CONFIG_HAVE_KVM, the conditional became IS_ENABLED(CONFIG_KVM).
This causes a linux-next compilation failure in FRED code, when
CONFIG_KVM=n.

In preparation for the merging of FRED in Linux 6.9, define the interrupt
vector numbers unconditionally.

Cc: x86@kernel.org
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Suggested-by: Xin Li (Intel) <xin@zytor.com>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/irq_vectors.h

index 3f73ac3ed3a0709a700ae927bca01069a1910665..d18bfb238f660fcccdfdf444a60720f03163e4d5 100644 (file)
 #define HYPERVISOR_CALLBACK_VECTOR     0xf3
 
 /* Vector for KVM to deliver posted interrupt IPI */
-#if IS_ENABLED(CONFIG_KVM)
 #define POSTED_INTR_VECTOR             0xf2
 #define POSTED_INTR_WAKEUP_VECTOR      0xf1
 #define POSTED_INTR_NESTED_VECTOR      0xf0
-#endif
 
 #define MANAGED_IRQ_SHUTDOWN_VECTOR    0xef