Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 00/10] KUnit test for VF provisioning error handling
@ 2026-09-18 10:05 Satyanarayana K V P
  2026-09-18 10:05 ` [PATCH v9 01/10] drm/xe/guc: Allow to replace xe_guc_mmio_send_recv() with KUNIT stub Satyanarayana K V P
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: Satyanarayana K V P @ 2026-09-18 10:05 UTC (permalink / raw)
  To: intel-xe; +Cc: Satyanarayana K V P, Michal Wajdeczko

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 <satyanarayana.k.v.p@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>

Satyanarayana K V P (10):
  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: Introduce helpers for VRAM alignment
  drm/xe/ggtt: Avoid integer overflow when validating VF GGTT range
  drm/xe/vf: Add bounds checking for queried GGTT base and size
  drm/xe/pf: Align VF GGTT allocations to PAGE_SIZE
  drm/xe/vf: Add alignment check for queried VRAM size
  drm/xe/ggtt: Add KUNIT stub for xe_ggtt_shift_nodes()
  drm/xe/tests: Add KUnit tests for VF provisioning error handling

 drivers/gpu/drm/xe/display/xe_fb_pin.c        |   2 +-
 drivers/gpu/drm/xe/display/xe_initial_plane.c |   2 +-
 drivers/gpu/drm/xe/tests/xe_bo.c              |   2 +-
 drivers/gpu/drm/xe/tests/xe_dma_buf.c         |   2 +-
 .../gpu/drm/xe/tests/xe_gt_sriov_vf_kunit.c   | 666 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_bo.c                    |   6 +-
 drivers/gpu/drm/xe/xe_device.h                |  10 +
 drivers/gpu/drm/xe/xe_ggtt.c                  |  25 +-
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c    |   4 +-
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c           | 114 ++-
 drivers/gpu/drm/xe/xe_guc.c                   |   5 +
 drivers/gpu/drm/xe/xe_query.c                 |   2 +-
 drivers/gpu/drm/xe/xe_svm.c                   |   2 +-
 drivers/gpu/drm/xe/xe_vm.c                    |   4 +-
 14 files changed, 812 insertions(+), 34 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/tests/xe_gt_sriov_vf_kunit.c

-- 
2.53.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-09-18 19:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 10:05 [PATCH v9 00/10] KUnit test for VF provisioning error handling Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 01/10] drm/xe/guc: Allow to replace xe_guc_mmio_send_recv() with KUNIT stub Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 02/10] drm/xe/vf: Split submission config query helpers Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 03/10] drm/xe/vf: Add bounds checking for queried context and doorbell counts Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 04/10] drm/xe: Introduce helpers for VRAM alignment Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 05/10] drm/xe/ggtt: Avoid integer overflow when validating VF GGTT range Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 06/10] drm/xe/vf: Add bounds checking for queried GGTT base and size Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 07/10] drm/xe/pf: Align VF GGTT allocations to PAGE_SIZE Satyanarayana K V P
2026-09-18 10:41   ` sashiko-bot
2026-09-18 10:05 ` [PATCH v9 08/10] drm/xe/vf: Add alignment check for queried VRAM size Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 09/10] drm/xe/ggtt: Add KUNIT stub for xe_ggtt_shift_nodes() Satyanarayana K V P
2026-09-18 10:05 ` [PATCH v9 10/10] drm/xe/tests: Add KUnit tests for VF provisioning error handling Satyanarayana K V P
2026-09-18 10:37   ` sashiko-bot
2026-09-18 10:12 ` ✗ CI.checkpatch: warning for KUnit test for VF provisioning error handling (rev9) Patchwork
2026-09-18 10:14 ` ✓ CI.KUnit: success " Patchwork
2026-09-18 10:53 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-18 19:43 ` ✓ Xe.CI.FULL: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox