mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 13:38:36 -07:00
vfio/pci: Disable INTx in vfio_realize error path
When vfio realize fails, INTx isn't disabled if it has been enabled.
This may confuse host side with unhandled interrupt report.
Fixes: c5478fea27 ("vfio/pci: Respond to KVM irqchip change notifier")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
0ddcb39c93
commit
adee0da036
1 changed files with 3 additions and 0 deletions
|
|
@ -3220,6 +3220,9 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
out_deregister:
|
out_deregister:
|
||||||
|
if (vdev->interrupt == VFIO_INT_INTx) {
|
||||||
|
vfio_intx_disable(vdev);
|
||||||
|
}
|
||||||
pci_device_set_intx_routing_notifier(&vdev->pdev, NULL);
|
pci_device_set_intx_routing_notifier(&vdev->pdev, NULL);
|
||||||
if (vdev->irqchip_change_notifier.notify) {
|
if (vdev->irqchip_change_notifier.notify) {
|
||||||
kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier);
|
kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue