[PATCH v8 13/15] iommufd/viommu: Allow vIOMMUs without a parent HWPT

Nicolin Chen nicolinc at nvidia.com
Thu Nov 5 09:44:42 PST 2026


On Thu, Nov 05, 2026 at 10:58:06AM +0530, Aneesh Kumar K.V wrote:
> Jason Gunthorpe <jgg at ziepe.ca> writes:
> > On Wed, Nov 04, 2026 at 11:03:41AM -0800, Nicolin Chen wrote:
> >> By dropping the nesting parent from VIOMMU, it just simplifies the
> >> attachment to an S1 paging hwpt, right?
> >
> > Yes.
> >
> > The VMM must always maintain a S1 paging attachment that is the
> > identity map of the VM on all devices, same action as when there is no
> > viommu.
> >
> 
> I am currently creating an S2 paging attachment. This results in a
> configuration with S1 disabled and S2 enabled, which is used by all
> untrusted devices.

For validation, that would work. Yet "no viommu" should would be S1
paging, i.e. hwpt allocated without IOMMU_HWPT_ALLOC_NEST_PARENT.

For reference, QEMU has this:
https://github.com/qemu/qemu/blob/master/hw/vfio/iommufd.c#L467

Thanks
Nicolin



More information about the linux-arm-kernel mailing list