lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251120123647.3522082-3-michal.winiarski@intel.com>
Date: Thu, 20 Nov 2025 13:36:43 +0100
From: Michał Winiarski <michal.winiarski@...el.com>
To: Jason Gunthorpe <jgg@...pe.ca>, Alex Williamson <alex@...zbot.org>, "Kevin
 Tian" <kevin.tian@...el.com>, Yishai Hadas <yishaih@...dia.com>, Longfang Liu
	<liulongfang@...wei.com>, Shameer Kolothum <skolothumtho@...dia.com>, "Brett
 Creeley" <brett.creeley@....com>, Giovanni Cabiddu
	<giovanni.cabiddu@...el.com>, <kvm@...r.kernel.org>, <qat-linux@...el.com>,
	<virtualization@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
CC: Michał Winiarski <michal.winiarski@...el.com>
Subject: [PATCH 2/6] hisi_acc_vfio_pci: Use .migration_reset_state() callback

Move the migration device state reset code from .reset_done() to
dedicated callback.

Signed-off-by: Michał Winiarski <michal.winiarski@...el.com>
---
 drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
index fde33f54e99ec..eafdf62ee29ef 100644
--- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
+++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
@@ -1169,9 +1169,10 @@ hisi_acc_vfio_pci_get_device_state(struct vfio_device *vdev,
 	return 0;
 }
 
-static void hisi_acc_vf_pci_aer_reset_done(struct pci_dev *pdev)
+static void
+hisi_acc_vfio_pci_reset_device_state(struct vfio_device *vdev)
 {
-	struct hisi_acc_vf_core_device *hisi_acc_vdev = hisi_acc_drvdata(pdev);
+	struct hisi_acc_vf_core_device *hisi_acc_vdev = hisi_acc_get_vf_dev(vdev);
 
 	if (hisi_acc_vdev->core_device.vdev.migration_flags !=
 				VFIO_MIGRATION_STOP_COPY)
@@ -1529,6 +1530,7 @@ static void hisi_acc_vfio_pci_close_device(struct vfio_device *core_vdev)
 static const struct vfio_migration_ops hisi_acc_vfio_pci_migrn_state_ops = {
 	.migration_set_state = hisi_acc_vfio_pci_set_device_state,
 	.migration_get_state = hisi_acc_vfio_pci_get_device_state,
+	.migration_reset_state = hisi_acc_vfio_pci_reset_device_state,
 	.migration_get_data_size = hisi_acc_vfio_pci_get_data_size,
 };
 
@@ -1689,7 +1691,6 @@ static const struct pci_device_id hisi_acc_vfio_pci_table[] = {
 MODULE_DEVICE_TABLE(pci, hisi_acc_vfio_pci_table);
 
 static const struct pci_error_handlers hisi_acc_vf_err_handlers = {
-	.reset_done = hisi_acc_vf_pci_aer_reset_done,
 	.error_detected = vfio_pci_core_aer_err_detected,
 };
 
-- 
2.51.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ