mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 12:37:32 +00:00
vfio-pci: Disable INTx after MSI/X teardown
The MSI/X shutdown path can gratuitously enable INTx, which is not something we want to happen if we're dealing with broken INTx device. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
ddf9dc0eb5
commit
c93a97ee05
1 changed files with 7 additions and 0 deletions
|
@ -414,6 +414,13 @@ static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix)
|
|||
} else
|
||||
pci_disable_msi(pdev);
|
||||
|
||||
/*
|
||||
* Both disable paths above use pci_intx_for_msi() to clear DisINTx
|
||||
* via their shutdown paths. Restore for NoINTx devices.
|
||||
*/
|
||||
if (vdev->nointx)
|
||||
pci_intx(pdev, 0);
|
||||
|
||||
vdev->irq_type = VFIO_PCI_NUM_IRQS;
|
||||
vdev->num_ctx = 0;
|
||||
kfree(vdev->ctx);
|
||||
|
|
Loading…
Reference in a new issue