|
From: | Jason Wang |
Subject: | Re: [Qemu-devel] [PATCH RFC v3 14/14] intel_iommu: enable vfio devices |
Date: | Thu, 19 Jan 2017 11:36:47 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
On 2017年01月19日 11:32, Peter Xu wrote:
On Wed, Jan 18, 2017 at 06:06:57PM +0800, Jason Wang wrote: [...]So I think we should implement DSI and GLOBAL for vfio in this case. We can first try to implement it through current VFIO API which can accepts a range of iova. If not possible, let's discuss for other possible solutions.Do you mean VFIO_IOMMU_UNMAP_DMA here? [...]
Yes.
If my understanding above is correct, there is nothing wrong with above IOMMU driver code - actually it makes sense on bare metal when CM is disabled. But yes, DSI/GLOBAL is far less efficient than PSI when CM is enabled. We rely on cache invalidations to indirectly capture remapping structure change. PSI provides accurate info, while DSI/GLOBAL doesn't. To emulate correct behavior of DSI/GLOBAL, we have to pretend that the whole address space (iova=0, size=agaw) needs to be unmapped (for GLOBAL it further means multiple address spaces)Maybe a trick to have accurate info is virtual Device IOTLB.Could you elaborate a bit on this? Thanks, -- peterx
I think the trick is if guest knows device has device IOTLB, it will explicit flush with accurate iova range.
Thanks
[Prev in Thread] | Current Thread | [Next in Thread] |