1. 02 10月, 2012 1 次提交
  2. 01 10月, 2012 5 次提交
    • 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
    • A
      Update Linux kernel headers · 883f0b85
      Alex Williamson 提交于
      Based on Linux as of 1a95620.
      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>
      883f0b85
    • A
    • H
      x86: Implement SMEP and SMAP · a9321a4d
      H. Peter Anvin 提交于
      This patch implements Supervisor Mode Execution Prevention (SMEP) and
      Supervisor Mode Access Prevention (SMAP) for x86.  The purpose of the
      patch, obviously, is to help kernel developers debug the support for
      those features.
      
      A fair bit of the code relates to the handling of CPUID features.  The
      CPUID code probably would get greatly simplified if all the feature
      bit words were unified into a single vector object, but in the
      interest of producing a minimal patch for SMEP/SMAP, and because I had
      very limited time for this project, I followed the existing style.
      
      [ v2: don't change the definition of the qemu64 CPU shorthand, since
        that breaks loading old snapshots.  Per Anthony Liguori this can be
        fixed once the CPU feature set is snapshot.
      
        Change the coding style slightly to conform to checkpatch.pl. ]
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a9321a4d
  3. 30 9月, 2012 5 次提交
  4. 28 9月, 2012 9 次提交
  5. 26 9月, 2012 20 次提交