qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Intel IOMMU guest emulation and vfio-pci passthrough


From: Alex Williamson
Subject: Re: [Qemu-devel] Intel IOMMU guest emulation and vfio-pci passthrough
Date: Wed, 18 Nov 2015 14:35:33 -0700

On Wed, 2015-11-18 at 13:50 -0500, Martin Hicks wrote:
> Hi,
> 
> I've been looking at PCI passthrough using vfio-pci and hoping that it can
> use the Intel IOMMU emulation in the guest to pin-pages in an on-demand
> nature, rather than pinning the entire guest memory as vfio-pci does now.
> Unfortunately vfio-pci and the intel iommu virtualization don't seem to
> play nicely together.
> 
> One problem is math overflow in vfio_listener_region_add() where a
> type=iommu add is requested for size == 1<<64 after the call to
> vfio_initfn().
> 
> If I try to fix this, I'm not sure what the call to
> vfio_listener_region_add for the entire iommu space (0 -> 1<<64) should
> actually do.  Should it just skip this region add?
> 
> Or maybe the vfio code doesn't handle virtualized real IOMMUs?  The comment
> in vfio_listener_region_add() makes me wonder:
> 
>          *
>          * FIXME: For VFIO iommu types which have KVM acceleration to
>          * avoid bouncing all map/unmaps through qemu this way, this
>          * would be the right place to wire that up (tell the KVM
>          * device emulation the VFIO iommu handles to use).
>          */

Significant works needs to be done to allow vfio to back VT-d in a
guest.  Performance will likely be terrible for any sort of general
purpose usage as well since the current vfio iommu interface is designed
mostly for static mappings.  This won't "just work".  Sorry.

Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]