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

Reply via email to