1. 17 3月, 2015 2 次提交
  2. 12 3月, 2015 1 次提交
  3. 11 2月, 2015 2 次提交
  4. 23 11月, 2014 1 次提交
  5. 30 9月, 2014 1 次提交
    • G
      vfio/pci: Restore MSIx message prior to enabling · b8f02af0
      Gavin Shan 提交于
      The MSIx vector table lives in device memory, which may be cleared as
      part of a backdoor device reset. This is the case on the IBM IPR HBA
      when the BIST is run on the device. When assigned to a QEMU guest,
      the guest driver does a pci_save_state(), issues a BIST, then does a
      pci_restore_state(). The BIST clears the MSIx vector table, but due
      to the way interrupts are configured the pci_restore_state() does not
      restore the vector table as expected. Eventually this results in an
      EEH error on Power platforms when the device attempts to signal an
      interrupt with the zero'd table entry.
      
      Fix the problem by restoring the host cached MSI message prior to
      enabling each vector.
      Reported-by: NWen Xiong <wenxiong@linux.vnet.ibm.com>
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      b8f02af0
  6. 15 2月, 2014 1 次提交
  7. 15 1月, 2014 1 次提交
  8. 28 8月, 2013 1 次提交
    • A
      vfio-pci: Use fdget() rather than eventfd_fget() · 20e77457
      Alex Williamson 提交于
      eventfd_fget() tests to see whether the file is an eventfd file, which
      we then immediately pass to eventfd_ctx_fileget(), which again tests
      whether the file is an eventfd file.  Simplify slightly by using
      fdget() so that we only test that we're looking at an eventfd once.
      fget() could also be used, but fdget() makes use of fget_light() for
      another slight optimization.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      20e77457
  9. 26 3月, 2013 1 次提交
  10. 16 3月, 2013 1 次提交
  11. 11 3月, 2013 1 次提交
  12. 10 10月, 2012 2 次提交
    • A
      vfio: Fix PCI INTx disable consistency · 899649b7
      Alex Williamson 提交于
      The virq_disabled flag tracks the userspace view of INTx masking
      across interrupt mode changes, but we're not consistently applying
      this to the interrupt and masking handler notion of the device.
      Currently if the user sets DisINTx while in MSI or MSIX mode, then
      returns to INTx mode (ex. rebooting a qemu guest), the hardware has
      DisINTx+, but the management of INTx thinks it's enabled, making it
      impossible to actually clear DisINTx.  Fix this by updating the
      handler state when INTx is re-enabled.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      899649b7
    • A
      vfio: Move PCI INTx eventfd setting earlier · 9dbdfd23
      Alex Williamson 提交于
      We need to be ready to recieve an interrupt as soon as we call
      request_irq, so our eventfd context setting needs to be moved
      earlier.  Without this, an interrupt from our device or one
      sharing the interrupt line can pass a NULL into eventfd_signal
      and oops.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      9dbdfd23
  13. 22 9月, 2012 1 次提交
    • A
      vfio: Fix virqfd release race · b68e7fa8
      Alex Williamson 提交于
      vfoi-pci supports a mechanism like KVM's irqfd for unmasking an
      interrupt through an eventfd.  There are two ways to shutdown this
      interface: 1) close the eventfd, 2) ioctl (such as disabling the
      interrupt).  Both of these do the release through a workqueue,
      which can result in a segfault if two jobs get queued for the same
      virqfd.
      
      Fix this by protecting the pointer to these virqfds by a spinlock.
      The vfio pci device will therefore no longer have a reference to it
      once the release job is queued under lock.  On the ioctl side, we
      still flush the workqueue to ensure that any outstanding releases
      are completed.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      b68e7fa8
  14. 31 7月, 2012 1 次提交
    • A
      vfio: Add PCI device driver · 89e1f7d4
      Alex Williamson 提交于
      Add PCI device support for VFIO.  PCI devices expose regions
      for accessing config space, I/O port space, and MMIO areas
      of the device.  PCI config access is virtualized in the kernel,
      allowing us to ensure the integrity of the system, by preventing
      various accesses while reducing duplicate support across various
      userspace drivers.  I/O port supports read/write access while
      MMIO also supports mmap of sufficiently sized regions.  Support
      for INTx, MSI, and MSI-X interrupts are provided using eventfds to
      userspace.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      89e1f7d4