]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
hisi_acc_vfio_pci: update status after RAS error
authorLongfang Liu <liulongfang@huawei.com>
Thu, 22 Jan 2026 02:02:03 +0000 (10:02 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:34 +0000 (07:20 -0500)
[ Upstream commit 8be14dd48dfee0df91e511acceb4beeb2461a083 ]

After a RAS error occurs on the accelerator device, the accelerator
device will be reset. The live migration state will be abnormal
after reset, and the original state needs to be restored during
the reset process.
Therefore, reset processing needs to be performed in a live
migration scenario.

Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Link: https://lore.kernel.org/r/20260122020205.2884497-3-liulongfang@huawei.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c

index 2b8ac97cef2d2e0029407c7fb9a225f716556b93..e61df3fe0db99a3c1ed81e58ca4d7b96a8c72ad4 100644 (file)
@@ -1215,8 +1215,7 @@ static void hisi_acc_vf_pci_aer_reset_done(struct pci_dev *pdev)
        if (hisi_acc_vdev->set_reset_flag)
                clear_bit(QM_RESETTING, &qm->misc_ctl);
 
-       if (hisi_acc_vdev->core_device.vdev.migration_flags !=
-                               VFIO_MIGRATION_STOP_COPY)
+       if (!hisi_acc_vdev->core_device.vdev.mig_ops)
                return;
 
        mutex_lock(&hisi_acc_vdev->state_mutex);