RE: [PATCH v2 3/5] vfio/iommu_type1: Remove the domain->ops comparison

From
Tian, Kevin <kevin.tian@intel.com>
Date
2022-06-23 04:43:24
Also in
kvm, linux-arm-msm, linux-iommu, linux-mediatek, linux-s390, linux-tegra, lkml, virtualization
Reply to
Robin Murphy, 2022-06-22
From: Robin Murphy <robin.murphy@arm.com>
Sent: Wednesday, June 22, 2022 3:55 PM

On 2022-06-16 23:23, Nicolin Chen wrote:
quoted
On Thu, Jun 16, 2022 at 06:40:14AM +0000, Tian, Kevin wrote:
quoted
quoted
The domain->ops validation was added, as a precaution, for mixed-
driver
quoted
quoted
quoted
systems. However, at this moment only one iommu driver is possible. So
remove it.
It's true on a physical platform. But I'm not sure whether a virtual
platform
quoted
quoted
is allowed to include multiple e.g. one virtio-iommu alongside a virtual VT-
d
quoted
quoted
or a virtual smmu. It might be clearer to claim that (as Robin pointed out)
there is plenty more significant problems than this to solve instead of
simply
quoted
quoted
saying that only one iommu driver is possible if we don't have explicit
code
quoted
quoted
to reject such configuration. 😊
Will edit this part. Thanks!
Oh, physical platforms with mixed IOMMUs definitely exist already. The
main point is that while bus_set_iommu still exists, the core code
effectively *does* prevent multiple drivers from registering - even in
emulated cases like the example above, virtio-iommu and VT-d would both
try to bus_set_iommu(&pci_bus_type), and one of them will lose. The
aspect which might warrant clarification is that there's no combination
of supported drivers which claim non-overlapping buses *and* could
appear in the same system - even if you tried to contrive something by
emulating, say, VT-d (PCI) alongside rockchip-iommu (platform), you
could still only describe one or the other due to ACPI vs. Devicetree.
This explanation is much clearer! thanks.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (30 messages) 30 messages, 6 authors, last reply 2022-06-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help