vfio/pci: Disable INTx in vfio_realize error path
commitadee0da0368f50b3ee934cdeeb6076466dabb268
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Mon, 3 Jul 2023 07:15:06 +0000 (3 15:15 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 10 Jul 2023 07:52:52 +0000 (10 09:52 +0200)
tree21f05127fabdb8fde2f70ce8831313099e21bd43
parent0ddcb39c93571da4fdcc39fc770500d2d275376d
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: c5478fea27ac ("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>
hw/vfio/pci.c