[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.10] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()
On 19/10/17 14:25, Jan Beulich wrote: >>>> On 19.10.17 at 14:54, <andrew.cooper3@xxxxxxxxxx> wrote: >> On 19/10/17 13:11, Jan Beulich wrote: >>>>>> On 19.10.17 at 13:26, <andrew.cooper3@xxxxxxxxxx> wrote: >>>> --- a/xen/drivers/passthrough/vtd/qinval.c >>>> +++ b/xen/drivers/passthrough/vtd/qinval.c >>>> @@ -147,7 +147,8 @@ static int __must_check queue_invalidate_wait(struct >>>> iommu *iommu, >>>> u8 iflag, u8 sw, u8 fn, >>>> bool_t flush_dev_iotlb) >>>> { >>>> - volatile u32 poll_slot = QINVAL_STAT_INIT; >>> You've lost the initializer. >> Deliberately so. > I don't understand: By never writing QINVAL_STAT_INIT, how can > multiple waits work? Afaict you'll find the variable set to > QINVAL_STAT_DONE the 2nd time you come here, and hence you > won't wait at all. Oh yes - you are quite correct. My test box, which does end up doing frequent queued invalidations, doesn't appear to suffer any bad side effects from this quite-clearly-wrong code. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |