[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <743007b791a34489b34d78328e895062@huawei.com>
Date: Thu, 19 Dec 2024 10:01:49 +0000
From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>
To: liulongfang <liulongfang@...wei.com>, "alex.williamson@...hat.com"
<alex.williamson@...hat.com>, "jgg@...dia.com" <jgg@...dia.com>, "Jonathan
Cameron" <jonathan.cameron@...wei.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linuxarm@...neuler.org" <linuxarm@...neuler.org>
Subject: RE: [PATCH v2 4/5] hisi_acc_vfio_pci: bugfix the problem of
uninstalling driver
> -----Original Message-----
> From: liulongfang <liulongfang@...wei.com>
> Sent: Thursday, December 19, 2024 9:18 AM
> To: alex.williamson@...hat.com; jgg@...dia.com; Shameerali Kolothum
> Thodi <shameerali.kolothum.thodi@...wei.com>; Jonathan Cameron
> <jonathan.cameron@...wei.com>
> Cc: kvm@...r.kernel.org; linux-kernel@...r.kernel.org;
> linuxarm@...neuler.org; liulongfang <liulongfang@...wei.com>
> Subject: [PATCH v2 4/5] hisi_acc_vfio_pci: bugfix the problem of uninstalling
> driver
>
> In a live migration scenario. If the number of VFs at the destination is
> greater than the source, the recovery operation will fail and qemu will not
> be able to complete the process and exit after shutting down the device FD.
>
> This will cause the driver to be unable to be unloaded normally due to
> abnormal reference counting of the live migration driver caused by the
> abnormal closing operation of fd.
>
> Fixes:b0eed085903e("hisi_acc_vfio_pci: Add support for VFIO live
> migration")
> Signed-off-by: Longfang Liu <liulongfang@...wei.com>
> ---
> drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> index c057c0e24693..8d9e07ebf4fd 100644
> --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> @@ -1501,6 +1501,7 @@ static void hisi_acc_vfio_pci_close_device(struct
> vfio_device *core_vdev)
> struct hisi_acc_vf_core_device *hisi_acc_vdev =
> hisi_acc_get_vf_dev(core_vdev);
> struct hisi_qm *vf_qm = &hisi_acc_vdev->vf_qm;
>
> + hisi_acc_vf_disable_fds(hisi_acc_vdev);
> mutex_lock(&hisi_acc_vdev->open_mutex);
> hisi_acc_vdev->dev_opened = false;
> iounmap(vf_qm->io_base);
Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>
Thanks,
Shameer
Powered by blists - more mailing lists