Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/7] KUnit test for VF provisioning error handling
@ 2026-08-12 12:43 Satyanarayana K V P
  2026-08-12 12:43 ` [PATCH v6 1/7] drm/xe/guc: Allow to replace xe_guc_mmio_send_recv() with KUNIT stub Satyanarayana K V P
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Satyanarayana K V P @ 2026-08-12 12:43 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 (7):
  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 xe_vram size
  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

 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   | 484 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_bo.c                    |   6 +-
 drivers/gpu/drm/xe/xe_device.h                |  10 +
 drivers/gpu/drm/xe/xe_ggtt.c                  |   2 +-
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c    |   4 +-
 drivers/gpu/drm/xe/xe_gt_sriov_vf.c           |  81 ++-
 drivers/gpu/drm/xe/xe_guc.c                   |   5 +
 drivers/gpu/drm/xe/xe_query.c                 |   5 +-
 drivers/gpu/drm/xe/xe_vm.c                    |   4 +-
 13 files changed, 585 insertions(+), 24 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/tests/xe_gt_sriov_vf_kunit.c

-- 
2.53.0


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

end of thread, other threads:[~2026-08-12 18:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 12:43 [PATCH v6 0/7] KUnit test for VF provisioning error handling Satyanarayana K V P
2026-08-12 12:43 ` [PATCH v6 1/7] drm/xe/guc: Allow to replace xe_guc_mmio_send_recv() with KUNIT stub Satyanarayana K V P
2026-08-12 12:43 ` [PATCH v6 2/7] drm/xe/vf: Split submission config query helpers Satyanarayana K V P
2026-08-12 12:43 ` [PATCH v6 3/7] drm/xe/vf: Add bounds checking for queried context and doorbell counts Satyanarayana K V P
2026-08-12 12:43 ` [PATCH v6 4/7] drm/xe: Introduce helpers for xe_vram size Satyanarayana K V P
2026-08-12 12:55   ` sashiko-bot
2026-08-12 12:43 ` [PATCH v6 5/7] drm/xe/vf: Add bounds checking for queried GGTT base and size Satyanarayana K V P
2026-08-12 12:55   ` sashiko-bot
2026-08-12 12:43 ` [PATCH v6 6/7] drm/xe/vf: Add bounds checking for queried VRAM size Satyanarayana K V P
2026-08-12 13:02   ` sashiko-bot
2026-08-12 12:43 ` [PATCH v6 7/7] drm/xe/tests: Add KUnit tests for VF provisioning error handling Satyanarayana K V P
2026-08-12 13:00   ` sashiko-bot
2026-08-12 13:18 ` ✗ CI.checkpatch: warning for KUnit test for VF provisioning error handling (rev6) Patchwork
2026-08-12 13:19 ` ✓ CI.KUnit: success " Patchwork
2026-08-12 14:20 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-12 18:27 ` ✓ 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