Re: [PATCH v4 15/28] iommu/arm-smmu-v3: Load the driver later in KVM mode

Jason Gunthorpe
2025-09-23T17:38:09Z

On Tue, Sep 23, 2025 at 02:35:48PM +0000, Mostafa Saleh wrote:
> If we really want to avoid the current approach, we can keep deferring probe,
> until a check for a new flag set from “finalize_pkvm” which is called
> unconditionally of KVM state.

I still think the pkvm drivers should be bound to some special pkvm
device_driver and the driver core should handle all this special
dancing:
- Wait for pkvm to decide if it will start or not
- Claim a device for pkvm and make it visible in some generic way,eg
in sysfs
- Fall back to using the normal driver once we conclude pkvm won't
run.

It sounds like a pain to open code all this logic in every pkvm
driver? How many do you have?

Jason