[PATCH v9 11/25] iommu/arm-smmu-v3-kvm: Add the kernel driver
Mostafa Saleh
smostafa at google.com
Mon Nov 9 02:47:46 PST 2026
On Thu, Nov 05, 2026 at 01:06:18PM -0800, Nicolin Chen wrote:
> On Thu, Oct 15, 2026 at 08:08:42PM +0000, Mostafa Saleh wrote:
> > +static struct platform_driver smmuv3_nesting_driver;
> > +static int __init smmuv3_nesting_probe(struct platform_device *pdev)
>
> Could it use a different naming than "nesting"?
>
> "Nesting" is widely used in iommufd path for nested translation.
>
> Here, it could be smmuv3_pkvm_driver?
Sure, pkvm/hyp works.
>
> > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> > +#ifdef CONFIG_ARM_SMMU_V3_PKVM
> > +/*
> > + * Two devices are involved: the aux device bound to this driver, and the
> > + * physical platform device bound to the pKVM init driver, which only uses it
> > + * for discovery. This driver keeps using the platform device, as it carries
> > + * the fwnode the IOMMU core and consumers link to, the DMA configuration and
> > + * the IRQs.
>
> It would be nicer to have a diagram or so to show the co-relationship
> among different devices and drivers.
>
> I assume the regular arm-smmu-v3 driver is a part of the picture too,
> when the pkvm driver binding fails?
>
I can add some ASCII diagram.
If pKVM driver fails, no aux devices are created and the main driver
probes the platform SMMUv3 devices as usual.
> > +static struct auxiliary_driver arm_smmu_driver_emu = {
> > + .driver = {
> > + .suppress_bind_attrs = true,
> > + },
> > + .name = "arm-smmu-v3-emu",
> > + .id_table = arm_smmu_aux_table,
> > + .probe = arm_smmu_device_probe_emu,
> > + .remove = arm_smmu_device_remove_emu,
> > + .shutdown = arm_smmu_device_shutdown_emu,
> > +};
> > +
> > +module_auxiliary_driver(arm_smmu_driver_emu);
> > +#endif
>
> Nit:
> #endif /* CONFIG_ARM_SMMU_V3_PKVM */
Will fix it.
Thanks,
Mostafa
>
> Nicolin
More information about the linux-arm-kernel
mailing list