[PATCH] iommu/arm-smmu-v3-iommufd: Allow attaching nested domain for GBPA cases

Shameer Kolothum skolothumtho at nvidia.com
Fri Oct 31 05:49:07 PDT 2025



> -----Original Message-----
> From: Nicolin Chen <nicolinc at nvidia.com>
> Sent: 24 October 2025 05:06
> To: Jason Gunthorpe <jgg at nvidia.com>; will at kernel.org
> Cc: robin.murphy at arm.com; joro at 8bytes.org; kevin.tian at intel.com;
> praan at google.com; linux-arm-kernel at lists.infradead.org;
> iommu at lists.linux.dev; linux-kernel at vger.kernel.org; Shameer Kolothum
> <skolothumtho at nvidia.com>
> Subject: [PATCH] iommu/arm-smmu-v3-iommufd: Allow attaching nested
> domain for GBPA cases
> 
> A vDEVICE has been a hard requirement for attaching a nested domain to the
> device. This makes sense when installing a guest STE, since a vSID must be
> present and given to the kernel during the vDEVICE allocation.
> 
> But, when CR0.SMMUEN is disabled, VM doesn't really need a vSID to
> program
> the vSMMU behavior as GBPA will take effect, in which case the vSTE in the
> nested domain could have carried the bypass or abort configuration in GBPA
> register. Thus, having such a hard requirement doesn't work well for GBPA.
> 
> Add an additional condition in arm_smmu_attach_prepare_vmaster(), to
> allow
> a bypass or abort vSTE working for a GBPA setup. And do not forget to skip
> vsid=0 when reporting vevents, since the guest SMMU in this setup will not
> report event anyway.
> 
> Update the uAPI doc accordingly.
> 
> Signed-off-by: Nicolin Chen <nicolinc at nvidia.com>

Looks good to me. Also tested with Qemu SMMuv3 accel v5 series
here,
https://lore.kernel.org/qemu-devel/20251031105005.24618-1-skolothumtho@nvidia.com/

Tested-by: Shameer Kolothum <skolothumtho at nvidia.com>

Thanks,
Shameer



More information about the linux-arm-kernel mailing list