[PATCH v1 02/14] iommufd: Add nesting related data structures for ARM SMMUv3
Jason Gunthorpe
jgg at nvidia.com
Fri Mar 10 04:55:17 PST 2023
On Thu, Mar 09, 2023 at 09:36:18PM -0800, Nicolin Chen wrote:
> > Yea, a vmid is only allocated in an S2 domain allocation. So,
> > a guest allocating only S1 domains always sets VMID=0. Yet, I
> > think that the hypervisor or some where in host kernel should
> > replace the VMID=0 with a unified VMID.
>
> Ah, I just recall a conversation with Jason that a VM should only
> have one S2 domain. In that case, the VMID is already unified?
Not requried per-say, but yes, most likely qemu would run that way.
But you can't just re-use the VMID however you like. AFAIK the VMID is
the cache tag for the S2 IOPTEs, so every VMID must refer to the same
S2 translation.
You can't mix different S2's with the same VMID.
Thus you are stuck with the single S2 model in qemu if you want to use
a userspace CMDQ.
I suppose that suggests that if KVM supplies the VMID then it is
assigned to a singular S2 iommu_domain also.
Jason
More information about the linux-arm-kernel
mailing list