summaryrefslogtreecommitdiffstats
path: root/kernel/arch/x86/kvm
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/x86/kvm')
-rw-r--r--kernel/arch/x86/kvm/lapic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/arch/x86/kvm/lapic.h b/kernel/arch/x86/kvm/lapic.h
index 9d28383fc..c4ea87eed 100644
--- a/kernel/arch/x86/kvm/lapic.h
+++ b/kernel/arch/x86/kvm/lapic.h
@@ -150,7 +150,7 @@ static inline bool kvm_apic_vid_enabled(struct kvm *kvm)
static inline bool kvm_apic_has_events(struct kvm_vcpu *vcpu)
{
- return vcpu->arch.apic->pending_events;
+ return kvm_vcpu_has_lapic(vcpu) && vcpu->arch.apic->pending_events;
}
bool kvm_apic_pending_eoi(struct kvm_vcpu *vcpu, int vector);