From nobody Mon Feb 9 09:10:01 2026 Received: from canpmsgout06.his.huawei.com (canpmsgout06.his.huawei.com [113.46.200.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFBFD3502B5; Thu, 22 Jan 2026 02:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.221 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769047430; cv=none; b=NzfHgkd2vkbUo+pw537EZsiFtzGafqpZn+4QFLu0ea1muXlet1SJ8HCfmOhiObKvKSx6K7UkoK67i86TvYqK1yDOKXjjeQGU9xIgHfQpODj3NLjq/kMby62WBfHwMA7mhquwtjz09EN9Ai2sBSNLKygzUjYFmo4qA3R+o0JdVQI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769047430; c=relaxed/simple; bh=+6hYcwpo6B/y0l1BV3A8yS1Gd0gu3SxEmB4U6t2O9U0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=k7sBDZSg3zm0ijh86wd4Ruyb1ch9EfFJcA9EecxAskxdHKPmvy06u/yHBgX/pEufG3k7kdZ/h7dCJ0c8wtGl1lU6mfd0E0hzYI97qKd/eFPc9nXo1deuSeTKlrHv6SJ3Gv+IU59EWUR0BMvRSx5Din6r1u9Rw1mTRKzsc0SUdWg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=X0XyR1yl; arc=none smtp.client-ip=113.46.200.221 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="X0XyR1yl" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=aFbb0Ff318wVp5lkg5op/8HHlyaW3gPAQEPWd3LLGEo=; b=X0XyR1ylL3KLFahh/e94CVClvO2oJ721xdd4V7aLxFB+Lb1q4UqipojwXncEh/CNGuomSDvwh LcwerNGl5YRk2egimHxgi8YbrriCagVctVC44G4hZkSztzVTM9Ks/hDotiMQq0NvObyqOawBXLH ajdwVNI2yk3fBCkyCo5kPJU= Received: from mail.maildlp.com (unknown [172.19.162.144]) by canpmsgout06.his.huawei.com (SkyGuard) with ESMTPS id 4dxPQm3c82zRhR4; Thu, 22 Jan 2026 10:00:16 +0800 (CST) Received: from dggpemf500015.china.huawei.com (unknown [7.185.36.143]) by mail.maildlp.com (Postfix) with ESMTPS id EE06A40567; Thu, 22 Jan 2026 10:03:40 +0800 (CST) Received: from huawei.com (10.90.31.46) by dggpemf500015.china.huawei.com (7.185.36.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 22 Jan 2026 10:03:40 +0800 From: Longfang Liu To: , , CC: , , Subject: [PATCH v2 3/4] hisi_acc_vfio_pci: resolve duplicate migration states Date: Thu, 22 Jan 2026 10:02:04 +0800 Message-ID: <20260122020205.2884497-4-liulongfang@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20260122020205.2884497-1-liulongfang@huawei.com> References: <20260122020205.2884497-1-liulongfang@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems200002.china.huawei.com (7.221.188.68) To dggpemf500015.china.huawei.com (7.185.36.143) Content-Type: text/plain; charset="utf-8" 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 --- 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 =3D VFIO_DEVICE_STATE_RUNNING; hisi_acc_vdev->dev_opened =3D true; + hisi_acc_vdev->match_done =3D 0; mutex_unlock(&hisi_acc_vdev->open_mutex); } =20 --=20 2.33.0