public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Improve VF FLR synchronization for Xe VFIO
@ 2026-03-09 15:24 Piórkowski, Piotr
  2026-03-09 15:24 ` [PATCH v2 1/2] drm/xe/pf: Add FLR_PREPARE state to VF control flow Piórkowski, Piotr
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Piórkowski, Piotr @ 2026-03-09 15:24 UTC (permalink / raw)
  To: intel-xe, kvm; +Cc: Piotr Piórkowski

From: Piotr Piórkowski <piotr.piorkowski@intel.com>

When xe-vfio-pci waits for VF FLR completion, it may start waiting
for "FLR done" before the PF driver is notified about the reset by
the GuC. With delayed HW/FW notification, the PF may not yet observe
VF FLR in progress when the wait path is entered, which can lead to
the reset being treated as completed before it has actually begun.

This series introduces an optional FLR_PREPARE state in the PF control
flow to mark that a VF reset is pending before the GuC VF FLR event is
received. The wait path treats this state the same as FLR_WIP, ensuring
that external waiters do not return prematurely.

The second patch hooks into the PCI error handler reset_prepare()
callback in xe-vfio-pci to notify the PF about the upcoming VF reset
before reset_done() is executed.

Piotr Piórkowski (2):
  drm/xe/pf: Add FLR_PREPARE state to VF control flow
  vfio/xe: Notify PF about VF FLR in reset_prepare

 drivers/gpu/drm/xe/xe_gt_sriov_pf_control.c   | 78 +++++++++++++++----
 drivers/gpu/drm/xe/xe_gt_sriov_pf_control.h   |  1 +
 .../gpu/drm/xe/xe_gt_sriov_pf_control_types.h |  2 +
 drivers/gpu/drm/xe/xe_sriov_pf_control.c      | 24 ++++++
 drivers/gpu/drm/xe/xe_sriov_pf_control.h      |  1 +
 drivers/gpu/drm/xe/xe_sriov_vfio.c            |  1 +
 drivers/vfio/pci/xe/main.c                    | 14 ++++
 include/drm/intel/xe_sriov_vfio.h             | 11 +++
 8 files changed, 116 insertions(+), 16 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-03-23 16:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 15:24 [PATCH v2 0/2] Improve VF FLR synchronization for Xe VFIO Piórkowski, Piotr
2026-03-09 15:24 ` [PATCH v2 1/2] drm/xe/pf: Add FLR_PREPARE state to VF control flow Piórkowski, Piotr
2026-03-23 16:40   ` Michał Winiarski
2026-03-09 15:24 ` [PATCH v2 2/2] vfio/xe: Notify PF about VF FLR in reset_prepare Piórkowski, Piotr
2026-03-17 14:43   ` Alex Williamson
2026-03-23 16:38     ` Michał Winiarski
2026-03-09 15:34 ` ✓ CI.KUnit: success for Improve VF FLR synchronization for Xe VFIO (rev2) Patchwork
2026-03-09 16:37 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-09 20:16 ` ✗ Xe.CI.FULL: failure " Patchwork

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