public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] tests/intel/xe_configfs: Skip ctx-restore subtests on SR-IOV VF
@ 2026-02-24 11:20 Nitin Gote
  2026-02-24 13:15 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Nitin Gote @ 2026-02-24 11:20 UTC (permalink / raw)
  To: igt-dev; +Cc: michal.wajdeczko, kamil.konieczny, Nitin Gote

The ctx-restore subtests use intel_register_read() via direct MMIO
(PCI BAR) access to verify that the batch buffer wrote the expected
register values. On SR-IOV Virtual Functions (VF), only a very limited
subset of registers is accessible. Registers like 0x4F100 are not
exposed to VFs, so the read always returns 0, causing a false test
failure.

Skip all ctx-restore subtests (post-bb, mid-bb, and their invalid
variants) when the device is running in SR-IOV VF mode.

Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
---
 tests/intel/xe_configfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/intel/xe_configfs.c b/tests/intel/xe_configfs.c
index 0db4af201..ab55e333b 100644
--- a/tests/intel/xe_configfs.c
+++ b/tests/intel/xe_configfs.c
@@ -409,6 +409,7 @@ int igt_main()
 
 	igt_describe("Validate ctx_restore_post_bb with invalid options");
 	igt_subtest("ctx-restore-post-bb-invalid") {
+		igt_require_f(!is_vf_device, "ctx-restore not supported in VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore_invalid(configfs_device_fd, "post");
 		close_configfs_group(configfs_fd, configfs_device_fd);
@@ -416,6 +417,7 @@ int igt_main()
 
 	igt_describe("Validate ctx_restore_post_bb");
 	igt_subtest("ctx-restore-post-bb") {
+		igt_require_f(!is_vf_device, "ctx-restore not supported in VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore(configfs_device_fd, "post");
 		close_configfs_group(configfs_fd, configfs_device_fd);
@@ -423,6 +425,7 @@ int igt_main()
 
 	igt_describe("Validate ctx_restore_mid_bb with invalid options");
 	igt_subtest("ctx-restore-mid-bb-invalid") {
+		igt_require_f(!is_vf_device, "ctx-restore not supported in VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore_invalid(configfs_device_fd, "mid");
 		close_configfs_group(configfs_fd, configfs_device_fd);
@@ -430,6 +433,7 @@ int igt_main()
 
 	igt_describe("Validate ctx_restore_mid_bb");
 	igt_subtest("ctx-restore-mid-bb") {
+		igt_require_f(!is_vf_device, "ctx-restore not supported in VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore(configfs_device_fd, "mid");
 		close_configfs_group(configfs_fd, configfs_device_fd);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] tests/intel/xe_configfs: Skip ctx-restore subtests on SR-IOV VF
@ 2026-03-16 10:31 Nitin Gote
  0 siblings, 0 replies; 10+ messages in thread
From: Nitin Gote @ 2026-03-16 10:31 UTC (permalink / raw)
  To: igt-dev, marcin.bernatowicz
  Cc: lukasz.laguna, michal.wajdeczko, kamil.konieczny, Nitin Gote

The ctx-restore subtests use intel_register_read() via direct MMIO
(PCI BAR) access to verify that the batch buffer wrote the expected
register values. On SR-IOV Virtual Functions (VF), only a very limited
subset of registers is accessible. Registers like 0x4F100 are not
exposed to VFs, so the read always returns 0, causing a false test
failure.

Skip all ctx-restore subtests (post-bb, mid-bb, and their invalid
variants) when the device is running in SR-IOV VF mode.

v2: Use igt_skip_on_f instead of igt_require_f, reads better (Marcin)

Reviewed-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
---
 tests/intel/xe_configfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/intel/xe_configfs.c b/tests/intel/xe_configfs.c
index 0db4af201..755524e7c 100644
--- a/tests/intel/xe_configfs.c
+++ b/tests/intel/xe_configfs.c
@@ -409,6 +409,7 @@ int igt_main()
 
 	igt_describe("Validate ctx_restore_post_bb with invalid options");
 	igt_subtest("ctx-restore-post-bb-invalid") {
+		igt_skip_on_f(is_vf_device, "MMIO register readback not possible on VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore_invalid(configfs_device_fd, "post");
 		close_configfs_group(configfs_fd, configfs_device_fd);
@@ -416,6 +417,7 @@ int igt_main()
 
 	igt_describe("Validate ctx_restore_post_bb");
 	igt_subtest("ctx-restore-post-bb") {
+		igt_skip_on_f(is_vf_device, "MMIO register readback not possible on VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore(configfs_device_fd, "post");
 		close_configfs_group(configfs_fd, configfs_device_fd);
@@ -423,6 +425,7 @@ int igt_main()
 
 	igt_describe("Validate ctx_restore_mid_bb with invalid options");
 	igt_subtest("ctx-restore-mid-bb-invalid") {
+		igt_skip_on_f(is_vf_device, "MMIO register readback not possible on VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore_invalid(configfs_device_fd, "mid");
 		close_configfs_group(configfs_fd, configfs_device_fd);
@@ -430,6 +433,7 @@ int igt_main()
 
 	igt_describe("Validate ctx_restore_mid_bb");
 	igt_subtest("ctx-restore-mid-bb") {
+		igt_skip_on_f(is_vf_device, "MMIO register readback not possible on VF\n");
 		configfs_device_fd = create_device_configfs_group(configfs_fd);
 		test_ctx_restore(configfs_device_fd, "mid");
 		close_configfs_group(configfs_fd, configfs_device_fd);
-- 
2.50.1


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

end of thread, other threads:[~2026-03-16  9:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 11:20 [PATCH] tests/intel/xe_configfs: Skip ctx-restore subtests on SR-IOV VF Nitin Gote
2026-02-24 13:15 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-02-24 13:20 ` [PATCH] " Kamil Konieczny
2026-03-05 16:21   ` Bernatowicz, Marcin
2026-03-10  4:37     ` Gote, Nitin R
2026-03-16  9:10       ` Bernatowicz, Marcin
2026-02-24 13:38 ` ✓ i915.CI.BAT: success for " Patchwork
2026-02-24 19:50 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-24 23:40 ` ✗ Xe.CI.FULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-03-16 10:31 [PATCH] " Nitin Gote

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