[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 3/7] vfio/pci: Disable INTx in vfio_realize error path
From: |
Joao Martins |
Subject: |
Re: [PATCH v5 3/7] vfio/pci: Disable INTx in vfio_realize error path |
Date: |
Fri, 30 Jun 2023 10:41:41 +0100 |
On 30/06/2023 08:36, Zhenzhong Duan wrote:
> 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>
> ---
> hw/vfio/pci.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index ab6645ba60af..31c4ab250fbe 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -3220,6 +3220,9 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
> return;
>
> out_deregister:
> + if (vdev->interrupt == VFIO_INT_INTx) {
> + vfio_intx_disable(vdev);
> + }
> pci_device_set_intx_routing_notifier(&vdev->pdev, NULL);
> if (vdev->irqchip_change_notifier.notify) {
> kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier);
- [PATCH v5 0/7] VFIO migration related refactor and bug fix, Zhenzhong Duan, 2023/06/30
- [PATCH v5 3/7] vfio/pci: Disable INTx in vfio_realize error path, Zhenzhong Duan, 2023/06/30
- Re: [PATCH v5 3/7] vfio/pci: Disable INTx in vfio_realize error path,
Joao Martins <=
- [PATCH v5 4/7] vfio/migration: Return bool type for some vfio migration related functions, Zhenzhong Duan, 2023/06/30
- [PATCH v5 5/7] vfio/migration: Change vIOMMU blocker from global to per device, Zhenzhong Duan, 2023/06/30
- [PATCH v5 6/7] vfio/migration: Free resources when vfio_migration_realize fails, Zhenzhong Duan, 2023/06/30
- [PATCH v5 7/7] vfio/migration: Remove print of "Migration disabled", Zhenzhong Duan, 2023/06/30