Skip to content

Xe SR-IOV admin scheduling helpers and test updates

Marcin Bernatowicz igt-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 6 repliesIn review
  2. v210 patches 11 repliesSuperseded
  3. v15 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- Renamed the xe_sriov_admin_profile test binary to xe_sriov_admin.
- Made SR-IOV admin accessor naming consistent (__xe_sriov_admin_* / xe_sriov_admin_*) and updated all users.
- Expanded sched_priority negative coverage by trying all available tokens when validating VF write-denied behavior.
- Switched mask formatting helpers to return explicit error codes and adjusted callers/tests accordingly.
- Minor logging improvements and formatting fixes.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10lib/igt_sysfs_choice: Add helpers for sysfs enumerated choice attributeslib/igt_sysfs_choice.c lib/igt_sysfs_choice.h lib/meson.build+492 -01 reply
2/10lib/tests/igt_sysfs_choice: Add test coveragelib/tests/igt_sysfs_choice.c lib/tests/meson.build+389 -01 reply
3/10lib/xe/xe_sriov_provisioning: Add string conversion helpers for scheduling prioritylib/xe/xe_sriov_provisioning.c lib/xe/xe_sriov_provisioning.h+60 -00 replies
4/10lib/xe/xe_sriov_provisioning: Add sched priority mask to string helperlib/xe/xe_sriov_provisioning.c lib/xe/xe_sriov_provisioning.h+60 -01 reply
5/10lib/igt_sriov_device: Add helper for PF/VF sysfs path formattinglib/igt_sriov_device.c lib/igt_sriov_device.h+20 -00 replies
6/10lib/xe/xe_sriov_admin: Add SR-IOV admin sysfs accessorslib/meson.build lib/xe/xe_sriov_admin.c lib/xe/xe_sriov_admin.h+686 -01 reply
7/10tests/intel/xe_sriov_scheduling: Avoid assert on scheduling params restore in cleanuptests/intel/xe_sriov_scheduling.c+32 -90 replies
8/10tests/intel/xe_sriov_scheduling: Prefer SR-IOV admin sysfs accessorstests/intel/xe_sriov_scheduling.c+17 -210 replies
9/10tests/intel/xe_pmu: Prefer SR-IOV admin sysfs accessorstests/intel/xe_pmu.c+22 -210 replies
10/10tests/intel/xe_sriov_admin: Add SR-IOV admin sysfs scheduling attributes teststests/intel/xe_sriov_admin.c tests/meson.build+435 -01 reply

Reviews trailers per patch

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

PatchLukasz Laguna
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

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

Read the v3 thread

Cover letter [PATCH v3 i-g-t 00/10] Xe SR-IOV admin scheduling helpers and test updates

This v3 series introduces a generic helper for sysfs "choice" attributes and wires Xe SR-IOV scheduling helpers and tests to the SR-IOV admin sysfs interface.

Patches 1–2 add igt_sysfs_choice and unit tests for parsing and formatting enumerated sysfs values such as sched_priority. Patches 3–4 convert the existing sched_priority helpers in xe_sriov_provisioning into thin wrappers around igt_sysfs_choice. Patch 5 adds a small PF/VF sysfs path helper used by the SR-IOV code. Patch 6 exposes SR-IOV admin sysfs accessors for execution quantum, preemption timeout, scheduling priority, VF stop and restoring defaults, following recent kernel changes:

Patches 7–10 update the xe_sriov_scheduling and xe_pmu tests to prefer the admin interface, improve cleanup, and add coverage for SR-IOV admin sysfs scheduling attributes in xe_sriov_admin_profile.

v2 -> v3:
- Renamed the xe_sriov_admin_profile test binary to xe_sriov_admin.
- Made SR-IOV admin accessor naming consistent (__xe_sriov_admin_* / xe_sriov_admin_*) and updated all users.
- Expanded sched_priority negative coverage by trying all available tokens when validating VF write-denied behavior.
- Switched mask formatting helpers to return explicit error codes and adjusted callers/tests accordingly.
- Minor logging improvements and formatting fixes.

v1 -> v2:
- Added generic igt_sysfs_choice helper and unit tests.
- Reworked sched_priority helpers to use igt_sysfs_choice wrappers.
- Introduced igt_sriov_func_str() PF/VF sysfs path helper.
- Extended SR-IOV admin helpers with scheduling accessors.
- Updated xe_sriov_scheduling and xe_pmu to prefer SR-IOV admin sysfs.
- Added xe_sriov_admin_profile tests for admin sysfs scheduling attributes (defaults, write->readback, bulk updates).

Marcin Bernatowicz (10):
lib/igt_sysfs_choice: Add helpers for sysfs enumerated choice
attributes
lib/tests/igt_sysfs_choice: Add test coverage lib/xe/xe_sriov_provisioning: Add string conversion helpers for
scheduling priority
lib/xe/xe_sriov_provisioning: Add sched priority mask to string helper lib/igt_sriov_device: Add helper for PF/VF sysfs path formatting lib/xe/xe_sriov_admin: Add SR-IOV admin sysfs accessors tests/intel/xe_sriov_scheduling: Avoid assert on scheduling params
restore in cleanup
tests/intel/xe_sriov_scheduling: Prefer SR-IOV admin sysfs accessors tests/intel/xe_pmu: Prefer SR-IOV admin sysfs accessors tests/intel/xe_sriov_admin: Add SR-IOV admin sysfs scheduling
attributes tests

 lib/igt_sriov_device.c            |  19 +
 lib/igt_sriov_device.h            |   1 +
 lib/igt_sysfs_choice.c            | 439 +++++++++++++++++++++
 lib/igt_sysfs_choice.h            |  52 +++
 lib/meson.build                   |   2 +
 lib/tests/igt_sysfs_choice.c      | 388 +++++++++++++++++++
 lib/tests/meson.build             |   1 +
 lib/xe/xe_sriov_admin.c           | 625 ++++++++++++++++++++++++++++++
 lib/xe/xe_sriov_admin.h           |  60 +++
 lib/xe/xe_sriov_provisioning.c    | 105 +++++
 lib/xe/xe_sriov_provisioning.h    |  15 +
 tests/intel/xe_pmu.c              |  43 +-
 tests/intel/xe_sriov_admin.c      | 434 +++++++++++++++++++++
 tests/intel/xe_sriov_scheduling.c |  43 +-
 tests/meson.build                 |   1 +
 15 files changed, 2195 insertions(+), 33 deletions(-)
 create mode 100644 lib/igt_sysfs_choice.c
 create mode 100644 lib/igt_sysfs_choice.h
 create mode 100644 lib/tests/igt_sysfs_choice.c
 create mode 100644 lib/xe/xe_sriov_admin.c
 create mode 100644 lib/xe/xe_sriov_admin.h
 create mode 100644 tests/intel/xe_sriov_admin.c
Signature · 1 line
2.43.0