]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: Fix PCI INTx disable consistency
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 10 Oct 2012 15:10:32 +0000 (09:10 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 10 Oct 2012 15:10:32 +0000 (09:10 -0600)
commit532780a69c50185eaedd70bd44e4bdaa516f4152
treea86eae8128cf6f271ada3b4c4e4eb43238f56233
parente1c990ad321f1840c61023b23bb487278864573b
vfio: Fix PCI INTx disable consistency

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: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci_intrs.c