Re: [RFC] /dev/ioasid uAPI proposal

From: Jason Gunthorpe
Date: Tue Jun 08 2021 - 09:18:08 EST


On Tue, Jun 08, 2021 at 12:37:04PM +1000, David Gibson wrote:

> > The PPC/SPAPR support allows KVM to associate a vfio group to an IOMMU
> > page table so that it can handle iotlb programming from pre-registered
> > memory without trapping out to userspace.
>
> To clarify that's a guest side logical vIOMMU page table which is
> partially managed by KVM. This is an optimization - things can work
> without it, but it means guest iomap/unmap becomes a hot path because
> each map/unmap hypercall has to go
> guest -> KVM -> qemu -> VFIO
>
> So there are multiple context transitions.

Isn't this overhead true of many of the vIOMMUs? Can the fast path be
generalized?

Jason