Skip to content
  1. Oct 11, 2012
  2. Oct 10, 2012
    • 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>
      899649b7
    • 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>
      9dbdfd23