* [Qemu-devel] Intel IOMMU guest emulation and vfio-pci passthrough
@ 2015-11-18 18:50 Martin Hicks
2015-11-18 21:35 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Martin Hicks @ 2015-11-18 18:50 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]
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).
*/
mh
--
Martin Hicks P.Eng. | mort@bork.org
Bork Consulting Inc. | +1 (613) 266-2296
[-- Attachment #2: Type: text/html, Size: 1698 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] Intel IOMMU guest emulation and vfio-pci passthrough
2015-11-18 18:50 [Qemu-devel] Intel IOMMU guest emulation and vfio-pci passthrough Martin Hicks
@ 2015-11-18 21:35 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2015-11-18 21:35 UTC (permalink / raw)
To: Martin Hicks; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-18 21:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 18:50 [Qemu-devel] Intel IOMMU guest emulation and vfio-pci passthrough Martin Hicks
2015-11-18 21:35 ` Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).