[patch 49/58] x86/apic: Wrap apic->native_eoi() into a helper

From: Thomas Gleixner
Date: Mon Jul 17 2023 - 19:20:40 EST


Prepare for converting the hotpath APIC callbacks to static calls.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
arch/x86/include/asm/apic.h | 5 +++++
arch/x86/kernel/kvm.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)

--- 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();
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -343,7 +343,7 @@ static notrace void kvm_guest_apic_eoi_w
*/
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)