[PATCH v3 i-g-t 0/4] Improvements for xe_sriov_flr test and xe_mmio lib

Marcin Bernatowicz marcin.bernatowicz at linux.intel.com
Thu Nov 21 14:18:47 UTC 2024


Enhance code maintainability, improve error handling, and provide clearer
debugging information.

lib/xe/xe_mmio: Replace open-coded init/cleanup with existing functions

Use intel_register_access_init and intel_register_access_fini to handle
initialization and cleanup, reducing code duplication. This improves
maintainability and ensures consistency, including handling forcewake
for Xe.

lib/xe/xe_sriov_provisioning: Refactor range handling and logging

Introduce an append_range helper to reduce code duplication in handling
provisioned PTE ranges. Limit debug logs to the first 70 entries for
clarity and improved reasoning. Enhance error handling by propagating
realloc failures.

tests/xe/xe_sriov_flr: Use SKIP for unmet subcheck prerequisites

Handle missing prerequisites by marking subchecks as SKIP instead of FAIL.
This avoids misleading results suggesting FLR issues when tests haven't
started or conditions aren't met.

v2: Handle missing prerequisites by consistently marking subchecks as
    SKIP instead of FAIL when conditions aren't met. (Lukasz)
    Update range-checking logic to iterate only within valid PTE offsets
    based on MAX_WOPCM_SIZE and GUC_GGTT_TOP.
v3: Moved the fix for updating range-check logic to iterate within
    valid PTE offsets into a separate patch.

Marcin Bernatowicz (4):
  lib/xe/xe_mmio: Replace open-coded init/cleanup with existing
    functions
  lib/xe/xe_sriov_provisioning: Refactor range handling and logging
  tests/xe/xe_sriov_flr: Use SKIP for unmet subcheck prerequisites
  lib/xe/xe_sriov_provisioning: Iterate only within valid PTE offsets

 lib/xe/xe_mmio.c               | 10 +----
 lib/xe/xe_sriov_provisioning.c | 78 +++++++++++++++++++++++-----------
 tests/intel/xe_sriov_flr.c     | 21 +++++----
 3 files changed, 68 insertions(+), 41 deletions(-)

-- 
2.31.1



More information about the igt-dev mailing list