qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 0/4] VFIO-based PCI device assignment
@ 2012-09-13 20:10 Alex Williamson
  2012-09-13 20:11 ` [Qemu-devel] [PATCH v4 1/4] Update kernel header script to include vfio Alex Williamson
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alex Williamson @ 2012-09-13 20:10 UTC (permalink / raw)
  To: aliguori; +Cc: kvm, aik, jan.kiszka, qemu-devel, blauwirbel, avi

Here's an updated version of the VFIO PCI device assignment series.
Now that we're targetting QEMU 1.3, I've opened up support so that
vfio-pci is added to all softmmu targets supporting PCI on Linux
hosts.  Only some printf format changes were required to make this
build.

I also added a workaround for INTx support.  Ideally we'd like to know
when an EOI is written to the interrupt controller to know when to
de-assert and unmask an interrupt, but as a substitute we can consider
a BAR access to be a response to an interrupt and do the de-assert and
unmask then.  The device will re-assert the interrupt until it's been
handled.  The benefit is that the solution is generic, the draw-back
is that we can't make use of the mmap'd memory region in this mode.
The memory API conveniently has a way to toggle enabling the mmap'd
region that fits nicely with this usage.

I've also added an x-intx=off option to disable INTx support for a
device, which can be useful for devices that don't make use of any
interrupts and for which the overhead of trapping BAR access is too
high (graphics cards, including a Radeon HD 5450 which I was able to
get working under WinXP with this version).  This option should be
considered experimental, thus the x- prefix.  Future EOI acceleration
should make this option unnecessary where KVM is available.

I was also successful in passing through both a tg3 and e1000e NIC
from an x86 host to powerpc guest (g3beiege) using this series.  This
guest machine doesn't appear to support MSI, so the INTx mechanism
above is necessary to trigger an EOI.

In addition to these series here, the code is able at:

git://github.com/awilliam/qemu-vfio.git branch vfio-for-qemu

as well is in signed tag vfio-pci-for-qemu-v4.

Thanks,

Alex

---

Alex Williamson (4):
      vfio: Enable vfio-pci and mark supported
      vfio: vfio-pci device assignment driver
      Update Linux kernel headers
      Update kernel header script to include vfio


 MAINTAINERS                     |    5 
 configure                       |    6 
 hw/Makefile.objs                |    3 
 hw/vfio_pci.c                   | 1860 +++++++++++++++++++++++++++++++++++++++
 hw/vfio_pci_int.h               |  114 ++
 linux-headers/linux/vfio.h      |  368 ++++++++
 scripts/update-linux-headers.sh |    2 
 7 files changed, 2356 insertions(+), 2 deletions(-)
 create mode 100644 hw/vfio_pci.c
 create mode 100644 hw/vfio_pci_int.h
 create mode 100644 linux-headers/linux/vfio.h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-14 18:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 20:10 [Qemu-devel] [PATCH v4 0/4] VFIO-based PCI device assignment Alex Williamson
2012-09-13 20:11 ` [Qemu-devel] [PATCH v4 1/4] Update kernel header script to include vfio Alex Williamson
2012-09-13 20:11 ` [Qemu-devel] [PATCH v4 2/4] Update Linux kernel headers Alex Williamson
2012-09-13 20:11 ` [Qemu-devel] [PATCH v4 3/4] vfio: vfio-pci device assignment driver Alex Williamson
2012-09-14 18:48   ` Blue Swirl
2012-09-13 20:11 ` [Qemu-devel] [PATCH v4 4/4] vfio: Enable vfio-pci and mark supported 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).