Skip to contentSkip to conversation

Improvements for xe_sriov_flr test and xe_mmio lib

PATCH Superseded Marcin Bernatowicz 3 participants 10 messages Nov 19, 2024 – Nov 20, 2024

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Improvements for xe_sriov_flr test and xe_mmio lib

Enhance code maintainability, improve error handling, and provide clearer debugging information.

lib/xe/xe_mmio: Replace open-coded init/cleanup with existing functions

Use intel_register_access_init and intel_register_access_fini to handle initialization and cleanup, reducing code duplication. This improves maintainability and ensures consistency, including handling forcewake for Xe.

lib/xe/xe_sriov_provisioning: Refactor range handling and logging

Introduce an append_range helper to reduce code duplication in handling provisioned PTE ranges. Limit debug logs to the first 70 entries for clarity and improved reasoning. Enhance error handling by propagating realloc failures.

tests/xe/xe_sriov_flr: Improve clear-ggtt subcheck initialization

Mark the ggtt-clear subcheck as SKIP when prerequisites, such as scanning GGTT provisioned offsets, are not met. Asserting in these cases falsely implies that FLR is broken, while the test has not even started.

Marcin Bernatowicz (3):
lib/xe/xe_mmio: Replace open-coded init/cleanup with existing
functions
lib/xe/xe_sriov_provisioning: Refactor range handling and logging tests/xe/xe_sriov_flr: Improve clear-ggtt subcheck initialization

 lib/xe/xe_mmio.c               | 10 +----
 lib/xe/xe_sriov_provisioning.c | 71 ++++++++++++++++++++++------------
 tests/intel/xe_sriov_flr.c     | 11 ++++--
 3 files changed, 57 insertions(+), 35 deletions(-)
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/3 lib/xe/xe_mmio: Replace open-coded init/cleanup with existing functions

Use intel_register_access_init and intel_register_access_fini to handle initialization and cleanup, reducing code duplication. This improves maintainability and ensures consistency, including handling forcewake for Xe.

Cc Adam Miszczak <[email protected]>
Cc Jakub Kolakowski <[email protected]>
Cc Kamil Konieczny <[email protected]>
Cc Lukasz Laguna <[email protected]>
Cc Piotr Piórkowski <[email protected]>
---
 lib/xe/xe_mmio.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
lib/xe/xe_mmio.c +2 -8
index 0817c12f6..834816133 100644
@@ -23,13 +23,8 @@ void xe_mmio_vf_access_init(int pf_fd, int vf_id, struct xe_mmio *mmio)
 
 	igt_assert_f(pci_dev, "No PCI device found for VF%u\n", vf_id);
 
-	intel_mmio_use_pci_bar(&mmio->intel_mmio, pci_dev);
-
-	igt_assert(mmio->intel_mmio.igt_mmio);
-
+	intel_register_access_init(&mmio->intel_mmio, pci_dev, false);
 	mmio->fd = pf_fd;
-	mmio->intel_mmio.safe = false;
-	mmio->intel_mmio.pci_device_id = pci_dev->device_id;
 }
 
 /**
@@ -53,8 +48,7 @@ void xe_mmio_access_init(int pf_fd, struct xe_mmio *mmio)
  */
 void xe_mmio_access_fini(struct xe_mmio *mmio)
 {
-	mmio->intel_mmio.pci_device_id = 0;
-	intel_mmio_unmap_pci_bar(&mmio->intel_mmio);
+	intel_register_access_fini(&mmio->intel_mmio);
 }
 
 /**
Signature · 1 line
2.31.1
Reviewed-by Lukasz Laguna on v1 1/3
#2 lore raw

Re: [PATCH i-g-t 1/3] lib/xe/xe_mmio: Replace open-coded init/cleanup with existing functions

Quoted 35 lines · Marcin Bernatowicz

Use intel_register_access_init and intel_register_access_fini to handle initialization and cleanup, reducing code duplication. This improves maintainability and ensures consistency, including handling forcewake for Xe.

Cc Adam Miszczak<[email protected]>
Cc Jakub Kolakowski<[email protected]>
Cc Kamil Konieczny<[email protected]>
Cc Lukasz Laguna<[email protected]>
Cc Piotr Piórkowski<[email protected]>
---
  lib/xe/xe_mmio.c | 10 ++--------
  1 file changed, 2 insertions(+), 8 deletions(-)
lib/xe/xe_mmio.c +1 -6
index 0817c12f6..834816133 100644
@@ -23,13 +23,8 @@ void xe_mmio_vf_access_init(int pf_fd, int vf_id, struct xe_mmio *mmio)
 
  	igt_assert_f(pci_dev, "No PCI device found for VF%u\n", vf_id);
 
-	intel_mmio_use_pci_bar(&mmio->intel_mmio, pci_dev);
-
-	igt_assert(mmio->intel_mmio.igt_mmio);
-
+	intel_register_access_init(&mmio->intel_mmio, pci_dev, false);
  	mmio->fd = pf_fd;
-	mmio->intel_mmio.safe = false;
-	mmio->intel_mmio.pci_device_id = pci_dev->device_id;
  }
 
  /**

lib/xe/xe_mmio.c void xe_mmio_access_init(int pf_fd, struct xe_mmio *mmio) · line 54

Quoted 9 lines
lib/xe/xe_mmio.c +1 -2
@@ -53,8 +48,7 @@ void xe_mmio_access_init(int pf_fd, struct xe_mmio *mmio)
   */
  void xe_mmio_access_fini(struct xe_mmio *mmio)
  {
-	mmio->intel_mmio.pci_device_id = 0;
-	intel_mmio_unmap_pci_bar(&mmio->intel_mmio);
+	intel_register_access_fini(&mmio->intel_mmio);
  }
 
  /**
Reviewed-by Lukasz Laguna <[email protected] <mailto:[email protected]>>
#3 lore raw

PATCH 2/3 lib/xe/xe_sriov_provisioning: Refactor range handling and logging

In reply to Marcin Bernatowicz

Introduce an append_range helper to reduce code duplication in handling provisioned PTE ranges. Limit debug logs to the first 70 entries for clarity and improved reasoning. Enhance error handling by propagating realloc failures.

Cc Adam Miszczak <[email protected]>
Cc C V Narasimha <[email protected]>
Cc Jakub Kolakowski <[email protected]>
Cc K V P Satyanarayana <[email protected]>
Cc Lukasz Laguna <[email protected]>
Cc Michał Wajdeczko <[email protected]>
Cc Michał Winiarski <[email protected]>
Cc Piotr Piórkowski <[email protected]>
Cc Tomasz Lis <[email protected]>
---
 lib/xe/xe_sriov_provisioning.c | 71 ++++++++++++++++++++++------------
 1 file changed, 47 insertions(+), 24 deletions(-)
lib/xe/xe_sriov_provisioning.c +47 -24
index 7cde2c240..66c0576aa 100644
@@ -3,7 +3,7 @@
  * Copyright(c) 2024 Intel Corporation. All rights reserved.
  */
 
-#include <stdlib.h>
+#include <errno.h>
 
 #include "igt_core.h"
 #include "intel_chipset.h"
@@ -48,6 +48,37 @@ static uint64_t get_vfid_mask(int fd)
 		GGTT_PTE_VFID_MASK : PRE_1250_IP_VER_GGTT_PTE_VFID_MASK;
 }
 
+#define MAX_DEBUG_ENTRIES 70
+
+static int append_range(struct xe_sriov_provisioned_range **ranges,
+			unsigned int *nr_ranges, unsigned int vf_id,
+			uint32_t start, uint32_t end)
+{
+	struct xe_sriov_provisioned_range *new_ranges;
+
+	new_ranges = realloc(*ranges,
+			     (*nr_ranges + 1) * sizeof(struct xe_sriov_provisioned_range));
+	if (!new_ranges) {
+		free(*ranges);
+		*ranges = NULL;
+		*nr_ranges = 0;
+		return -ENOMEM;
+	}
+
+	*ranges = new_ranges;
+	if (*nr_ranges < MAX_DEBUG_ENTRIES)
+		igt_debug("Found VF%u GGTT range [%#x-%#x] num_ptes=%ld\n",
+			  vf_id, start, end,
+			  (end - start + sizeof(xe_ggtt_pte_t)) /
+			  sizeof(xe_ggtt_pte_t));
+	(*ranges)[*nr_ranges].vf_id = vf_id;
+	(*ranges)[*nr_ranges].start = start;
+	(*ranges)[*nr_ranges].end = end;
+	(*nr_ranges)++;
+
+	return 0;
+}
+
 /**
  * xe_sriov_find_ggtt_provisioned_pte_offsets - Find GGTT provisioned PTE offsets
  * @pf_fd: File descriptor for the Physical Function
@@ -76,6 +107,7 @@ int xe_sriov_find_ggtt_provisioned_pte_offsets(int pf_fd, int gt, struct xe_mmio
 	uint32_t current_start = 0;
 	uint32_t current_end = 0;
 	xe_ggtt_pte_t pte;
+	int ret;
 
 	*ranges = NULL;
 	*nr_ranges = 0;
@@ -86,18 +118,11 @@ int xe_sriov_find_ggtt_provisioned_pte_offsets(int pf_fd, int gt, struct xe_mmio
 
 		if (vf_id != current_vf_id) {
 			if (current_vf_id != -1) {
-				/* End the current range */
-				*ranges = realloc(*ranges, (*nr_ranges + 1) *
-						  sizeof(struct xe_sriov_provisioned_range));
-				igt_assert(*ranges);
-				igt_debug("Found VF%u ggtt range [%#x-%#x] num_ptes=%ld\n",
-					  current_vf_id, current_start, current_end,
-					  (current_end - current_start + sizeof(xe_ggtt_pte_t)) /
-					  sizeof(xe_ggtt_pte_t));
-				(*ranges)[*nr_ranges].vf_id = current_vf_id;
-				(*ranges)[*nr_ranges].start = current_start;
-				(*ranges)[*nr_ranges].end = current_end;
-				(*nr_ranges)++;
+				/* End the current range and append it */
+				ret = append_range(ranges, nr_ranges, current_vf_id,
+						   current_start, current_end);
+				if (ret < 0)
+					return ret;
 			}
 			/* Start a new range */
 			current_vf_id = vf_id;
@@ -107,18 +132,16 @@ int xe_sriov_find_ggtt_provisioned_pte_offsets(int pf_fd, int gt, struct xe_mmio
 	}
 
 	if (current_vf_id != -1) {
-		*ranges = realloc(*ranges, (*nr_ranges + 1) *
-				  sizeof(struct xe_sriov_provisioned_range));
-		igt_assert(*ranges);
-		igt_debug("Found VF%u ggtt range [%#x-%#x] num_ptes=%ld\n",
-			  current_vf_id, current_start, current_end,
-			  (current_end - current_start + sizeof(xe_ggtt_pte_t)) /
-			  sizeof(xe_ggtt_pte_t));
-		(*ranges)[*nr_ranges].vf_id = current_vf_id;
-		(*ranges)[*nr_ranges].start = current_start;
-		(*ranges)[*nr_ranges].end = current_end;
-		(*nr_ranges)++;
+		/* Append the last range */
+		ret = append_range(ranges, nr_ranges, current_vf_id,
+				   current_start, current_end);
+		if (ret < 0)
+			return ret;
 	}
 
+	if (*nr_ranges > MAX_DEBUG_ENTRIES)
+		igt_debug("Ranges output trimmed to first %u entries out of %u",
+			  MAX_DEBUG_ENTRIES, *nr_ranges);
+
 	return 0;
 }
Signature · 1 line
2.31.1
Reviewed-by Lukasz Laguna on v1 2/3
#4 lore raw

Re: [PATCH i-g-t 2/3] lib/xe/xe_sriov_provisioning: Refactor range handling and logging

Quoted 120 lines · Marcin Bernatowicz

Introduce an append_range helper to reduce code duplication in handling provisioned PTE ranges. Limit debug logs to the first 70 entries for clarity and improved reasoning. Enhance error handling by propagating realloc failures.

Cc Adam Miszczak<[email protected]>
Cc C V Narasimha<[email protected]>
Cc Jakub Kolakowski<[email protected]>
Cc K V P Satyanarayana<[email protected]>
Cc Lukasz Laguna<[email protected]>
Cc Michał Wajdeczko<[email protected]>
Cc Michał Winiarski<[email protected]>
Cc Piotr Piórkowski<[email protected]>
Cc Tomasz Lis<[email protected]>
---
  lib/xe/xe_sriov_provisioning.c | 71 ++++++++++++++++++++++------------
  1 file changed, 47 insertions(+), 24 deletions(-)
lib/xe/xe_sriov_provisioning.c +41 -24
index 7cde2c240..66c0576aa 100644
@@ -3,7 +3,7 @@
   * Copyright(c) 2024 Intel Corporation. All rights reserved.
   */
 
-#include <stdlib.h>
+#include <errno.h>
 
  #include "igt_core.h"
  #include "intel_chipset.h"
@@ -48,6 +48,37 @@ static uint64_t get_vfid_mask(int fd)
  		GGTT_PTE_VFID_MASK : PRE_1250_IP_VER_GGTT_PTE_VFID_MASK;
  }
 
+#define MAX_DEBUG_ENTRIES 70
+
+static int append_range(struct xe_sriov_provisioned_range **ranges,
+			unsigned int *nr_ranges, unsigned int vf_id,
+			uint32_t start, uint32_t end)
+{
+	struct xe_sriov_provisioned_range *new_ranges;
+
+	new_ranges = realloc(*ranges,
+			     (*nr_ranges + 1) * sizeof(struct xe_sriov_provisioned_range));
+	if (!new_ranges) {
+		free(*ranges);
+		*ranges = NULL;
+		*nr_ranges = 0;
+		return -ENOMEM;
+	}
+
+	*ranges = new_ranges;
+	if (*nr_ranges < MAX_DEBUG_ENTRIES)
+		igt_debug("Found VF%u GGTT range [%#x-%#x] num_ptes=%ld\n",
+			  vf_id, start, end,
+			  (end - start + sizeof(xe_ggtt_pte_t)) /
+			  sizeof(xe_ggtt_pte_t));
+	(*ranges)[*nr_ranges].vf_id = vf_id;
+	(*ranges)[*nr_ranges].start = start;
+	(*ranges)[*nr_ranges].end = end;
+	(*nr_ranges)++;
+
+	return 0;
+}
+
  /**
   * xe_sriov_find_ggtt_provisioned_pte_offsets - Find GGTT provisioned PTE offsets
   * @pf_fd: File descriptor for the Physical Function
@@ -76,6 +107,7 @@ int xe_sriov_find_ggtt_provisioned_pte_offsets(int pf_fd, int gt, struct xe_mmio
  	uint32_t current_start = 0;
  	uint32_t current_end = 0;
  	xe_ggtt_pte_t pte;
+	int ret;
 
  	*ranges = NULL;
  	*nr_ranges = 0;
@@ -86,18 +118,11 @@ int xe_sriov_find_ggtt_provisioned_pte_offsets(int pf_fd, int gt, struct xe_mmio
 
  		if (vf_id != current_vf_id) {
  			if (current_vf_id != -1) {
-				/* End the current range */
-				*ranges = realloc(*ranges, (*nr_ranges + 1) *
-						  sizeof(struct xe_sriov_provisioned_range));
-				igt_assert(*ranges);
-				igt_debug("Found VF%u ggtt range [%#x-%#x] num_ptes=%ld\n",
-					  current_vf_id, current_start, current_end,
-					  (current_end - current_start + sizeof(xe_ggtt_pte_t)) /
-					  sizeof(xe_ggtt_pte_t));
-				(*ranges)[*nr_ranges].vf_id = current_vf_id;
-				(*ranges)[*nr_ranges].start = current_start;
-				(*ranges)[*nr_ranges].end = current_end;
-				(*nr_ranges)++;
+				/* End the current range and append it */
+				ret = append_range(ranges, nr_ranges, current_vf_id,
+						   current_start, current_end);
+				if (ret < 0)
+					return ret;
  			}
  			/* Start a new range */
  			current_vf_id = vf_id;
@@ -107,18 +132,16 @@ int xe_sriov_find_ggtt_provisioned_pte_offsets(int pf_fd, int gt, struct xe_mmio
  	}
 
  	if (current_vf_id != -1) {
-		*ranges = realloc(*ranges, (*nr_ranges + 1) *
-				  sizeof(struct xe_sriov_provisioned_range));
-		igt_assert(*ranges);
-		igt_debug("Found VF%u ggtt range [%#x-%#x] num_ptes=%ld\n",
-			  current_vf_id, current_start, current_end,
-			  (current_end - current_start + sizeof(xe_ggtt_pte_t)) /
-			  sizeof(xe_ggtt_pte_t));
-		(*ranges)[*nr_ranges].vf_id = current_vf_id;
-		(*ranges)[*nr_ranges].start = current_start;
-		(*ranges)[*nr_ranges].end = current_end;
-		(*nr_ranges)++;
+		/* Append the last range */
+		ret = append_range(ranges, nr_ranges, current_vf_id,
+				   current_start, current_end);

lib/xe/xe_sriov_provisioning.c int xe_sriov_find_ggtt_provisioned_pte_offsets(int pf_fd, int gt, struct xe_mmio · line 147

Quoted 10 lines
lib/xe/xe_sriov_provisioning.c +6 -0
+		if (ret < 0)
+			return ret;
  	}
 
+	if (*nr_ranges > MAX_DEBUG_ENTRIES)
+		igt_debug("Ranges output trimmed to first %u entries out of %u",
+			  MAX_DEBUG_ENTRIES, *nr_ranges);
+
  	return 0;
  }

LGTM,

Reviewed-by Lukasz Laguna <[email protected] <mailto:[email protected]>>
#5 lore raw

PATCH 3/3 tests/xe/xe_sriov_flr: Improve clear-ggtt subcheck initialization

In reply to Marcin Bernatowicz

Mark the ggtt-clear subcheck as SKIP when prerequisites, such as scanning GGTT provisioned offsets, are not met. Asserting in these cases falsely implies that FLR is broken, while the test has not even started.

Cc Adam Miszczak <[email protected]>
Cc C V Narasimha <[email protected]>
Cc Jakub Kolakowski <[email protected]>
Cc K V P Satyanarayana <[email protected]>
Cc Lukasz Laguna <[email protected]>
Cc Michał Wajdeczko <[email protected]>
Cc Michał Winiarski <[email protected]>
Cc Piotr Piórkowski <[email protected]>
Cc Tomasz Lis <[email protected]>
---
 tests/intel/xe_sriov_flr.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
tests/intel/xe_sriov_flr.c +8 -3
index 1049cffec..502691765 100644
@@ -393,7 +393,12 @@ static int populate_ggtt_pte_offsets(struct ggtt_data *gdata)
 		if (vf_id == 0)
 			continue;
 
-		igt_assert(vf_id >= 1 && vf_id <= num_vfs);
+		if (vf_id < 1 || vf_id > num_vfs) {
+			set_skip_reason(&gdata->base, "Unexpected VF%u at range entry %u [%#lx-%#lx], num_vfs=%u\n",
+					vf_id, i, ranges[i].start, ranges[i].end, num_vfs);
+			free(ranges);
+			return -1;
+		}
 
 		if (gdata->pte_offsets[vf_id].end) {
 			set_skip_reason(&gdata->base, "Duplicate GGTT PTE offset range for VF%u\n",
@@ -410,7 +415,7 @@ static int populate_ggtt_pte_offsets(struct ggtt_data *gdata)
 
 	for (int vf_id = 1; vf_id <= num_vfs; ++vf_id)
 		if (!gdata->pte_offsets[vf_id].end) {
-			set_fail_reason(&gdata->base,
+			set_skip_reason(&gdata->base,
 					"Failed to find VF%u provisioned GGTT PTE offset range\n",
 					vf_id);
 			return -1;
@@ -440,7 +445,7 @@ static void ggtt_subcheck_init(struct subcheck_data *data)
 
 		populate_ggtt_pte_offsets(gdata);
 	} else {
-		set_fail_reason(data, "xe_mmio is NULL\n");
+		set_skip_reason(data, "xe_mmio is NULL\n");
 	}
 }
 
Signature · 1 line
2.31.1
#6 lore raw

Re: [PATCH i-g-t 3/3] tests/xe/xe_sriov_flr: Improve clear-ggtt subcheck initialization

Quoted 23 lines · Marcin Bernatowicz

Mark the ggtt-clear subcheck as SKIP when prerequisites, such as scanning GGTT provisioned offsets, are not met. Asserting in these cases falsely implies that FLR is broken, while the test has not even started.

Cc Adam Miszczak<[email protected]>
Cc C V Narasimha<[email protected]>
Cc Jakub Kolakowski<[email protected]>
Cc K V P Satyanarayana<[email protected]>
Cc Lukasz Laguna<[email protected]>
Cc Michał Wajdeczko<[email protected]>
Cc Michał Winiarski<[email protected]>
Cc Piotr Piórkowski<[email protected]>
Cc Tomasz Lis<[email protected]>
---
  tests/intel/xe_sriov_flr.c | 11 ++++++++---
  1 file changed, 8 insertions(+), 3 deletions(-)
tests/intel/xe_sriov_flr.c +0 -0
index 1049cffec..502691765 100644

tests/intel/xe_sriov_flr.c static int populate_ggtt_pte_offsets(struct ggtt_data *gdata) · line 397

Quoted 6 lines
tests/intel/xe_sriov_flr.c +2 -1
@@ -393,7 +393,12 @@ static int populate_ggtt_pte_offsets(struct ggtt_data *gdata)
  		if (vf_id == 0)
  			continue;
 
-		igt_assert(vf_id >= 1 && vf_id <= num_vfs);
+		if (vf_id < 1 || vf_id > num_vfs) {
+			set_skip_reason(&gdata->base, "Unexpected VF%u at range entry %u [%#lx-%#lx], num_vfs=%u\n",

nit: Unexpected VF ID (%u)...

Quoted 17 lines
tests/intel/xe_sriov_flr.c +5 -1
+					vf_id, i, ranges[i].start, ranges[i].end, num_vfs);
+			free(ranges);
+			return -1;
+		}
 
  		if (gdata->pte_offsets[vf_id].end) {
  			set_skip_reason(&gdata->base, "Duplicate GGTT PTE offset range for VF%u\n",
@@ -410,7 +415,7 @@ static int populate_ggtt_pte_offsets(struct ggtt_data *gdata)
 
  	for (int vf_id = 1; vf_id <= num_vfs; ++vf_id)
  		if (!gdata->pte_offsets[vf_id].end) {
-			set_fail_reason(&gdata->base,
+			set_skip_reason(&gdata->base,
  					"Failed to find VF%u provisioned GGTT PTE offset range\n",
  					vf_id);
  			return -1;

tests/intel/xe_sriov_flr.c static void ggtt_subcheck_init(struct subcheck_data *data) · line 451

Quoted 8 lines
tests/intel/xe_sriov_flr.c +1 -1
@@ -440,7 +445,7 @@ static void ggtt_subcheck_init(struct subcheck_data *data)
 
  		populate_ggtt_pte_offsets(gdata);
  	} else {
-		set_fail_reason(data, "xe_mmio is NULL\n");
+		set_skip_reason(data, "xe_mmio is NULL\n");
  	}
  }
 

Looks good overall,but I see that we still fail in case of other prerequisites not met (LMEM, GGTT write/read, no access to MMIO, etc). Maybe we should skip in these cases too?

Lukasz

#7 lore raw

Re: [PATCH i-g-t 3/3] tests/xe/xe_sriov_flr: Improve clear-ggtt subcheck initialization

Quoted 51 lines · Lukasz
Quoted 23 lines · Marcin Bernatowicz

Mark the ggtt-clear subcheck as SKIP when prerequisites, such as scanning GGTT provisioned offsets, are not met. Asserting in these cases falsely implies that FLR is broken, while the test has not even started.

Cc Adam Miszczak<[email protected]>
Cc C V Narasimha<[email protected]>
Cc Jakub Kolakowski<[email protected]>
Cc K V P Satyanarayana<[email protected]>
Cc Lukasz Laguna<[email protected]>
Cc Michał Wajdeczko<[email protected]>
Cc Michał Winiarski<[email protected]>
Cc Piotr Piórkowski<[email protected]>
Cc Tomasz Lis<[email protected]>
---
  tests/intel/xe_sriov_flr.c | 11 ++++++++---
  1 file changed, 8 insertions(+), 3 deletions(-)
tests/intel/xe_sriov_flr.c +0 -0
index 1049cffec..502691765 100644

tests/intel/xe_sriov_flr.c static int populate_ggtt_pte_offsets(struct ggtt_data *gdata) · line 397

Quoted 6 lines
tests/intel/xe_sriov_flr.c +2 -1
@@ -393,7 +393,12 @@ static int populate_ggtt_pte_offsets(struct ggtt_data *gdata)
  		if (vf_id == 0)
  			continue;
 
-		igt_assert(vf_id >= 1 && vf_id <= num_vfs);
+		if (vf_id < 1 || vf_id > num_vfs) {
+			set_skip_reason(&gdata->base, "Unexpected VF%u at range entry %u [%#lx-%#lx], num_vfs=%u\n",

nit: Unexpected VF ID (%u)...

Quoted 18 lines
tests/intel/xe_sriov_flr.c +5 -1
+					vf_id, i, ranges[i].start, ranges[i].end, num_vfs);
+			free(ranges);
+			return -1;
+		}
 
  		if (gdata->pte_offsets[vf_id].end) {
  			set_skip_reason(&gdata->base, "Duplicate GGTT PTE offset range for VF%u\n",
@@ -410,7 +415,7 @@ static int populate_ggtt_pte_offsets(struct ggtt_data *gdata)
 
  	for (int vf_id = 1; vf_id <= num_vfs; ++vf_id)
  		if (!gdata->pte_offsets[vf_id].end) {
-			set_fail_reason(&gdata->base,
+			set_skip_reason(&gdata->base,
  					"Failed to find VF%u provisioned GGTT PTE offset range\n",
  					vf_id);
  			return -1;
@@ -440,7 +445,7 @@ static void ggtt_subcheck_init(struct subcheck_data *data)
 
Quoted 9 lines

tests/intel/xe_sriov_flr.c static void ggtt_subcheck_init(struct subcheck_data *data) · line 451

Quoted 7 lines
tests/intel/xe_sriov_flr.c +1 -1
  		populate_ggtt_pte_offsets(gdata);
  	} else {
-		set_fail_reason(data, "xe_mmio is NULL\n");
+		set_skip_reason(data, "xe_mmio is NULL\n");
  	}
  }
 

Looks good overall,but I see that we still fail in case of other prerequisites not met (LMEM, GGTT write/read, no access to MMIO, etc). Maybe we should skip in these cases too?

Makes sense, I'll extend the skips to the init/prepare phase for all checks.

Marcin

Quoted 4 lines

Lukasz

#8 lore raw

✗ CI.xeBAT: failure for Improvements for xe_sriov_flr test and xe_mmio lib

In reply to Marcin Bernatowicz
== Series Details ==

== Series Details ==

Series: Improvements for xe_sriov_flr test and xe_mmio lib
URL : https://patchwork.freedesktop.org/series/141556/
State : failure

== Summary ==

CI Bug Log - changes from XEIGT_8118_BAT -> XEIGTPW_12143_BAT
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with XEIGTPW_12143_BAT absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in XEIGTPW_12143_BAT, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

Participating hosts (9 -> 9)
------------------------------

No changes in participating hosts

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in XEIGTPW_12143_BAT:

### IGT changes ###

#### Possible regressions ####

* igt@kms_psr@psr-primary-page-flip@edp-1:
- bat-adlp-7: [PASS][1] -> [DMESG-WARN][2] +1 other test dmesg-warn
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8118/bat-adlp-7/igt@kms_psr@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12143/bat-adlp-7/igt@kms_psr@[email protected]

Known issues
------------

Here are the changes found in XEIGTPW_12143_BAT that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@core_hotunplug@unbind-rebind:
- bat-adlp-7: [PASS][3] -> [DMESG-WARN][4] ([Intel XE#3517])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8118/bat-adlp-7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12143/bat-adlp-7/igt@[email protected]

* igt@kms_psr@psr-cursor-plane-move:
- bat-adlp-7: [PASS][5] -> [SKIP][6] ([Intel XE#3443] / [Intel XE#455]) +3 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8118/bat-adlp-7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12143/bat-adlp-7/igt@[email protected]

[Intel XE#3443]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3443
[Intel XE#3517]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3517
[Intel XE#455]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/455

Build changes
-------------

* IGT: IGT_8118 -> IGTPW_12143
* Linux: xe-2252-f8f85a38f6c75e091805f01ceff4041ac2fdf3fd -> xe-2254-ccf64319402f90f68549e2047a7f985a46436e41

IGTPW_12143: 12143
IGT_8118: 17707095f1e5d3c30f463b43022f01c0160579b6 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-2252-f8f85a38f6c75e091805f01ceff4041ac2fdf3fd: f8f85a38f6c75e091805f01ceff4041ac2fdf3fd xe-2254-ccf64319402f90f68549e2047a7f985a46436e41: ccf64319402f90f68549e2047a7f985a46436e41

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_12143/index.html

#9 lore raw

✗ Fi.CI.BAT: failure for Improvements for xe_sriov_flr test and xe_mmio lib

In reply to Marcin Bernatowicz
== Series Details ==

== Series Details ==

Series: Improvements for xe_sriov_flr test and xe_mmio lib
URL : https://patchwork.freedesktop.org/series/141556/
State : failure

== Summary ==

CI Bug Log - changes from IGT_8118 -> IGTPW_12143
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_12143 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in IGTPW_12143, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/index.html

Participating hosts (46 -> 45)
------------------------------

Missing (1): fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_12143:

### IGT changes ###

#### Possible regressions ####

* igt@kms_pipe_crc_basic@nonblocking-crc:
- fi-kbl-7567u: [PASS][1] -> [DMESG-WARN][2] +5 other tests dmesg-warn
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8118/fi-kbl-7567u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/fi-kbl-7567u/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@vgem_basic@unload:
- {bat-arls-6}: [PASS][3] -> [INCOMPLETE][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8118/bat-arls-6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/bat-arls-6/igt@[email protected]

Known issues
------------

Here are the changes found in IGTPW_12143 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live:
- bat-arls-5: [PASS][5] -> [ABORT][6] ([i915#12829])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8118/bat-arls-5/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/bat-arls-5/igt@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arls-5: [PASS][7] -> [ABORT][8] ([i915#12061])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8118/bat-arls-5/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/bat-arls-5/igt@i915_selftest@[email protected]

#### Possible fixes ####

* igt@i915_pm_rpm@module-reload:
- bat-dg1-7: [FAIL][9] ([i915#12903]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8118/bat-dg1-7/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/bat-dg1-7/igt@[email protected]

* igt@i915_selftest@live:
- bat-mtlp-8: [ABORT][11] ([i915#12829]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8118/bat-mtlp-8/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/bat-mtlp-8/igt@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-mtlp-8: [ABORT][13] -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8118/bat-mtlp-8/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/bat-mtlp-8/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-apl-1: [DMESG-WARN][15] -> [PASS][16] +2 other tests pass
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8118/bat-apl-1/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/bat-apl-1/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#12829]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12829
[i915#12903]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12903

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_8118 -> IGTPW_12143
* Linux: CI_DRM_15720 -> CI_DRM_15722

CI-20190529: 20190529
CI_DRM_15720: f8f85a38f6c75e091805f01ceff4041ac2fdf3fd @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_15722: ccf64319402f90f68549e2047a7f985a46436e41 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_12143: 12143
IGT_8118: 17707095f1e5d3c30f463b43022f01c0160579b6 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12143/index.html