From: Longfang Liu <liulongfang@huawei.com>
To: <alex.williamson@redhat.com>, <jgg@nvidia.com>,
<jonathan.cameron@huawei.com>
Cc: <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<liulongfang@huawei.com>
Subject: [PATCH v2 3/4] hisi_acc_vfio_pci: resolve duplicate migration states
Date: Thu, 22 Jan 2026 10:02:04 +0800 [thread overview]
Message-ID: <20260122020205.2884497-4-liulongfang@huawei.com> (raw)
In-Reply-To: <20260122020205.2884497-1-liulongfang@huawei.com>
In special scenarios involving duplicate migrations, after the
first migration is completed, if the original VF device is used
again and then migrated to another destination, the state indicating
data migration completion for the VF device is not reset.
This results in the second migration to the destination being skipped
without performing data migration.
After the modification, it ensures that a complete data migration
is performed after the subsequent migration.
Signed-off-by: Longfang Liu <liulongfang@huawei.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 c69caef2e910..483381189579 100644
--- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
+++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
@@ -1569,6 +1569,7 @@ static int hisi_acc_vfio_pci_open_device(struct vfio_device *core_vdev)
}
hisi_acc_vdev->mig_state = VFIO_DEVICE_STATE_RUNNING;
hisi_acc_vdev->dev_opened = true;
+ hisi_acc_vdev->match_done = 0;
mutex_unlock(&hisi_acc_vdev->open_mutex);
}
--
2.33.0
next prev parent reply other threads:[~2026-01-22 2:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 2:02 [PATCH v2 0/4] bugfix some issues under abnormal scenarios Longfang Liu
2026-01-22 2:02 ` [PATCH v2 1/4] hisi_acc_vfio_pci: fix VF reset timeout issue Longfang Liu
2026-01-22 2:02 ` [PATCH v2 2/4] hisi_acc_vfio_pci: update status after RAS error Longfang Liu
2026-01-22 2:02 ` Longfang Liu [this message]
2026-01-22 2:02 ` [PATCH v2 4/4] hisi_acc_vfio_pci: fix the queue parameter anomaly issue Longfang Liu
2026-01-29 21:58 ` [PATCH v2 0/4] bugfix some issues under abnormal scenarios Alex Williamson
2026-01-30 2:08 ` liulongfang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260122020205.2884497-4-liulongfang@huawei.com \
--to=liulongfang@huawei.com \
--cc=alex.williamson@redhat.com \
--cc=jgg@nvidia.com \
--cc=jonathan.cameron@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®