If my recollection is correct, the armRight now it will use a VMID unrelated to KVM. BTM support on ARM will
smmu-v3 needs it to obtain the vmid to setup the userspace event queue:
require syncing the VMID with KVM.
AMD and Intel may require the KVM for some reason as well.
For CC I'm expecting the KVM fd to be the handle for the cVM, so any
RPCs that want to call into the secure world need the KVM FD to get
the cVM's identifier. Ie a "bind to cVM" RPC will need the PCI
information and the cVM's handle.
From that perspective it does make sense that any cVM related APIs,
like "bind to cVM" would be against the VDEVICE where we have a link
to the VIOMMU which has the KVM. On the iommufd side the VIOMMU is
part of the object hierarchy, but does not necessarily have to force a
vIOMMU to appear in the cVM.
But it also seems to me that VFIO should be able to support putting
the device into the RUN state without involving KVM or cVMs.
Intel TDX connect implementation also needs a reference to the kvmI thought kvm folks were NAKing this sharing entirely? Or is the
pointer to obtain the secure EPT information. This is crucial because
the CPU's page table must be shared with the iommu.
secure EPT in the secure world and not directly managed by Linux?But Secure EPT is managed by the TDX module within the secure world.
AFAIK AMD is going to mirror the iommu page table like today.
ARM, I suspect, will not have an "EPT" under Linux control, so
whatever happens will be hidden in their secure world.