[PATCH v10 14/18] iommufd/viommu: Identify physical IOMMU backing with a tag

Jason Gunthorpe jgg at ziepe.ca
Thu Dec 3 07:54:22 PST 2026


On Thu, Dec 03, 2026 at 06:42:51AM +0000, Tian, Kevin wrote:

> this patch and next intend to put that constraint only on the legacy usage,
> probably based on the observation that there is only one tsm in a platform
> so one tsm viommu can support all kinds of devices behind different physical
> IOMMUs.

That won't be true for ARM or AMD. Any viommu that has a direct
bypass command queue to the guest must have viommu 1:1 with piommu.

For these tsm cases the viommu driver should be selecting if it is
compatible

And maybe that is the proper generalization, make all the drivers work
that way and the physical drivers simple always require 1:1

> We have two options here. One is to inherit the current uapi definition
> for tsm then abandon this patch. otherwise to not break the existing uapi
> we'd better introduce a new viommu_alloc flag to explicitly mark the
> viommu as CC type which then can be defined with a different semantics
> from legacy.

Not sure I see the uAPI issue? The VMM basically needs to know the
rules for the viommu it selected when it selects it. If it is a 1:1
with physical or not is baked into the selection, I Think, or should
be returned by one of the driver's GET_INFOs ?

Jason



More information about the linux-arm-kernel mailing list