[PATCH v5 14/27] iommu/arm-smmu-v3: Support probing KVM emulated devices
Jason Gunthorpe
jgg at ziepe.ca
Wed Dec 17 06:00:46 PST 2025
On Fri, Dec 12, 2025 at 03:53:13PM +0000, Mostafa Saleh wrote:
> > It is OK I guess, I wouldn't insist you change it, but I think it is
> > kind of gross. Registering the iommu driver against the platform
> > device instead of the aux is pretty ugly and denies userspace the
> > ability to see that the hypervisor is sitting in there through the
> > sysfs topology.
>
> Yes, that’s why I was wondering if it’s better to keep this as a platform
> driver and create the aux devices for the parent(KVM) but that was really
> complicated to handle the probe ordering.
That sounds worse and inverts the required probe ordering.
Attach it to the aux device :\
> > Not sure why the commentary about built-in though, what does that have
> > to do with anything? If the aux driver is not built in then it will
> > just module load later and everything should be fine?
>
> As at the moment the KVM driver doesn’t use drvdata(nor any device
> resources) and the main driver(aux) does, but if that was a module, we
> can’t know which version does what (if that changes in the future,
> although unlikely).
Kernel is monolithic, you don't need to worry about people doing silly
games with modules.
Jason
More information about the linux-arm-kernel
mailing list