Thread (39 messages) 39 messages, 5 authors, 2021-07-23

RE: [PATCH 3/6] vfio: remove the unused mdev iommu hook

From: "Tian, Kevin" <kevin.tian@intel.com>
Date: 2021-05-14 13:19:42
Also in: kvm, linux-iommu

From: Jason Gunthorpe <jgg@ziepe.ca>
Sent: Thursday, May 13, 2021 8:01 PM

On Thu, May 13, 2021 at 03:28:52AM +0000, Tian, Kevin wrote:
quoted
Are you specially concerned about this iommu_device hack which
directly connects mdev_device to iommu layer or the entire removed
logic including the aux domain concept? For the former we are now
following up the referred thread to find a clean way. But for the latter
we feel it's still necessary regardless of how iommu interface is redesigned
to support device connection from the upper level driver. The reason is
that with mdev or subdevice one physical device could be attached to
multiple domains now. there could be a primary domain with DOMAIN_
DMA type for DMA_API use by parent driver itself, and multiple auxiliary
domains with DOMAIN_UNMANAGED types for subdevices assigned to
different VMs.
Why do we need more domains than just the physical domain for the
parent? How does auxdomain appear in /dev/ioasid?
Another simple reason. Say you have 4 mdevs each from a different 
parent are attached to an ioasid. If only using physical domain of the 
parent + PASID it means there are 4 domains (thus 4 page tables) under 
this IOASID thus every dma map operation must be replicated in all
4 domains which is really unnecessary. Having the domain created
with ioasid and allow a device attaching to multiple domains is much
cleaner for the upper-layer drivers to work with iommu interface.

Thanks
Kevin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help