On Wed, Sep 02, 2026 at 11:19:05AM -0700, Jacob Pan wrote:

> If we do want to support this kvm-vfio bridge semantics beyond kvm,
> maybe this should be abstracted as a generic VFIO "hypervisor
> partition" association, with hypervisor-specific get/put callbacks,
> rather than adding an MSHV-only copy of the KVM hook.
> +Alex

I don't like this patch at all.

I think we should try to harmonize all these sort of "external" cases
as best we can. mshv, confidential compute, xen, etc all have a very
similar shape.

I am discussing here with Aneesh an approach to use the viommu almost
exclusively for this.

https://lore.kernel.org/all/[email protected]/

Can you imagine a way to do that for your stuff?

In that case I imagine the iommufd vdevice create is what attaches the
vfio device to the partition, not a seperate ioctl over in some other
driver. When the viommu is created it knows what partition it is
affiliated with because it took in a FD that describes that partition.

Does mshv use KVM at all? Can a kvm fd describe the partition?

Jason

Reply via email to