OSDN Git Service

KVM: x86: Allow any LAPIC to accept PIC interrupts
authorChris Lalancette <clalance@redhat.com>
Wed, 16 Jun 2010 21:11:12 +0000 (17:11 -0400)
committerAvi Kivity <avi@redhat.com>
Sun, 1 Aug 2010 07:46:50 +0000 (10:46 +0300)
If the guest wants to accept timer interrupts on a CPU other
than the BSP, we need to remove this gate.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/lapic.c

index 024f6d1..49573c7 100644 (file)
@@ -1107,13 +1107,11 @@ int kvm_apic_accept_pic_intr(struct kvm_vcpu *vcpu)
        u32 lvt0 = apic_get_reg(vcpu->arch.apic, APIC_LVT0);
        int r = 0;
 
-       if (kvm_vcpu_is_bsp(vcpu)) {
-               if (!apic_hw_enabled(vcpu->arch.apic))
-                       r = 1;
-               if ((lvt0 & APIC_LVT_MASKED) == 0 &&
-                   GET_APIC_DELIVERY_MODE(lvt0) == APIC_MODE_EXTINT)
-                       r = 1;
-       }
+       if (!apic_hw_enabled(vcpu->arch.apic))
+               r = 1;
+       if ((lvt0 & APIC_LVT_MASKED) == 0 &&
+           GET_APIC_DELIVERY_MODE(lvt0) == APIC_MODE_EXTINT)
+               r = 1;
        return r;
 }