Re: [RFC PATCH v4 03/16] iommu/arm-smmu-v3: Add initial pSMMU realm viommu plumbing
From: Suzuki K Poulose
Date: Thu Sep 03 2026 - 11:24:27 EST
On 03/09/2026 15:47, Jason Gunthorpe wrote:
On Thu, Sep 03, 2026 at 10:58:06AM +0530, Aneesh Kumar K.V wrote:
Do you mean the SMMUv3 driver triggers RD creation? That feels
wrong. Did you mean the VMM just does it earlier?
Currently, CCA creates the realm lazily as part of another operation.
Realm creation is triggered by kvm_arm_rmi_populate() or
kvm_arch_vcpu_run_pid_change()
Okay, that's not what I would have guessed. But critically is there
some way for userspace to specify any realm creation parameters (like
rpv, ats_plane and so one) prior to the lazy creation?
There would be, eventually. Based on the feedback from KVM arm64
maintainers, we are trying to keep the ABI as generic as possible as the
normal VMs. Thus, for now we have not included the Realm specific
parameter configuration (which was present in the earlier versions)
in the latest version of the KVM support.
We have some ideas on how to do the configuration step. e.g. for MEC,
see the following thread :
https://lore.kernel.org/all/46d78aa2-cacb-4efd-ae62-3026f5fe9b3f@xxxxxxx/
Why lazy? Why not just have userspace provide the creation parameters
and create the RD right then?
Cheers
Suzuki
Jason