Hi Eric, On Mon, Feb 26, 2018 at 5:14 AM, Auger Eric <eric.au...@redhat.com> wrote: > Hi Jintack, > > On 21/02/18 05:03, Jintack Lim wrote: >> Hi, >> >> I'm using vhost with the virtual intel-iommu, and this page[1] shows >> the QEMU command line example. >> >> qemu-system-x86_64 -M q35,accel=kvm,kernel-irqchip=split -m 2G \ >> -device intel-iommu,intremap=on,device-iotlb=on \ >> -device ioh3420,id=pcie.1,chassis=1 \ >> -device >> virtio-net-pci,bus=pcie.1,netdev=net0,disable-legacy=on,disable-modern=off,iommu_platform=on,ats=on >> \ >> -netdev tap,id=net0,vhostforce \ >> $IMAGE_PATH >> >> I wonder what's the impact of using device-iotlb and ats options as >> they are described necessary. >> >> In my understanding, vhost in the kernel only looks at >> VIRTIO_F_IOMMU_PLATFORM, and when it is set, vhost uses a >> device-iotlb. In addition, vhost and QEMU communicate using vhost_msg >> basically to cache mappings correctly in the vhost, so I wonder what's >> the role of ats in this case. >> >> A related question is that if we use SMMU emulation[2] on ARM without >> those options, does vhost cache mappings as if it has a device-iotlb? >> (I guess this is the case.) > vsmmuv3 emulation code does not support ATS at the moment. vhost support > is something different. As Peter explained it comes with the capability > of the virtio device to register unmap notifiers. Those notifiers get > called each time there are TLB invalidation commands. That way the > in-kernel vhost cache can be invalidated. vhost support was there until > vsmmuv3 v7. With latest versions, I removed it to help reviewers > concentrate on the root functionality. However I will send it to you > based on v9.
Thanks, Eric. I'm happy to take a look at those patches! Thanks, Jintack > > Thanks > > Eric >> >> I'm pretty new to QEMU code, so I might be missing something. Can >> somebody shed some light on it? >> >> [1] https://wiki.qemu.org/Features/VT-d >> [2] http://lists.nongnu.org/archive/html/qemu-devel/2018-02/msg04736.html >> >> Thanks, >> Jintack >> >> >