diff options
-rw-r--r-- | arch/x86/kvm/lapic.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 024f6d1c2996..49573c78c24b 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -1107,13 +1107,11 @@ int kvm_apic_accept_pic_intr(struct kvm_vcpu *vcpu) | |||
1107 | u32 lvt0 = apic_get_reg(vcpu->arch.apic, APIC_LVT0); | 1107 | u32 lvt0 = apic_get_reg(vcpu->arch.apic, APIC_LVT0); |
1108 | int r = 0; | 1108 | int r = 0; |
1109 | 1109 | ||
1110 | if (kvm_vcpu_is_bsp(vcpu)) { | 1110 | if (!apic_hw_enabled(vcpu->arch.apic)) |
1111 | if (!apic_hw_enabled(vcpu->arch.apic)) | 1111 | r = 1; |
1112 | r = 1; | 1112 | if ((lvt0 & APIC_LVT_MASKED) == 0 && |
1113 | if ((lvt0 & APIC_LVT_MASKED) == 0 && | 1113 | GET_APIC_DELIVERY_MODE(lvt0) == APIC_MODE_EXTINT) |
1114 | GET_APIC_DELIVERY_MODE(lvt0) == APIC_MODE_EXTINT) | 1114 | r = 1; |
1115 | r = 1; | ||
1116 | } | ||
1117 | return r; | 1115 | return r; |
1118 | } | 1116 | } |
1119 | 1117 | ||