Commit d6a858d1 authored by Paolo Bonzini's avatar Paolo Bonzini

KVM: vmx: disable posted interrupts if no local APIC

Uniprocessor 32-bit randconfigs can disable the local APIC, and posted
interrupts require reserving a vector on the LAPIC, so they are
incompatible.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 9eec50b8
...@@ -983,7 +983,8 @@ static inline bool cpu_has_vmx_virtual_intr_delivery(void) ...@@ -983,7 +983,8 @@ static inline bool cpu_has_vmx_virtual_intr_delivery(void)
static inline bool cpu_has_vmx_posted_intr(void) static inline bool cpu_has_vmx_posted_intr(void)
{ {
return vmcs_config.pin_based_exec_ctrl & PIN_BASED_POSTED_INTR; return IS_ENABLED(CONFIG_X86_LOCAL_APIC) &&
vmcs_config.pin_based_exec_ctrl & PIN_BASED_POSTED_INTR;
} }
static inline bool cpu_has_vmx_apicv(void) static inline bool cpu_has_vmx_apicv(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment