Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7dca5c0 authored by Chris Lalancette's avatar Chris Lalancette Committed by Avi Kivity
Browse files

KVM: x86: Allow any LAPIC to accept PIC interrupts



If the guest wants to accept timer interrupts on a CPU other
than the BSP, we need to remove this gate.

Signed-off-by: default avatarChris Lalancette <clalance@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 33572ac0
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -1107,13 +1107,11 @@ int kvm_apic_accept_pic_intr(struct kvm_vcpu *vcpu)
	u32 lvt0 = apic_get_reg(vcpu->arch.apic, APIC_LVT0);
	u32 lvt0 = apic_get_reg(vcpu->arch.apic, APIC_LVT0);
	int r = 0;
	int r = 0;


	if (kvm_vcpu_is_bsp(vcpu)) {
	if (!apic_hw_enabled(vcpu->arch.apic))
	if (!apic_hw_enabled(vcpu->arch.apic))
		r = 1;
		r = 1;
	if ((lvt0 & APIC_LVT_MASKED) == 0 &&
	if ((lvt0 & APIC_LVT_MASKED) == 0 &&
	    GET_APIC_DELIVERY_MODE(lvt0) == APIC_MODE_EXTINT)
	    GET_APIC_DELIVERY_MODE(lvt0) == APIC_MODE_EXTINT)
		r = 1;
		r = 1;
	}
	return r;
	return r;
}
}