All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 00/10] KUnit test for VF provisioning error handling
@ 2026-09-15  7:11 Satyanarayana K V P
  2026-09-15  7:11 ` [PATCH v8 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; 20+ messages in thread
From: Satyanarayana K V P @ 2026-09-15  7:11 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   | 393 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_bo.c                    |   6 +-
 drivers/gpu/drm/xe/xe_device.h                |  10 +
 drivers/gpu/drm/xe/xe_ggtt.c                  |  18 +-
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c    |   4 +-
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c           | 113 ++++-
 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, 533 insertions(+), 32 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/tests/xe_gt_sriov_vf_kunit.c

-- 
2.53.0


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

end of thread, other threads:[~2026-09-15 14:33 UTC | newest]

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.