1. 29 Jun, 2013 1 commit
  2. 05 Jun, 2013 1 commit
  3. 30 Apr, 2013 1 commit
    • Alex Williamson's avatar
      vfio: Set container device mode · 664e9386
      Alex Williamson authored
      Minor 0 is the VFIO container device (/dev/vfio/vfio).  On it's own
      the container does not provide a user with any privileged access.  It
      only supports API version check and extension check ioctls.  Only by
      attaching a VFIO group to the container does it gain any access.  Set
      the mode of the container to allow access.
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
  4. 29 Apr, 2013 1 commit
  5. 25 Apr, 2013 1 commit
  6. 24 Apr, 2013 2 commits
  7. 15 Apr, 2013 1 commit
  8. 01 Apr, 2013 2 commits
  9. 26 Mar, 2013 1 commit
  10. 25 Mar, 2013 1 commit
  11. 15 Mar, 2013 1 commit
  12. 11 Mar, 2013 2 commits
  13. 27 Feb, 2013 1 commit
  14. 24 Feb, 2013 1 commit
  15. 18 Feb, 2013 2 commits
    • Alex Williamson's avatar
      vfio-pci: Add support for VGA region access · 84237a82
      Alex Williamson authored
      PCI defines display class VGA regions at I/O port address 0x3b0, 0x3c0
      and MMIO address 0xa0000.  As these are non-overlapping, we can ignore
      the I/O port vs MMIO difference and expose them both in a single
      region.  We make use of the VGA arbiter around each access to
      configure chipset access as necessary.
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    • Alex Williamson's avatar
      vfio-pci: Manage user power state transitions · 2dd11948
      Alex Williamson authored
      We give the user access to change the power state of the device but
      certain transitions result in an uninitialized state which the user
      cannot resolve.  To fix this we need to mark the PowerState field of
      the PMCSR register read-only and effect the requested change on behalf
      of the user.  This has the added benefit that pdev->current_state
      remains accurate while controlled by the user.
      The primary example of this bug is a QEMU guest doing a reboot where
      the device it put into D3 on shutdown and becomes unusable on the next
      boot because the device did a soft reset on D3->D0 (NoSoftRst-).
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
  16. 14 Feb, 2013 5 commits
  17. 15 Jan, 2013 1 commit
  18. 07 Dec, 2012 6 commits
  19. 10 Oct, 2012 3 commits
    • Alex Williamson's avatar
      vfio: Fix PCI INTx disable consistency · 899649b7
      Alex Williamson authored
      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: default avatarAlex Williamson <alex.williamson@redhat.com>
    • Alex Williamson's avatar
      vfio: Move PCI INTx eventfd setting earlier · 9dbdfd23
      Alex Williamson authored
      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: default avatarAlex Williamson <alex.williamson@redhat.com>
    • Alex Williamson's avatar
      vfio: Fix PCI mmap after b3b9c293 · 34002f54
      Alex Williamson authored
      Our mmap path mistakely relied on vma->vm_pgoff to get set in
      remap_pfn_range.  After b3b9c293
      , that path only applies to
      copy-on-write mappings.  Set it in our own code.
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
  20. 09 Oct, 2012 1 commit
    • Linus Torvalds's avatar
      Fix staging driver use of VM_RESERVED · 547b1e81
      Linus Torvalds authored
      The VM_RESERVED flag was killed off in commit 314e51b9
       ("mm: kill
      vma flag VM_RESERVED and mm->reserved_vm counter"), and replaced by the
      proper semantic flags (eg "don't core-dump" etc).  But there was a new
      use of VM_RESERVED that got missed by the merge.
      Fix the remaining use of VM_RESERVED in the vfio_pci driver, replacing
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation,org>
  21. 26 Sep, 2012 2 commits
  22. 21 Sep, 2012 1 commit
    • Alex Williamson's avatar
      vfio: Fix virqfd release race · b68e7fa8
      Alex Williamson authored
      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
      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: default avatarAlex Williamson <alex.williamson@redhat.com>
  23. 22 Aug, 2012 2 commits