[PATCH i-g-t 0/2] Add SR-IOV simplified VF migration test

Adam Miszczak adam.miszczak at linux.intel.com
Wed Feb 19 10:25:32 UTC 2025


New test validates simplified (a.k.a fake) VF migration scenario,
that doesn't require VM and VFIO driver support, as it relies on
PF and VF driver interfaces.
Test exercise possiblity to restore previously saved GuC state,
cleared during VF states transitions and reset.
Setup involves VF(s) provisioning (either auto or manual), enablement
and driver probe.
Additionally, runtime power management is disabled to prevent VF suspend.
VF run state (pause-resume) is controlled to put VF in a state allowing
to perform save/restore operations. GuC state as well as GGTT and LMEM
raw data is read via relevant debugfs attributes for later restore.
VF health in pre- and post-migration phase is verified by running
simple workload.

SRIOV debugfs library functions added to support tested scenario:
- send VF control commands
- get/set GuC state, GTTT and LMEM data
- trigger GGTT relocation

Note, test currently requires xe driver built with SRIOV debug flag:
CONFIG_DRM_XE_DEBUG_SRIOV=y

Cc: Tomasz Lis <tomasz.lis at intel.com>
Cc: Michał Wajdeczko <michal.wajdeczko at intel.com>
Cc: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
Cc: Lukasz Laguna <lukasz.laguna at intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski at intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p at intel.com>

Adam Miszczak (2):
  lib/xe/xe_sriov_debugfs: Add VF save/restore related functions
  tests/xe_sriov_migration: VF fake migration validation

 lib/xe/xe_sriov_debugfs.c        | 252 ++++++++++++++++++++++++++
 lib/xe/xe_sriov_debugfs.h        |  31 ++++
 tests/intel/xe_sriov_migration.c | 297 +++++++++++++++++++++++++++++++
 tests/meson.build                |   1 +
 4 files changed, 581 insertions(+)
 create mode 100644 tests/intel/xe_sriov_migration.c

-- 
2.39.1



More information about the igt-dev mailing list