提交 2170dd04 编写于 作者: A Alexey Kardashevskiy 提交者: Alex Williamson

vfio-pci: Mask INTx if a device is not capabable of enabling it

At the moment VFIO rightfully assumes that INTx is supported if
the interrupt pin is not set to zero in the device config space.
However if that is not the case (the pin is not zero but pdev->irq is),
vfio_intx_enable() fails.

In order to prevent the userspace from trying to enable INTx when we know
that it cannot work, let's mask the PCI_INTERRUPT_PIN register.
Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
上级 1291a0d5
......@@ -207,6 +207,9 @@ static bool vfio_pci_nointx(struct pci_dev *pdev)
}
}
if (!pdev->irq)
return true;
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册