Skip to content

Add SR-IOV exit-handler-based cleanup

Marcin Bernatowicz igt-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 2 repliesIn review
  2. v16 patches 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6lib/igt_device_sriov: Add generic SR-IOV exit cleanup helperlib/igt_sriov_device.c lib/igt_sriov_device.h+96 -01 reply
2/6lib/xe/xe_sriov_admin: Add SR-IOV admin exit cleanup restore helperlib/xe/xe_sriov_admin.c lib/xe/xe_sriov_admin.h+23 -00 replies
3/6tests/sriov_basic: Arm SR-IOV exit cleanuptests/sriov_basic.c+2 -00 replies
4/6tests/xe: Arm SR-IOV exit cleanuptests/intel/xe_sriov_auto_provisioning.c tests/intel/xe_sriov_vram.c+4 -00 replies
5/6tests/xe: Arm SR-IOV exit cleanup with callbacktests/intel/xe_pmu.c tests/intel/xe_sriov_admin.c tests/intel/xe_sriov_scheduling.c+12 -00 replies
6/6tests/intel/xe_sriov_flr: Arm SR-IOV exit cleanuptests/intel/xe_sriov_flr.c+33 -90 replies

Reviews trailers per patch

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

PatchLukasz LagunaJakub Kolakowski
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-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 i-g-t 0/6] Add SR-IOV exit-handler-based cleanup

This series adds SR-IOV exit-handler-based cleanup in SR-IOV test paths to improve recovery when a test exits unexpectedly (for example, via SIGQUIT from igt_runner), while preserving strict explicit teardown
in normal fixture flow.

Goal: keep PF state restoration robust across failures:
- disable VFs on exit
- restore sriov_drivers_autoprobe state
- restore XE SR-IOV admin scheduling defaults when modified by the test
- keep explicit fixture teardown authoritative, and clear the exit handler only after teardown succeeds

Series is split by teardown pattern to keep review and maintenance simple:
- no-callback users
- XE admin callback users
- FLR-specific callback users, plus helper refactor to reduce duplication

v2: No need for restore_autoprobe option,
just always restore on exit. (Lukasz)

Marcin Bernatowicz (6):
lib/igt_device_sriov: Add generic SR-IOV exit cleanup helper lib/xe/xe_sriov_admin: Add SR-IOV admin exit cleanup restore helper tests/sriov_basic: Arm SR-IOV exit cleanup
tests/xe: Arm SR-IOV exit cleanup
tests/xe: Arm SR-IOV exit cleanup with callback tests/intel/xe_sriov_flr: Arm SR-IOV exit cleanup

 lib/igt_sriov_device.c                   | 91 ++++++++++++++++++++++++
 lib/igt_sriov_device.h                   |  5 ++
 lib/xe/xe_sriov_admin.c                  | 21 ++++++
 lib/xe/xe_sriov_admin.h                  |  2 +
 tests/intel/xe_pmu.c                     |  4 ++
 tests/intel/xe_sriov_admin.c             |  4 ++
 tests/intel/xe_sriov_auto_provisioning.c |  2 +
 tests/intel/xe_sriov_flr.c               | 42 ++++++++---
 tests/intel/xe_sriov_scheduling.c        |  4 ++
 tests/intel/xe_sriov_vram.c              |  2 +
 tests/sriov_basic.c                      |  2 +
 11 files changed, 170 insertions(+), 9 deletions(-)
Signature · 1 line
2.43.0