qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Martin Hicks <mort@bork.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Intel IOMMU guest emulation and vfio-pci passthrough
Date: Wed, 18 Nov 2015 14:35:33 -0700	[thread overview]
Message-ID: <1447882533.4697.104.camel@redhat.com> (raw)
In-Reply-To: <CAJUS3Xmi_Hwp9KM-W3NouyGPR+Mpoo1Z_16nKXpr9YiNtvaAcg@mail.gmail.com>

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	other threads:[~2015-11-18 21:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447882533.4697.104.camel@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=mort@bork.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).