>>> On 07.02.17 at 07:48, <xuqu...@huawei.com> 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.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to