public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vfio/xe: avoid duplicate reset in xe_vfio_pci_reset_done
@ 2026-04-24  9:17 zhaoguohan
  2026-04-24 16:47 ` Alex Williamson
  2026-04-27  1:21 ` [PATCH v2] " zhaoguohan
  0 siblings, 2 replies; 3+ messages in thread
From: zhaoguohan @ 2026-04-24  9:17 UTC (permalink / raw)
  To: Alex Williamson, Michał Winiarski, kvm, intel-xe
  Cc: Jason Gunthorpe, Yishai Hadas, Shameer Kolothum, Kevin Tian,
	linux-kernel

From: GuoHan Zhao <zhaoguohan@kylinos.cn>

xe_vfio_pci_reset_done() sets deferred_reset and, when it manages to
acquire state_mutex itself, hands the cleanup off to
xe_vfio_pci_state_mutex_unlock().

That helper already clears deferred_reset and runs xe_vfio_pci_reset()
before dropping the mutex. Calling xe_vfio_pci_reset() again right
afterwards repeats the reset handling unnecessarily.

Fixes: 1b81ed612e12 ("vfio/xe: Reorganize the init to decouple migration from reset")
Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
---
 drivers/vfio/pci/xe/main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
index 4ecadbbfd86e..cbff5af385ef 100644
--- a/drivers/vfio/pci/xe/main.c
+++ b/drivers/vfio/pci/xe/main.c
@@ -135,8 +135,6 @@ static void xe_vfio_pci_reset_done(struct pci_dev *pdev)
 	}
 	spin_unlock(&xe_vdev->reset_lock);
 	xe_vfio_pci_state_mutex_unlock(xe_vdev);
-
-	xe_vfio_pci_reset(xe_vdev);
 }
 
 static const struct pci_error_handlers xe_vfio_pci_err_handlers = {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-27  1:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-24  9:17 [PATCH] vfio/xe: avoid duplicate reset in xe_vfio_pci_reset_done zhaoguohan
2026-04-24 16:47 ` Alex Williamson
2026-04-27  1:21 ` [PATCH v2] " zhaoguohan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox