Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Marcin Bernatowicz" <marcin.bernatowicz@linux.intel.com>,
	"Lukasz Laguna" <lukasz.laguna@intel.com>,
	"Adam Miszczak" <adam.miszczak@linux.intel.com>,
	"Jakub Kolakowski" <jakub1.kolakowski@intel.com>,
	"Michał Wajdeczko" <michal.wajdeczko@intel.com>,
	"Michał Winiarski" <michal.winiarski@intel.com>,
	"Narasimha C V" <narasimha.c.v@intel.com>,
	"Piotr Piórkowski" <piotr.piorkowski@intel.com>,
	"Satyanarayana K V P" <satyanarayana.k.v.p@intel.com>,
	"Tomasz Lis" <tomasz.lis@intel.com>
Subject: [PATCH v4 i-g-t 2/2] tests/intel/xe_sriov_flr: Add flr-twice subtest
Date: Wed,  5 Feb 2025 18:18:19 +0100	[thread overview]
Message-ID: <20250205171819.2485976-3-marcin.bernatowicz@linux.intel.com> (raw)
In-Reply-To: <20250205171819.2485976-1-marcin.bernatowicz@linux.intel.com>

Introduce the `flr-twice` subtest, which initiates FLR twice in parallel
on the same VF. This subtest covers a use case where two FLRs can occur
within a short time frame, such as when starting a QEMU VM with
a passed VF.

Example log showing the behavior:
[  241.906514] vfio-pci 0000:00:02.1: resetting
[  241.907123] xe 0000:00:02.0: [drm] GT1: PF: VF1 FLR
[  241.907204] xe 0000:00:02.0: [drm] GT0: PF: VF1 FLR
[  242.013441] vfio-pci 0000:00:02.1: reset done
[  242.040918] vfio-pci 0000:00:02.1: resetting
[  242.041794] xe 0000:00:02.0: [drm] GT1: PF: VF1 FLR
[  242.041803] xe 0000:00:02.0: [drm:pf_enter_vf_flr_wip [xe]] GT1: PF:
VF1 FLR is already in progress
[  242.042207] xe 0000:00:02.0: [drm] GT0: PF: VF1 FLR
[  242.042214] xe 0000:00:02.0: [drm:pf_enter_vf_flr_wip [xe]] GT0: PF:
VF1 FLR is already in progress
[  242.149432] vfio-pci 0000:00:02.1: reset done

Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Michał Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Narasimha C V <narasimha.c.v@intel.com>
Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
---
 tests/intel/xe_sriov_flr.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/tests/intel/xe_sriov_flr.c b/tests/intel/xe_sriov_flr.c
index 3b42aa637..a98d6ce70 100644
--- a/tests/intel/xe_sriov_flr.c
+++ b/tests/intel/xe_sriov_flr.c
@@ -41,6 +41,13 @@
  * Run type: FULL
  * Description:
  *   Executes FLR on all VFs simultaneously to validate correct behavior during parallel resets.
+ *
+ * SUBTEST: flr-twice
+ * Run type: FULL
+ * Description:
+ *   Initiates FLR twice in parallel on the same VF to validate behavior
+ *   when multiple resets occur within a short time frame, as seen in some
+ *   real-world scenarios (e.g., when starting a QEMU VM with a passed VF).
  */
 
 IGT_TEST_DESCRIPTION("Xe tests for SR-IOV VF FLR (Functional Level Reset)");
@@ -449,6 +456,14 @@ static int execute_parallel_flr(int pf_fd, int num_vfs, struct subcheck *checks,
 				     wait_flr_ms, 1);
 }
 
+static int execute_parallel_flr_twice(int pf_fd, int num_vfs,
+				      struct subcheck *checks, int num_checks,
+				      const int wait_flr_ms)
+{
+	return execute_parallel_flr_(pf_fd, num_vfs, checks, num_checks,
+				     wait_flr_ms, 2);
+}
+
 #define GEN12_VF_CAP_REG			0x1901f8
 #define GGTT_PTE_TEST_FIELD_MASK		GENMASK_ULL(19, 12)
 #define GGTT_PTE_ADDR_SHIFT			12
@@ -1073,6 +1088,11 @@ igt_main
 		clear_tests(pf_fd, total_vfs, execute_parallel_flr);
 	}
 
+	igt_describe("Initiate FLR twice in parallel on same VF.");
+	igt_subtest("flr-twice") {
+		clear_tests(pf_fd, 1, execute_parallel_flr_twice);
+	}
+
 	igt_fixture {
 		igt_sriov_disable_vfs(pf_fd);
 		/* abort to avoid execution of next tests with enabled VFs */
-- 
2.31.1


  parent reply	other threads:[~2025-02-05 17:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 17:18 [PATCH v4 i-g-t 0/2] tests/intel/xe_sriov_flr: Add parallel FLR subtest for SR-IOV VFs Marcin Bernatowicz
2025-02-05 17:18 ` [PATCH v4 i-g-t 1/2] " Marcin Bernatowicz
2025-02-05 17:18 ` Marcin Bernatowicz [this message]
2025-02-05 18:56 ` ✗ GitLab.Pipeline: warning for tests/intel/xe_sriov_flr: Add parallel FLR subtest for SR-IOV VFs (rev4) Patchwork
2025-02-05 19:13 ` ✓ Xe.CI.BAT: success " Patchwork
2025-02-05 21:16 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-06  9:58   ` Bernatowicz, Marcin
2025-02-06 12:10 ` ✓ Xe.CI.BAT: success " Patchwork
2025-02-06 12:21 ` ✓ i915.CI.BAT: " Patchwork
2025-02-06 12:59 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-06 17:27 ` ✗ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250205171819.2485976-3-marcin.bernatowicz@linux.intel.com \
    --to=marcin.bernatowicz@linux.intel.com \
    --cc=adam.miszczak@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jakub1.kolakowski@intel.com \
    --cc=lukasz.laguna@intel.com \
    --cc=michal.wajdeczko@intel.com \
    --cc=michal.winiarski@intel.com \
    --cc=narasimha.c.v@intel.com \
    --cc=piotr.piorkowski@intel.com \
    --cc=satyanarayana.k.v.p@intel.com \
    --cc=tomasz.lis@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox