From 43741ba5e31019b0f8df1b66f891ed75383768d5 Mon Sep 17 00:00:00 2001 From: Sainath Grandhi Date: Thu, 23 Aug 2018 12:35:08 -0700 Subject: [PATCH] hv: Leave interrupts disabled during vmexit - ACRN partition mode Since vmexit handling in ACRN partition mode is not complex (since no SOS and all devices passthru), interrupts can stay disabled in root mode during vmexit handling. Signed-off-by: Sainath Grandhi --- hypervisor/arch/x86/idt.S | 4 ---- hypervisor/include/arch/x86/cpu.h | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hypervisor/arch/x86/idt.S b/hypervisor/arch/x86/idt.S index 0cec1542e..251d2eb3a 100644 --- a/hypervisor/arch/x86/idt.S +++ b/hypervisor/arch/x86/idt.S @@ -389,11 +389,7 @@ external_interrupt_save_frame: /* Put current stack pointer into 1st param register (rdi) */ movq %rsp, %rdi -#ifdef CONFIG_PARTITION_MODE - call partition_mode_dispatch_interrupt -#else call dispatch_interrupt -#endif /* * We disable softirq path from interrupt IRET, since right now all IRQ diff --git a/hypervisor/include/arch/x86/cpu.h b/hypervisor/include/arch/x86/cpu.h index 781096d34..5d5537ada 100644 --- a/hypervisor/include/arch/x86/cpu.h +++ b/hypervisor/include/arch/x86/cpu.h @@ -367,17 +367,25 @@ void wait_sync_change(uint64_t *sync, uint64_t wake_sync); "a" (msrl), "d" (msrh)); \ } +#ifdef CONFIG_PARTITION_MODE +#define CPU_IRQ_DISABLE() +#else /* Disables interrupts on the current CPU */ #define CPU_IRQ_DISABLE() \ { \ asm volatile ("cli\n" : : : "cc"); \ } +#endif +#ifdef CONFIG_PARTITION_MODE +#define CPU_IRQ_ENABLE() +#else /* Enables interrupts on the current CPU */ #define CPU_IRQ_ENABLE() \ { \ asm volatile ("sti\n" : : : "cc"); \ } +#endif /* This macro writes the stack pointer. */ #define CPU_SP_WRITE(stack_ptr) \