Alex Williamson 65501a745d 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
module.  To assign device 0000:05:00.0 to a guest, do the following:

for dev in $(ls /sys/bus/pci/devices/0000:05:00.0/iommu_group/devices); do
    vendor=$(cat /sys/bus/pci/devices/$dev/vendor)
    device=$(cat /sys/bus/pci/devices/$dev/device)
    if [ -e /sys/bus/pci/devices/$dev/driver ]; then
        echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
    fi
    echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id
done

See Documentation/vfio.txt in the Linux kernel tree for further
description of IOMMU groups and VFIO.

Then launch qemu including the option:

-device vfio-pci,host=0000:05:00.0

Legacy PCI interrupts (INTx) currently makes use of a kludge where we
trap BAR accesses and assume the access is in response to an interrupt,
therefore de-asserting and unmasking the interrupt.  It's not quite as
targetted as using the EOI for this, but it's self contained and seems
to work across all architectures.  The side-effect is a significant
performance slow-down for device in INTx mode.  Some devices, like
graphics cards, don't really use their interrupt, so this can be turned
off with the x-intx=off option, which disables INTx alltogether.  This
should be considered an experimental option until we refine this code.
Both MSI and MSI-X are supported and avoid these issues.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-10-01 08:04:23 -05:00
2012-10-01 08:04:22 -05:00
2012-08-28 20:38:39 +02:00
2012-08-20 11:05:08 -03:00
2012-08-28 20:38:39 +02:00
2012-10-01 08:04:22 -05:00
2012-09-27 21:28:25 +02:00
2012-09-07 09:02:44 +03:00
2012-09-21 15:12:58 +02:00
2012-09-05 15:48:57 -03:00
2012-09-21 15:12:58 +02:00
2012-09-15 15:34:27 +00:00
2012-08-16 13:41:16 -05:00
2012-09-05 15:48:57 -03:00
2012-09-22 17:59:12 +00:00
2012-09-05 15:48:57 -03:00
2012-09-05 15:48:57 -03:00
2012-09-05 15:48:57 -03:00
2012-09-09 17:03:09 +03:00
2012-09-10 15:29:51 +03:00
2012-09-21 15:12:57 +02:00
2012-09-25 19:05:56 -05:00
2012-09-19 15:26:31 +02:00
2012-08-16 13:41:16 -05:00
2012-08-16 13:41:16 -05:00
2012-08-16 13:41:15 -05:00
2012-08-16 13:41:15 -05:00
2012-09-05 15:48:57 -03:00
2012-09-27 21:28:25 +02:00
2012-09-05 11:44:53 -05:00
2012-09-10 13:52:28 -05:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team
Description
No description provided
Readme 404 MiB
Languages
C 82.6%
C++ 6.5%
Python 3.4%
Dylan 2.9%
Shell 1.6%
Other 2.8%