On 2016年11月04日 03:49, Michael S. Tsirkin wrote:
On Thu, Nov 03, 2016 at 05:27:19PM +0800, Jason Wang wrote:
>This patches enable the Address Translation Service support for virtio
>pci devices. This is needed for a guest visible Device IOTLB
>implementation and will be required by vhost device IOTLB API
>implementation for intel IOMMU.
>
>Cc: Michael S. Tsirkin<m...@redhat.com>
>Signed-off-by: Jason Wang<jasow...@redhat.com>
I'd like to understand why do you think this is strictly required.
Won't setting CM bit in the IOMMU do the trick.
ATS was chosen for performance. Since there're many problems for CM:
- CM was slow (10%-20% slower on real hardware for things like netperf)
because of each transition between non-present and present mapping needs
an explicit invalidation. It may slow down the whole VM.
- Without ATS/Device IOTLB, IOMMU becomes a bottleneck because of
contending of IOTLB entries. (What we can do in this case is in fact
userspace IOTLB snooping, this could be done even without CM).
It was natural to think of ATS when designing interface between IOMMU
and device/remote IOTLBs. Do you see any drawbacks on ATS here?
Thanks
Also, could you remind me pls - can guests just disable ATS?
What happens then?