On 09/27/2012 12:22 PM, Paolo Bonzini wrote: > Il 27/09/2012 12:08, Avi Kivity ha scritto: >>>>>> virtio-net is per-spec not going through the iommu. >>>> >> What's that smell? A feature bit? >>> > >>> > Why is it a bad thing that it does not go through the iommu? >> You can't assign the device to nested guests or to guest userspace via >> vfio. Some guests may want to use the iommu even in the guest kernel >> context. > > All good points. > > However, using the iommu means you cannot use either vhost-net or (at > least for now) per-device lock. So it closes some doors on performance > improvements... I can imagine pSeries guys prefer to keep no iommu in > virtio devices.
Eventually we'll have a kernel-emulated iommu for these use cases. We can use the shadow code to generate the gvioaddr -> gpa -> hpa translation (like we use shadow code to fold the ngpa -> gpa -> hpa translation into a single ngpa -> hpa translation with nested npt). -- error compiling committee.c: too many arguments to function