On 09/03/2017 16:29, Michael S. Tsirkin wrote: >> If VFIO had an iommu property, to be used like "-device >> intel_iommu,id=iommu0 -device vfio-pci,iommu=iommu0", It could tell VFIO >> to use separate containers and also ensure proper ordering of command >> line arguments. > > Lots of guests can't handle arbitrary stuff like this though. > Normally IOMMU attaches to a bus and that's the only bus it can > handle and that's the only IOMMU that can handle the devices > on this bus. > > It's a fact of life that not all hardware dependencies are in a form of > a bus-device relashionship, while modelling it as a bus internally might > be feasible exposing that to users seems risky and confusing as that's > our artifact.
I'm not saying it's a bus. But it's pretty common to have multiple IOMMUs for one bus. A relatively common case is to have one for the graphics card and one for everything else, if I'm not mistaken. Paolo