1. 05 10月, 2012 1 次提交
  2. 02 10月, 2012 1 次提交
  3. 01 10月, 2012 2 次提交
    • A
      vfio: Enable vfio-pci and mark supported · 92e1fb5e
      Alex Williamson 提交于
      Enabled for all softmmu guests supporting PCI on Linux hosts.  Note
      that currently only x86 hosts have the kernel side VFIO IOMMU support
      for this.  PPC (g3beige) is the only non-x86 guest known to work.
      ARM (veratile) hangs in firmware, others untested.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      92e1fb5e
    • A
      vfio: vfio-pci device assignment driver · 65501a74
      Alex Williamson 提交于
      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: NAlex Williamson <alex.williamson@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      65501a74
  4. 28 9月, 2012 5 次提交
  5. 26 9月, 2012 18 次提交
  6. 23 9月, 2012 4 次提交
  7. 21 9月, 2012 5 次提交
  8. 20 9月, 2012 4 次提交