Statistics
| Branch: | Revision:

root / hw / vfio_pci.c @ 5e22c276

History | View | Annotate | Download (61.8 kB)

# Date Author Comment
bbef882c 12/26/2012 11:49 am Michael S. Tsirkin

msi: add API to get notified about pending bit poll

Update all users.

Signed-off-by: Michael S. Tsirkin <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

6f991980 12/17/2012 07:56 pm Paolo Bonzini

Merge commit '1dd3a74d2ee2d873cde0b390b536e45420b3fe05' into HEAD

Signed-off-by: Paolo Bonzini <>

a2cb15b0 12/17/2012 01:02 pm Michael S. Tsirkin

pci: update all users to look in pci/

update all users so we can remove the makefile hack.

Signed-off-by: Michael S. Tsirkin <>

d281084d 12/10/2012 08:30 pm Alex Williamson

vfio-pci: Don't use kvm_irqchip_in_kernel

kvm_irqchip_in_kernel() has an architecture specific meaning, so
we shouldn't be using it to determine whether to enabled KVM INTx
bypass. kvm_irqfds_enabled() seems most appropriate. Also use this
to protect our other call to kvm_check_extension() as that explodes...

e1d1e586 11/13/2012 09:27 pm Alex Williamson

vfio-pci: Add KVM INTx acceleration

This makes use of the new level irqfd support enabling bypass of qemu
userspace both on INTx injection and unmask. This significantly
boosts the performance of devices making use of legacy interrupts (ex.
~60% better netperf TCP_RR scores for an e1000e assigned to a Linux...

a771c517 11/13/2012 09:27 pm Alex Williamson

vfio-pci: Use common msi_get_message

We can get rid of our local version now that a helper exists.

Signed-off-by: Alex Williamson <>

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

248bbe74 10/22/2012 10:48 pm Anthony Liguori

Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121017.0' into staging

  • awilliam/tags/vfio-pci-for-qemu-20121017.0:
    vfio-pci: Mark non-migratable
    vfio-pci: Fix debug build
f6790af6 10/22/2012 03:50 pm Avi Kivity

memory: use AddressSpace for MemoryListener filtering

Using the AddressSpace type reduces confusion, as you can't accidentally
supply the MemoryRegion you're interested in.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>

d9f0e638 10/17/2012 08:20 pm Alex Williamson

vfio-pci: Mark non-migratable

We haven't magically fixed this yet. Toss in a description too.

Signed-off-by: Alex Williamson <>

a011b10e 10/17/2012 08:20 pm Alex Williamson

vfio-pci: Fix debug build

Stray variable from before MSI-X rework

Signed-off-by: Alex Williamson <>

e71e602c 10/15/2012 12:43 pm Avi Kivity

vfio: drop no-op MemoryListener callbacks

Removes quite a bit of useless code.

Signed-off-by: Avi Kivity <>

1a403133 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Clang cleanup

Blue Swirl reports that Clang doesn't like the structure we define to
avoid dynamic allocation for a number of calls to VFIO_DEVICE_SET_IRQS.
Adding an element after a variable sized type is a GNU extension.
Switch back to dynamic allocation, which really isn't a problem since...

3a4f2816 10/08/2012 05:45 pm Jan Kiszka

vfio-pci: Fix BAR->VFIODevice translation in

DO_UPCAST is supposed to translate from the first member of a struct to
that struct, not from arbitrary ones. And it (usually) breaks the build
when neglecting this rule. Use container_of to fix the build breakage...

5c97e5eb 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Roll the header into the .c file

It's only ~100 lines and nobody else should be using this.
Suggested by Michael Tsirkin.

Signed-off-by: Alex Williamson <>

e43b9a5a 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Don't peak at msi_supported

Let the init function fail, just don't warn for -ENOTSUP.

Signed-off-by: Alex Williamson <>

5976cdd5 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Use uintptr_t for void* cast

We don't seem to run into any sign extension problems, but
unsigned looks more correct.

Signed-off-by: Alex williamson <>

9b1e45c8 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Remove setting of MSI qsize

This was a misinterpretation of the spec, hardware doesn't get to
specify how many were actually enabled through this field.

Signed-off-by: Alex Williamson <>

5834a83f 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Extend reset

Take what we've learned from pci-assign and apply it to vfio-pci.
On reset, disable previous interrupt config, perform a device
reset if available, re-enable INTx, and disable memory regions on
the device to prevent continuing DMA....

ce59af2d 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Cleanup on INTx setup failure

Missing some unwind code.

Signed-off-by: Alex Williamson <>

ea486926 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Update slow path INTx algorithm

We can't afford the overhead of switching out and back into mmap mode
around each interrupt, but we can do it lazily via a timer. On INTx
interrupt, disable the mmap'd memory regions and set a timer. On
every interrupt, push the timer out. If the timer expires and the...

af6bc27e 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Re-order map/unmap

This cleans up the next patch that calls unmap from map.

Signed-off-by: Alex Williamson <>

12af1344 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Unmap and retry DMA mapping

Occasionally we get regions added that overlap with existing mappings.
These always seems to be in the VGA ROM range. VFIO returns EBUSY
for these mapping attempts. We can try a little harder and assume
that the latest mapping is correct by removing any overlapping ranges...

fd704adc 10/08/2012 05:45 pm Alex Williamson

vfio-pci: Rework MSIX setup/teardown

We try to do lazy initialization of MSIX since we don't actually need
to setup anything until MSIX vectors start getting used. This leads
to problems if MSIX is enabled, but never used (we can end up trying
to re-enable INTx while it's still enabled). We also run into...

98cd5a5e 10/08/2012 05:45 pm Alex Williamson

vfio-pci: No spurious MSIs

FreeBSD doesn't like these spurious MSIs, remove them as they're
mostly paranoia anyway.

Signed-off-by: Alex Williamson <>

0f41dc18 10/01/2012 09:40 pm Anthony Liguori

vfio_pci: fix build on 32-bit systems

We cannot cast directly from pointer to uint64.

Cc: Alex Williamson <>
Cc: Alex Barcelo <>
Reported-by: Alex Barcelo <>
Signed-off-by: Anthony Liguori <>

65501a74 10/01/2012 04:04 pm Alex Williamson

vfio: vfio-pci device assignment driver

This adds the core of the QEMU VFIO-based PCI device assignment driver.
To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1,
and CONFIG_VFIO_PCI in your host Linux kernel config. Load the vfio-pci...