On 05/07/2017 08:23, Fam Zheng wrote:
>>      req->vq = vq;
>>      req->dev = s;
>> -    qemu_sglist_init(&req->qsgl, DEVICE(s), 8, &address_space_memory);
>> +    qemu_sglist_init(&req->qsgl, DEVICE(s), 8, vdev->dma_as);
> Not related to this patch, but is our vIOMMU iotlb implementation safe for 
> data
> plane (both virtio-blk and virtio-scsi)? There we don't have BQL to 
> synchronize
> between IOVA lookup and update, which means threads can race when accessing 
> the
> iotlb GHashTable.
> 
> Did I overlook a synchronization mechanism? Or is it missing? Paolo, MST?

I think it's missing.  One way to fix it could be to finish the
MemoryRegionCache work and have an IOMMU->virtio notifier, similar to
how vhost works.

Paolo

Reply via email to