Skip to content

Improve VF FLR synchronization for Xe VFIO

Piórkowski, Piotr intel-xe kvm 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe/pf: Add FLR_PREPARE state to VF control flowdrivers/gpu/drm/xe/xe_gt_sriov_pf_control.c drivers/gpu/drm/xe/xe_gt_sriov_pf_control.h drivers/gpu/drm/xe/xe_gt_sriov_pf_control_types.h +4 more+102 -161 reply
2/2vfio/xe: Notify PF about VF FLR in reset_preparedrivers/vfio/pci/xe/main.c+14 -02 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAlex WilliamsonMichał Winiarski
1/2R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] Improve VF FLR synchronization for Xe VFIO

From: Piotr Piórkowski <[email protected]>

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(-)
Signature · 1 line
2.34.1