On Tue, Apr 30, 2019 at 11:45:25AM +0800, Zhao Yakui wrote:
@@ -30,6 +36,29 @@ static bool acrn_x2apic_available(void)
return false;
}
+static void (*acrn_intr_handler)(void);
+
+__visible void __irq_entry acrn_hv_vector_handler(struct pt_regs *regs)
+{
+ struct pt_regs *old_regs = set_irq_regs(regs);
+
+ /*
+ * The hypervisor requires that the APIC EOI should be acked.
+ * If the APIC EOI is not acked, the APIC ISR bit for the
+ * HYPERVISOR_CALLBACK_VECTOR will not be cleared and then it
+ * will block the interrupt whose vector is lower than
+ * HYPERVISOR_CALLBACK_VECTOR.
+ */
+ entering_ack_irq();
arch/x86/kernel/cpu/acrn.c: In function âacrn_hv_vector_handlerâ:
arch/x86/kernel/cpu/acrn.c:52:2: error: implicit declaration of function âentering_ack_irqâ; did you mean âspin_lock_irqâ? [-Werror=implicit-function-declaration]
entering_ack_irq();
^~~~~~~~~~~~~~~~
spin_lock_irq
arch/x86/kernel/cpu/acrn.c:58:2: error: implicit declaration of function âexiting_irqâ; did you mean âin_irqâ? [-Werror=implicit-function-declaration]
exiting_irq();
^~~~~~~~~~~
in_irq
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:278: arch/x86/kernel/cpu/acrn.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:489: arch/x86/kernel/cpu] Error 2
make[1]: *** [scripts/Makefile.build:489: arch/x86/kernel] Error 2
make: *** [Makefile:1073: arch/x86] Error 2
make: *** Waiting for unfinished jobs....
Looks like it needs
+#include <asm/apic.h>
config attached.