[PATCH v5 0/6] KUnit test for VF provisioning error handling

Satyanarayana K V P <[email protected]>
Newsgroups org.freedesktop.lists.intel-xe
Message-ID <[email protected]>
This patchset adds infrastructure and tests to verify that a VF
properly handles malformed or invalid device configuration
responses from the PF.

A VF relies on the PF to provide valid hardware configuration through GuC
KLV responses during initialization. If the PF is misconfigured or
malfunctioning, a VF may receive zero, incomplete, or out-of-range
values for critical resources like GGTT, VRAM, Contexts or Doorbells.

Add KUnit test cases that use the xe_guc_mmio_send_recv() stub to inject
bad KLV responses and verify that VF can survive without crashing for
the invalid configuration data received.

While adding this kunit test, found some missing error handling in the VF
code path for invalid doorbell,  GGTT and VRAM configurations. This
patchset also adds the missing error handling to the VF code path.

Signed-off-by: Satyanarayana K V P <[email protected]>
Cc: Michal Wajdeczko <[email protected]>

Satyanarayana K V P (6):
  drm/xe/guc: Allow to replace xe_guc_mmio_send_recv() with KUNIT stub
  drm/xe/vf: Split submission config query helpers
  drm/xe/vf: Add bounds checking for queried context and doorbell counts
  drm/xe/vf: Add bounds checking for queried GGTT base and size
  drm/xe/vf: Add bounds checking for queried VRAM size
  drm/xe/tests: Add KUnit tests for VF provisioning error handling

 .../gpu/drm/xe/tests/xe_gt_sriov_vf_kunit.c   | 322 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c           |  84 ++++-
 drivers/gpu/drm/xe/xe_guc.c                   |   5 +
 3 files changed, 402 insertions(+), 9 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/tests/xe_gt_sriov_vf_kunit.c

-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.