[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] X86/vmx: Dump PIR and vIRR before ASSERT()

>>> On 07.02.17 at 07:48, <xuquan8@xxxxxxxxxx> wrote:
> Some comment from QEMU/KVM code, in <linux-kernel>/arch/x86/kvm/lapic.c,
> int kvm_lapic_find_highest_irr(struct kvm_vcpu *vcpu)
> {
>       /* This may race with setting of irr in __apic_accept_irq() and
>        * value returned may be wrong, but kvm_vcpu_kick() in __apic_accept_irq
>        * will cause vmexit immediately and the value will be recalculated
>        * on the next vmentry.
>        */
> ...
> }
> I am afraid, there may be a similar race with setting of vIRR..

I think this is unrelated: If another interrupt came in, the highest
set bit in vIRR can only increase. Plus pt_update_irq(), before
returning, calls vlapic_set_irq(), which ought to result in pt_vector's
vIRR bit to be set (either directly or via setting its PIR bit). I.e. the
highest priority interrupt should still have a vector >= pt_vector.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.