aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2023-08-08 15:04:17 -0700
committerDave Hansen <[email protected]>2023-08-09 11:58:34 -0700
commit0fa075769cd4af9c568044973e7bdf430cc7c158 (patch)
tree5899d0e3f38f84e75bee3af421b681c4032d28aa
parent670c04add6e1a22de7c59e282c138ddcf6c9e5a2 (diff)
x86/apic: Wrap apic->native_eoi() into a helper
Prepare for converting the hotpath APIC callbacks to static calls. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Tested-by: Michael Kelley <[email protected]> Tested-by: Sohil Mehta <[email protected]> Tested-by: Juergen Gross <[email protected]> # Xen PV (dom0 and unpriv. guest)
-rw-r--r--arch/x86/include/asm/apic.h6
-rw-r--r--arch/x86/kernel/kvm.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 6ad35741653d..5d98c4b1a735 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -359,6 +359,11 @@ static inline void apic_eoi(void)
apic->eoi();
}
+static inline void apic_native_eoi(void)
+{
+ apic->native_eoi();
+}
+
static inline u64 apic_icr_read(void)
{
return apic->icr_read();
@@ -397,6 +402,7 @@ static inline void apic_icr_write(u32 low, u32 high) { }
static inline void apic_wait_icr_idle(void) { }
static inline u32 safe_apic_wait_icr_idle(void) { return 0; }
static inline void apic_set_eoi_cb(void (*eoi)(void)) {}
+static inline void apic_native_eoi(void) { WARN_ON_ONCE(1); }
#endif /* CONFIG_X86_LOCAL_APIC */
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index f5339e31b440..54625a4f6142 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -343,7 +343,7 @@ static notrace void kvm_guest_apic_eoi_write(void)
*/
if (__test_and_clear_bit(KVM_PV_EOI_BIT, this_cpu_ptr(&kvm_apic_eoi)))
return;
- apic->native_eoi();
+ apic_native_eoi();
}
static void kvm_guest_cpu_init(void)