[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH] hvm/vpt: fix inconsistent views of vIOAPIC in vmx_intr_assist()
On Wed, Apr 12, 2017 at 02:45:36AM +0000, Xuquan (Quan Xu) wrote: >On April 07, 2017 11:24 AM, Chao Gao wrote: >>When injecting periodic timer interrupt in vmx_intr_assist(), multiple read >>operation is operated during one event delivery and incur to inconsistent >>views of vIOAPIC. For example, if a periodic timer interrupt is from PIT, when >>set the corresponding bit in vIRR, the corresponding RTE is accessed in >>pt_update_irq(). When this function returns, it accesses the RTE again to get >>the vector it set in vIRR. Between the two accesses, the content of RTE may >>have been changed by another CPU for no protection method in use. This case >>can incur the assertion failure in vmx_intr_assist(). Also after a periodic >>timer interrupt is injected successfully, pt_irq_posted() will decrease the >>count (pending_intr_nr). But if the corresponding RTE has been changed, >>pt_irq_posted() will not decrease the count, resulting one more timer >>interrupt. >> >>More discussion and history can be found in >>1.https://lists.xenproject.org/archives/html/xen-devel/2017-03/msg00906.ht >>ml >>2.https://lists.xenproject.org/archives/html/xen-devel/2017-01/msg01019.ht >>ml >> >>This patch simply uses irq_lock to avoid these inconsistent views of vIOAPIC. > >To vLAPIC, is it in a similar situation? For vLAPIC, there is no such situation. The irq field in structure periodic_time has different meanings for vLAPIC/vIOAPIC case. For vLAPIC case, it is the interrupt vector. For vIOAPIC case, it is the irq number; to get interrupt vector and to deliver this interrupt, accessing IOAPIC RTE is needed. Thanks Chao _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |