Skip to contentSkip to conversation

Madvise feature in SVM for Multi-GPU configs

PATCH Superseded [email protected] 5 participants 63 messages Nov 21, 2025 – Dec 2, 2025 Arm/Amlogic Meson SoC support Page 1 of 2

v8 of 14 Superseded Latest is v14 →

lore
Share & tools
lore
#0 lore raw

v8 cover Madvise feature in SVM for Multi-GPU configs

From: Nishit Sharma <[email protected]>

This patch series adds comprehensive SVM multi-GPU IGT test coverage for madvise and prefetch functionality.

ver2:
- Test name changed in commits
- In patchwork v1 patch is missing due to last patch was not sent

ver3:
- In patch-7 tags were added and it was not sent on patchwork

ver4:
- In patch file was added which is not available in source which caused CI build failure.

ver5:
- Added subtest function wrappers
- Subtests executing for all GPUs enumerated

ver7:
- Optimized function calling which are frequenctly called
- Incorporated review comments (Thomas Hellstrom)

ver8:
- Incorporated review comments (Thomas Hellstrom)
- Seperated madvise and lr_sync patches
- merged added 0 as instance parameter in xe_vm_madvise() call in xe_exec_system_allocator with xe_vm_madvise lib changes
- Subtests declared in const struct section[] and optimized
- All subtests executed with and without prefetch

Nishit Sharma (10):
lib/xe: Add instance parameter to xe_vm_madvise
lib/xe: Add synchronous helpers for VM bind/unbind operations tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations tests/intel/xe_multi_gpusvm: Add SVM multi-GPU coherency test tests/intel/xe_multi_gpusvm: Add SVM multi-GPU performance test tests/intel/xe_multi_gpusvm: Add SVM multi-GPU fault handling test tests/intel/xe_multi_gpusvm: Add SVM multi-GPU simultaneous access
test
tests/intel/xe_multi_gpusvm: Add SVM multi-GPU conflicting madvise
test
tests/intel/xe_multi-gpusvm: Add SVM multi-GPU migration test

 include/drm-uapi/xe_drm.h              |    4 +-
 lib/xe/xe_ioctl.c                      |   53 +-
 lib/xe/xe_ioctl.h                      |   11 +-
 tests/intel/xe_exec_system_allocator.c |    8 +-
 tests/intel/xe_multi_gpusvm.c          | 1616 ++++++++++++++++++++++++
 tests/meson.build                      |    1 +
 6 files changed, 1679 insertions(+), 14 deletions(-)
 create mode 100644 tests/intel/xe_multi_gpusvm.c
Signature · 1 line
2.48.1
#1 lore raw

PATCH v8 1/10 lib/xe: Add instance parameter to xe_vm_madvise

From: Nishit Sharma <[email protected]>

tests/intel/xe_exec_system_allocator: Add parameter in madvise call

Add an 'instance' parameter to __xe_vm_madvise() and xe_vm_madvise() to specify which VRAM instance should be targeted for memory advise operations.
Getting compilation issues in xe_exec_system_allocator test after adding 'instance' parameters in xe_vm_madvise(). As a fix 0 as instance parameter passed in xe_vm_madvise() calls available in xe_exec_system_allocator test.

---
 include/drm-uapi/xe_drm.h              |  4 ++--
 lib/xe/xe_ioctl.c                      | 14 +++++++++-----
 lib/xe/xe_ioctl.h                      | 11 ++++++++---
 tests/intel/xe_exec_system_allocator.c |  8 ++++----
 4 files changed, 23 insertions(+), 14 deletions(-)
include/drm-uapi/xe_drm.h +2 -2
index 89ab54935..3472efa58 100644
@@ -2060,8 +2060,8 @@ struct drm_xe_madvise {
 			/** @preferred_mem_loc.migration_policy: Page migration policy */
 			__u16 migration_policy;
 
-			/** @preferred_mem_loc.pad : MBZ */
-			__u16 pad;
+			/** @preferred_mem_loc.region_instance: Region instance */
+			__u16 region_instance;
 
 			/** @preferred_mem_loc.reserved : Reserved */
 			__u64 reserved;
lib/xe/xe_ioctl.c +9 -5
index 39c4667a1..ea17efdd9 100644
@@ -687,7 +687,8 @@ int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 }
 
 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
-		    uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy)
+		    uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy,
+		    uint16_t instance)
 {
 	struct drm_xe_madvise madvise = {
 		.type = type,
@@ -704,6 +705,7 @@ int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 	case DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC:
 		madvise.preferred_mem_loc.devmem_fd = op_val;
 		madvise.preferred_mem_loc.migration_policy = policy;
+		madvise.preferred_mem_loc.region_instance = instance;
 		igt_debug("madvise.preferred_mem_loc.devmem_fd = %d\n",
 			  madvise.preferred_mem_loc.devmem_fd);
 		break;
@@ -731,14 +733,16 @@ int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
  * @type: type of attribute
  * @op_val: fd/atomic value/pat index, depending upon type of operation
  * @policy: Page migration policy
+ * @instance: vram instance
  *
  * Function initializes different members of struct drm_xe_madvise and calls
  * MADVISE IOCTL .
  *
- * Asserts in case of error returned by DRM_IOCTL_XE_MADVISE.
+ * Returns error number in failure and 0 if pass.
  */
-void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
-		   uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy)
+int xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
+		   uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy,
+		   uint16_t instance)
 {
-	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext, type, op_val, policy), 0);
+	return __xe_vm_madvise(fd, vm, addr, range, ext, type, op_val, policy, instance);
 }
lib/xe/xe_ioctl.h +8 -3
index ae8a23a54..1ae38029d 100644
@@ -100,13 +100,18 @@ int __xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 		       uint32_t exec_queue, int64_t timeout);
 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,
-		    uint32_t type, uint32_t op_val, uint16_t policy);
-void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,
-		   uint32_t type, uint32_t op_val, uint16_t policy);
+		    uint32_t type, uint32_t op_val, uint16_t policy, uint16_t instance);
+int xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,
+		  uint32_t type, uint32_t op_val, uint16_t policy, uint16_t instance);
 int xe_vm_number_vmas_in_range(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr);
 int xe_vm_vma_attrs(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr,
 		    struct drm_xe_mem_range_attr *mem_attr);
 struct drm_xe_mem_range_attr
 *xe_vm_get_mem_attr_values_in_range(int fd, uint32_t vm, uint64_t start,
 				    uint64_t range, uint32_t *num_ranges);
+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo,
+			uint64_t offset, uint64_t addr,
+			uint64_t size, uint32_t flags);
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size);
 #endif /* XE_IOCTL_H */
tests/intel/xe_exec_system_allocator.c +4 -4
index b88967e58..1e7175061 100644
@@ -1164,7 +1164,7 @@ madvise_swizzle_op_exec(int fd, uint32_t vm, struct test_exec_data *data,
 	xe_vm_madvise(fd, vm, to_user_pointer(data), bo_size, 0,
 		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
 		      preferred_loc,
-		      0);
+		      0, 0);
 }
 
 static void
@@ -1172,7 +1172,7 @@ xe_vm_madvixe_pat_attr(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 		       int pat_index)
 {
 	xe_vm_madvise(fd, vm, addr, range, 0,
-		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0);
+		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0, 0);
 }
 
 static void
@@ -1181,7 +1181,7 @@ xe_vm_madvise_atomic_attr(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 {
 	xe_vm_madvise(fd, vm, addr, range, 0,
 		      DRM_XE_MEM_RANGE_ATTR_ATOMIC,
-		      mem_attr, 0);
+		      mem_attr, 0, 0);
 }
 
 static void
@@ -1190,7 +1190,7 @@ xe_vm_madvise_migrate_pages(int fd, uint32_t vm, uint64_t addr, uint64_t range)
 	xe_vm_madvise(fd, vm, addr, range, 0,
 		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
 		      DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM,
-		      DRM_XE_MIGRATE_ALL_PAGES);
+		      DRM_XE_MIGRATE_ALL_PAGES, 0);
 }
 
 static void
Signature · 1 line
2.48.1
#2 lore raw

Re: [PATCH i-g-t v8 01/10] lib/xe: Add instance parameter to xe_vm_madvise

Hi, Nishit,

Quoted 98 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

tests/intel/xe_exec_system_allocator: Add parameter in madvise call

Add an 'instance' parameter to __xe_vm_madvise() and xe_vm_madvise() to
specify which VRAM instance should be targeted for memory advise operations.
Getting compilation issues in xe_exec_system_allocator test after adding
'instance' parameters in xe_vm_madvise(). As a fix 0 as instance parameter
passed in xe_vm_madvise() calls available in xe_exec_system_allocator test.

---
 include/drm-uapi/xe_drm.h              |  4 ++-- lib/xe/xe_ioctl.c                      | 14 +++++++++----- lib/xe/xe_ioctl.h                      | 11 ++++++++--- tests/intel/xe_exec_system_allocator.c |  8 ++++----

 4 files changed, 23 insertions(+), 14 deletions(-)
include/drm-uapi/xe_drm.h +0 -0
index 89ab54935..3472efa58 100644
@@ -2060,8 +2060,8 @@ struct drm_xe_madvise {
  			/** @preferred_mem_loc.migration_policy:

Page migration policy */
  __u16 migration_policy;

include/drm-uapi/xe_drm.h +1 -2
-			/** @preferred_mem_loc.pad : MBZ */
-			__u16 pad;
+			/** @preferred_mem_loc.region_instance:

Region instance */

include/drm-uapi/xe_drm.h +1 -0
+			__u16 region_instance;


  /** @preferred_mem_loc.reserved : Reserved */
  __u64 reserved;

lib/xe/xe_ioctl.c +0 -0
index 39c4667a1..ea17efdd9 100644
@@ -687,7 +687,8 @@ int64_t xe_wait_ufence(int fd, uint64_t *addr,
 uint64_t value,
  }


 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,

lib/xe/xe_ioctl.c +0 -1
-		    uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy)

lib/xe/xe_ioctl.c +1 -0
+		    uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy,

lib/xe/xe_ioctl.c +1 -0
+		    uint16_t instance)

 {
  struct drm_xe_madvise madvise = {
  .type = type,

lib/xe/xe_ioctl.c +0 -0
@@ -704,6 +705,7 @@ int __xe_vm_madvise(int fd, uint32_t vm, uint64_t
 addr, uint64_t range,

  case DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC:
  madvise.preferred_mem_loc.devmem_fd = op_val; madvise.preferred_mem_loc.migration_policy = policy;

lib/xe/xe_ioctl.c +1 -0
+		madvise.preferred_mem_loc.region_instance =

instance; igt_debug("madvise.preferred_mem_loc.devmem_fd = %d\n",
    madvise.preferred_mem_loc.devmem_fd); break;

lib/xe/xe_ioctl.c +0 -0
@@ -731,14 +733,16 @@ int __xe_vm_madvise(int fd, uint32_t vm,
 uint64_t addr, uint64_t range,
   * @type: type of attribute
   * @op_val: fd/atomic value/pat index, depending upon type of

operation
  * @policy: Page migration policy
+ * @instance: vram instance
  *
  * Function initializes different members of struct drm_xe_madvise and calls
  * MADVISE IOCTL .
  *
- * Asserts in case of error returned by DRM_IOCTL_XE_MADVISE.
+ * Returns error number in failure and 0 if pass.
  */
-void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,

lib/xe/xe_ioctl.c +0 -1
-		   uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy)
+int xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,

lib/xe/xe_ioctl.c +1 -0
+		   uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy,

lib/xe/xe_ioctl.c +1 -0
+		   uint16_t instance)

 {

lib/xe/xe_ioctl.c +0 -1
-	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext,

type, op_val, policy), 0);

lib/xe/xe_ioctl.c +1 -0
+	return __xe_vm_madvise(fd, vm, addr, range, ext, type,
Quoted 1 line

op_val, policy, instance);

Why are you removing the assert from this function. Isn't the convention that you should be using __xe_vm_madvise() if you're interested in the return value, but xe_vm_madvise() if you want the function to abort on failure?

Thanks,
Thomas

Quoted 83 lines

 }

lib/xe/xe_ioctl.h +0 -0
index ae8a23a54..1ae38029d 100644
@@ -100,13 +100,18 @@ int __xe_wait_ufence(int fd, uint64_t *addr,
 uint64_t value,
  int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
  		       uint32_t exec_queue, int64_t timeout);

 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,

lib/xe/xe_ioctl.h +0 -1
-		    uint32_t type, uint32_t op_val, uint16_t

policy);
-void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,

lib/xe/xe_ioctl.h +1 -1
-		   uint32_t type, uint32_t op_val, uint16_t policy);
+		    uint32_t type, uint32_t op_val, uint16_t policy,

uint16_t instance);
+int xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,

lib/xe/xe_ioctl.h +1 -0
+		  uint32_t type, uint32_t op_val, uint16_t policy,

uint16_t instance);
 int xe_vm_number_vmas_in_range(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr);
 int xe_vm_vma_attrs(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr,
      struct drm_xe_mem_range_attr *mem_attr); struct drm_xe_mem_range_attr *xe_vm_get_mem_attr_values_in_range(int fd, uint32_t vm, uint64_t start,
      uint64_t range, uint32_t *num_ranges);

lib/xe/xe_ioctl.h +5 -0
+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo,
+			uint64_t offset, uint64_t addr,
+			uint64_t size, uint32_t flags);
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size);

 #endif /* XE_IOCTL_H */

tests/intel/xe_exec_system_allocator.c +1 -1
index b88967e58..1e7175061 100644
@@ -1164,7 +1164,7 @@ madvise_swizzle_op_exec(int fd, uint32_t vm,
 struct test_exec_data *data,
  	xe_vm_madvise(fd, vm, to_user_pointer(data), bo_size, 0,
  		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
  		      preferred_loc,
-		      0);
+		      0, 0);
  }


 static void

tests/intel/xe_exec_system_allocator.c +1 -1
@@ -1172,7 +1172,7 @@ xe_vm_madvixe_pat_attr(int fd, uint32_t vm,
 uint64_t addr, uint64_t range,
  		       int pat_index)
  {
  	xe_vm_madvise(fd, vm, addr, range, 0,
-		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0);
+		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0, 0);
  }


 static void

tests/intel/xe_exec_system_allocator.c +1 -1
@@ -1181,7 +1181,7 @@ xe_vm_madvise_atomic_attr(int fd, uint32_t vm,
 uint64_t addr, uint64_t range,
  {
  	xe_vm_madvise(fd, vm, addr, range, 0,
  		      DRM_XE_MEM_RANGE_ATTR_ATOMIC,
-		      mem_attr, 0);
+		      mem_attr, 0, 0);
  }


 static void

tests/intel/xe_exec_system_allocator.c +1 -1
@@ -1190,7 +1190,7 @@ xe_vm_madvise_migrate_pages(int fd, uint32_t
 vm, uint64_t addr, uint64_t range)
  	xe_vm_madvise(fd, vm, addr, range, 0,
  		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
  		      DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM,
-		      DRM_XE_MIGRATE_ALL_PAGES);
+		      DRM_XE_MIGRATE_ALL_PAGES, 0);
  }


 static void

#3 lore raw

RE: [PATCH i-g-t v8 01/10] lib/xe: Add instance parameter to xe_vm_madvise

Idea was to get return value after calling xe_vm_madvise(). Incorporated your comments and updated code. Will share in next version.

-----Original Message-----
From: Hellstrom, Thomas <[email protected]>
Sent: Wednesday, November 26, 2025 2:23 PM
To: [email protected]; Sharma, Nishit <[email protected]>
Subject: Re: [PATCH i-g-t v8 01/10] lib/xe: Add instance parameter to xe_vm_madvise

Hi, Nishit,

Quoted 93 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

tests/intel/xe_exec_system_allocator: Add parameter in madvise call

Add an 'instance' parameter to __xe_vm_madvise() and xe_vm_madvise() to specify which VRAM instance should be targeted for memory advise operations.
Getting compilation issues in xe_exec_system_allocator test after adding 'instance' parameters in xe_vm_madvise(). As a fix 0 as instance parameter passed in xe_vm_madvise() calls available in xe_exec_system_allocator test.

---
 include/drm-uapi/xe_drm.h              |  4 ++-- lib/xe/xe_ioctl.c                      | 14 +++++++++----- lib/xe/xe_ioctl.h                      | 11 ++++++++--- tests/intel/xe_exec_system_allocator.c |  8 ++++----

 4 files changed, 23 insertions(+), 14 deletions(-)
include/drm-uapi/xe_drm.h +0 -0
index 89ab54935..3472efa58 100644
@@ -2060,8 +2060,8 @@ struct drm_xe_madvise {
  			/** @preferred_mem_loc.migration_policy:

Page migration policy */
  __u16 migration_policy;

include/drm-uapi/xe_drm.h +1 -2
-			/** @preferred_mem_loc.pad : MBZ */
-			__u16 pad;
+			/** @preferred_mem_loc.region_instance:

Region instance */

include/drm-uapi/xe_drm.h +1 -0
+			__u16 region_instance;


  /** @preferred_mem_loc.reserved : Reserved */ __u64 reserved;

lib/xe/xe_ioctl.c index renamed from lib/xe/xe_ioctl.c +0 -0

39c4667a1..ea17efdd9 100644

lib/xe/xe_ioctl.c +0 -0
@@ -687,7 +687,8 @@ int64_t xe_wait_ufence(int fd, uint64_t *addr, 
 uint64_t value,
  }


 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,

lib/xe/xe_ioctl.c +0 -1
-		    uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy)

lib/xe/xe_ioctl.c +1 -0
+		    uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy,

lib/xe/xe_ioctl.c +1 -0
+		    uint16_t instance)

 {
  struct drm_xe_madvise madvise = {
  .type = type,

lib/xe/xe_ioctl.c +0 -0
@@ -704,6 +705,7 @@ int __xe_vm_madvise(int fd, uint32_t vm, uint64_t 
 addr, uint64_t range,

  case DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC:
  madvise.preferred_mem_loc.devmem_fd = op_val; madvise.preferred_mem_loc.migration_policy = policy;

lib/xe/xe_ioctl.c +1 -0
+		madvise.preferred_mem_loc.region_instance =

instance;
  igt_debug("madvise.preferred_mem_loc.devmem_fd = %d\n", madvise.preferred_mem_loc.devmem_fd); break;

lib/xe/xe_ioctl.c +0 -0
@@ -731,14 +733,16 @@ int __xe_vm_madvise(int fd, uint32_t vm, 
 uint64_t addr, uint64_t range,
   * @type: type of attribute
   * @op_val: fd/atomic value/pat index, depending upon type of 

operation
  * @policy: Page migration policy
+ * @instance: vram instance
  *
  * Function initializes different members of struct drm_xe_madvise and calls
  * MADVISE IOCTL .
  *
- * Asserts in case of error returned by DRM_IOCTL_XE_MADVISE.
+ * Returns error number in failure and 0 if pass.
  */
-void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,

lib/xe/xe_ioctl.c +0 -1
-		   uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy)
+int xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,

lib/xe/xe_ioctl.c +1 -0
+		   uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy,

lib/xe/xe_ioctl.c +1 -0
+		   uint16_t instance)

 {

lib/xe/xe_ioctl.c +0 -1
-	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext,

type, op_val, policy), 0);

lib/xe/xe_ioctl.c +1 -0
+	return __xe_vm_madvise(fd, vm, addr, range, ext, type,
Quoted 1 line

op_val, policy, instance);

Why are you removing the assert from this function. Isn't the convention that you should be using __xe_vm_madvise() if you're interested in the return value, but xe_vm_madvise() if you want the function to abort on failure?

Thanks,
Thomas

Quoted 83 lines

 }

lib/xe/xe_ioctl.h index renamed from lib/xe/xe_ioctl.h +0 -0

ae8a23a54..1ae38029d 100644

lib/xe/xe_ioctl.h +0 -0
@@ -100,13 +100,18 @@ int __xe_wait_ufence(int fd, uint64_t *addr, 
 uint64_t value,
  int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
  		       uint32_t exec_queue, int64_t timeout);

 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,

lib/xe/xe_ioctl.h +0 -1
-		    uint32_t type, uint32_t op_val, uint16_t

policy);
-void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,

lib/xe/xe_ioctl.h +1 -1
-		   uint32_t type, uint32_t op_val, uint16_t policy);
+		    uint32_t type, uint32_t op_val, uint16_t policy,

uint16_t instance);
+int xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,

lib/xe/xe_ioctl.h +1 -0
+		  uint32_t type, uint32_t op_val, uint16_t policy,

uint16_t instance);
 int xe_vm_number_vmas_in_range(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr);
 int xe_vm_vma_attrs(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr,
      struct drm_xe_mem_range_attr *mem_attr); struct drm_xe_mem_range_attr *xe_vm_get_mem_attr_values_in_range(int fd, uint32_t vm, uint64_t start,
      uint64_t range, uint32_t *num_ranges);

lib/xe/xe_ioctl.h +5 -0
+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo,
+			uint64_t offset, uint64_t addr,
+			uint64_t size, uint32_t flags);
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size);

 #endif /* XE_IOCTL_H */

tests/intel/xe_exec_system_allocator.c +1 -1
index b88967e58..1e7175061 100644
@@ -1164,7 +1164,7 @@ madvise_swizzle_op_exec(int fd, uint32_t vm, 
 struct test_exec_data *data,
  	xe_vm_madvise(fd, vm, to_user_pointer(data), bo_size, 0,
  		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
  		      preferred_loc,
-		      0);
+		      0, 0);
  }


 static void

tests/intel/xe_exec_system_allocator.c +1 -1
@@ -1172,7 +1172,7 @@ xe_vm_madvixe_pat_attr(int fd, uint32_t vm, 
 uint64_t addr, uint64_t range,
  		       int pat_index)
  {
  	xe_vm_madvise(fd, vm, addr, range, 0,
-		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0);
+		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0, 0);
  }


 static void

tests/intel/xe_exec_system_allocator.c +1 -1
@@ -1181,7 +1181,7 @@ xe_vm_madvise_atomic_attr(int fd, uint32_t vm, 
 uint64_t addr, uint64_t range,
  {
  	xe_vm_madvise(fd, vm, addr, range, 0,
  		      DRM_XE_MEM_RANGE_ATTR_ATOMIC,
-		      mem_attr, 0);
+		      mem_attr, 0, 0);
  }


 static void

tests/intel/xe_exec_system_allocator.c +1 -1
@@ -1190,7 +1190,7 @@ xe_vm_madvise_migrate_pages(int fd, uint32_t vm, 
 uint64_t addr, uint64_t range)
  	xe_vm_madvise(fd, vm, addr, range, 0,
  		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
  		      DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM,
-		      DRM_XE_MIGRATE_ALL_PAGES);
+		      DRM_XE_MIGRATE_ALL_PAGES, 0);
  }


 static void

#4 lore raw

Re: [PATCH i-g-t v8 01/10] lib/xe: Add instance parameter to xe_vm_madvise

In reply to [email protected]

Hi nishit.sharma,

Quoted 11 lines · On 2025-11-21 at 16:25:28 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

tests/intel/xe_exec_system_allocator: Add parameter in madvise call

Add an 'instance' parameter to __xe_vm_madvise() and xe_vm_madvise() to specify which VRAM instance should be targeted for memory advise operations.
Getting compilation issues in xe_exec_system_allocator test after adding 'instance' parameters in xe_vm_madvise(). As a fix 0 as instance parameter passed in xe_vm_madvise() calls available in xe_exec_system_allocator test.

Quoted 3 lines
---
 include/drm-uapi/xe_drm.h              |  4 ++--

DRM uapi should be sync-ed with drm-next kernel commit and with a separate patch. If you need it before, add it to ./include/drm-uapi-experimental/intel_drm_local.h

For example look into https://patchwork.freedesktop.org/series/156928/

Quoted 44 lines
 lib/xe/xe_ioctl.c                      | 14 +++++++++-----
 lib/xe/xe_ioctl.h                      | 11 ++++++++---
 tests/intel/xe_exec_system_allocator.c |  8 ++++----
 4 files changed, 23 insertions(+), 14 deletions(-)
include/drm-uapi/xe_drm.h +2 -2
index 89ab54935..3472efa58 100644
@@ -2060,8 +2060,8 @@ struct drm_xe_madvise {
 			/** @preferred_mem_loc.migration_policy: Page migration policy */
 			__u16 migration_policy;
 
-			/** @preferred_mem_loc.pad : MBZ */
-			__u16 pad;
+			/** @preferred_mem_loc.region_instance: Region instance */
+			__u16 region_instance;
 
 			/** @preferred_mem_loc.reserved : Reserved */
 			__u64 reserved;
lib/xe/xe_ioctl.c +3 -1
index 39c4667a1..ea17efdd9 100644
@@ -687,7 +687,8 @@ int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 }
 
 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
-		    uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy)
+		    uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy,
+		    uint16_t instance)
 {
 	struct drm_xe_madvise madvise = {
 		.type = type,
@@ -704,6 +705,7 @@ int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 	case DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC:
 		madvise.preferred_mem_loc.devmem_fd = op_val;
 		madvise.preferred_mem_loc.migration_policy = policy;
+		madvise.preferred_mem_loc.region_instance = instance;
 		igt_debug("madvise.preferred_mem_loc.devmem_fd = %d\n",
 			  madvise.preferred_mem_loc.devmem_fd);
 		break;
@@ -731,14 +733,16 @@ int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
  * @type: type of attribute

lib/xe/xe_ioctl.c int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, · line 742

Quoted 10 lines
lib/xe/xe_ioctl.c +2 -1
  * @op_val: fd/atomic value/pat index, depending upon type of operation
  * @policy: Page migration policy
+ * @instance: vram instance
  *
  * Function initializes different members of struct drm_xe_madvise and calls
  * MADVISE IOCTL .
  *
- * Asserts in case of error returned by DRM_IOCTL_XE_MADVISE.
+ * Returns error number in failure and 0 if pass.
  */

Why do you removed info about assert? Just add infor about 'Returns...' above it.

Regards,
Kamil

Quoted 78 lines
lib/xe/xe_ioctl.c +4 -3
-void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
-		   uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy)
+int xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
+		   uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy,
+		   uint16_t instance)
 {
-	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext, type, op_val, policy), 0);
+	return __xe_vm_madvise(fd, vm, addr, range, ext, type, op_val, policy, instance);
 }
lib/xe/xe_ioctl.h +8 -3
index ae8a23a54..1ae38029d 100644
@@ -100,13 +100,18 @@ int __xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 		       uint32_t exec_queue, int64_t timeout);
 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,
-		    uint32_t type, uint32_t op_val, uint16_t policy);
-void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,
-		   uint32_t type, uint32_t op_val, uint16_t policy);
+		    uint32_t type, uint32_t op_val, uint16_t policy, uint16_t instance);
+int xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,
+		  uint32_t type, uint32_t op_val, uint16_t policy, uint16_t instance);
 int xe_vm_number_vmas_in_range(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr);
 int xe_vm_vma_attrs(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr,
 		    struct drm_xe_mem_range_attr *mem_attr);
 struct drm_xe_mem_range_attr
 *xe_vm_get_mem_attr_values_in_range(int fd, uint32_t vm, uint64_t start,
 				    uint64_t range, uint32_t *num_ranges);
+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo,
+			uint64_t offset, uint64_t addr,
+			uint64_t size, uint32_t flags);
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size);
 #endif /* XE_IOCTL_H */
tests/intel/xe_exec_system_allocator.c +4 -4
index b88967e58..1e7175061 100644
@@ -1164,7 +1164,7 @@ madvise_swizzle_op_exec(int fd, uint32_t vm, struct test_exec_data *data,
 	xe_vm_madvise(fd, vm, to_user_pointer(data), bo_size, 0,
 		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
 		      preferred_loc,
-		      0);
+		      0, 0);
 }
 
 static void
@@ -1172,7 +1172,7 @@ xe_vm_madvixe_pat_attr(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 		       int pat_index)
 {
 	xe_vm_madvise(fd, vm, addr, range, 0,
-		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0);
+		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0, 0);
 }
 
 static void
@@ -1181,7 +1181,7 @@ xe_vm_madvise_atomic_attr(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 {
 	xe_vm_madvise(fd, vm, addr, range, 0,
 		      DRM_XE_MEM_RANGE_ATTR_ATOMIC,
-		      mem_attr, 0);
+		      mem_attr, 0, 0);
 }
 
 static void
@@ -1190,7 +1190,7 @@ xe_vm_madvise_migrate_pages(int fd, uint32_t vm, uint64_t addr, uint64_t range)
 	xe_vm_madvise(fd, vm, addr, range, 0,
 		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
 		      DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM,
-		      DRM_XE_MIGRATE_ALL_PAGES);
+		      DRM_XE_MIGRATE_ALL_PAGES, 0);
 }
 
 static void
Signature · 1 line
2.48.1
#5 lore raw

PATCH v8 2/10 lib/xe: Add synchronous helpers for VM bind/unbind operations

In reply to [email protected]

From: Nishit Sharma <[email protected]>

Introduce synchronous wrappers for VM bind/unbind operations that handle user fence allocation, waiting, and cleanup internally. This simplifies test code by eliminating repetitive synchronization boilerplate.

---
 lib/xe/xe_ioctl.c | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
lib/xe/xe_ioctl.c +39 -0
index ea17efdd9..06ce8a339 100644
@@ -746,3 +746,42 @@ int xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 {
 	return __xe_vm_madvise(fd, vm, addr, range, ext, type, op_val, policy, instance);
 }
+
+#define        BIND_SYNC_VAL   0x686868
+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo, uint64_t offset,
+			uint64_t addr, uint64_t size, uint32_t flags)
+{
+	volatile uint64_t *sync_addr = malloc(sizeof(*sync_addr));
+	struct drm_xe_sync sync = {
+		.flags = DRM_XE_SYNC_FLAG_SIGNAL,
+		.type = DRM_XE_SYNC_TYPE_USER_FENCE,
+		.addr = to_user_pointer((uint64_t *)sync_addr),
+		.timeline_value = BIND_SYNC_VAL,
+	};
+
+	igt_assert(!!sync_addr);
+	xe_vm_bind_async_flags(fd, vm, 0, bo, 0, addr, size, &sync, 1, flags);
+	if (*sync_addr != BIND_SYNC_VAL)
+		xe_wait_ufence(fd, (uint64_t *)sync_addr, BIND_SYNC_VAL, 0, NSEC_PER_SEC * 10);
+	/* Only free if the wait succeeds */
+	free((void *)sync_addr);
+}
+
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size)
+{
+	volatile uint64_t *sync_addr = malloc(sizeof(*sync_addr));
+	struct drm_xe_sync sync = {
+		.flags = DRM_XE_SYNC_FLAG_SIGNAL,
+		.type = DRM_XE_SYNC_TYPE_USER_FENCE,
+		.addr = to_user_pointer((uint64_t *)sync_addr),
+		.timeline_value = BIND_SYNC_VAL,
+	};
+
+	igt_assert(!!sync_addr);
+	*sync_addr = 0;
+	xe_vm_unbind_async(fd, vm, 0, 0, addr, size, &sync, 1);
+	if (*sync_addr != BIND_SYNC_VAL)
+		xe_wait_ufence(fd, (uint64_t *)sync_addr, BIND_SYNC_VAL, 0, NSEC_PER_SEC * 10);
+	free((void *)sync_addr);
+}
Signature · 1 line
2.48.1
Reviewed-by Thomas Hellström on v8 2/10
#6 lore raw

Re: [PATCH i-g-t v8 02/10] lib/xe: Add synchronous helpers for VM bind/unbind operations

Quoted 9 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

Introduce synchronous wrappers for VM bind/unbind operations that handle
user fence allocation, waiting, and cleanup internally. This simplifies
test code by eliminating repetitive synchronization boilerplate.

Quoted 58 lines

---
 lib/xe/xe_ioctl.c | 39 +++++++++++++++++++++++++++++++++++++++

 1 file changed, 39 insertions(+)
lib/xe/xe_ioctl.c +0 -0
index ea17efdd9..06ce8a339 100644
@@ -746,3 +746,42 @@ int xe_vm_madvise(int fd, uint32_t vm, uint64_t
 addr, uint64_t range,
  {
  	return __xe_vm_madvise(fd, vm, addr, range, ext, type,

op_val, policy, instance);
 }

lib/xe/xe_ioctl.c +3 -0
+
+#define        BIND_SYNC_VAL   0x686868
+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo, uint64_t

offset,

lib/xe/xe_ioctl.c +1 -0
+			uint64_t addr, uint64_t size, uint32_t

flags)

lib/xe/xe_ioctl.c +11 -0
+{
+	volatile uint64_t *sync_addr = malloc(sizeof(*sync_addr));
+	struct drm_xe_sync sync = {
+		.flags = DRM_XE_SYNC_FLAG_SIGNAL,
+		.type = DRM_XE_SYNC_TYPE_USER_FENCE,
+		.addr = to_user_pointer((uint64_t *)sync_addr),
+		.timeline_value = BIND_SYNC_VAL,
+	};
+
+	igt_assert(!!sync_addr);
+	xe_vm_bind_async_flags(fd, vm, 0, bo, 0, addr, size, &sync,

1, flags);

lib/xe/xe_ioctl.c +2 -0
+	if (*sync_addr != BIND_SYNC_VAL)
+		xe_wait_ufence(fd, (uint64_t *)sync_addr,

BIND_SYNC_VAL, 0, NSEC_PER_SEC * 10);

lib/xe/xe_ioctl.c +20 -0
+	/* Only free if the wait succeeds */
+	free((void *)sync_addr);
+}
+
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size)
+{
+	volatile uint64_t *sync_addr = malloc(sizeof(*sync_addr));
+	struct drm_xe_sync sync = {
+		.flags = DRM_XE_SYNC_FLAG_SIGNAL,
+		.type = DRM_XE_SYNC_TYPE_USER_FENCE,
+		.addr = to_user_pointer((uint64_t *)sync_addr),
+		.timeline_value = BIND_SYNC_VAL,
+	};
+
+	igt_assert(!!sync_addr);
+	*sync_addr = 0;
+	xe_vm_unbind_async(fd, vm, 0, 0, addr, size, &sync, 1);
+	if (*sync_addr != BIND_SYNC_VAL)
+		xe_wait_ufence(fd, (uint64_t *)sync_addr,

BIND_SYNC_VAL, 0, NSEC_PER_SEC * 10);

lib/xe/xe_ioctl.c +2 -0
+	free((void *)sync_addr);
+}
#7 lore raw

PATCH v8 3/10 tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, writes data to it from src GPU, and reads/verifies the data from dst GPU. Optionally, the CPU also reads or modifies the buffer and both GPUs verify the results, ensuring correct cross-GPU and CPU memory access in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 395 ++++++++++++++++++++++++++++++++++
 tests/meson.build             |   1 +
 2 files changed, 396 insertions(+)
 create mode 100644 tests/intel/xe_multi_gpusvm.c
tests/intel/xe_multi_gpusvm.c new file +395 -0
new file mode 100644
index 000000000..471be6449
@@ -0,0 +1,395 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_multigpu.h"
+
+#include "intel_blt.h"
+#include "intel_mocs.h"
+#include "intel_reg.h"
+
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+#include "xe/xe_util.h"
+
+/**
+ * TEST: Basic multi-gpu SVM testing
+ * Category: SVM
+ * Mega feature: Compute
+ * Sub-category: Compute tests
+ * Functionality: SVM p2p access, madvise and prefetch.
+ * Test category: functionality test
+ *
+ * SUBTEST: mgpu-xgpu-access-basic
+ * Description:
+ *	Test basic cross-GPU memory access in multi-GPU SVM configuration
+ *
+ * SUBTEST: mgpu-xgpu-access-prefetch
+ * Description:
+ *	Test cross-GPU memory access with prefetch in multi-GPU SVM configuration
+ *
+ */
+
+#define MAX_XE_REGIONS	8
+#define MAX_XE_GPUS 8
+#define NUM_LOOPS 1
+#define BATCH_SIZE(_fd) ALIGN(SZ_8K, xe_get_default_alignment(_fd))
+#define BIND_SYNC_VAL 0x686868
+#define EXEC_SYNC_VAL 0x676767
+#define COPY_SIZE SZ_64M
+
+#define MULTIGPU_BASIC			BIT(0)
+#define MULTIGPU_PREFETCH		BIT(1)
+#define MULTIGPU_XGPU_ACCESS		BIT(2)
+
+struct xe_svm_gpu_info {
+	bool supports_faults;
+	int vram_regions[MAX_XE_REGIONS];
+	unsigned int num_regions;
+	unsigned int va_bits;
+	int fd;
+};
+
+typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info *src,
+			    struct xe_svm_gpu_info *dst,
+			    struct drm_xe_engine_class_instance *eci,
+			    unsigned int flags);
+
+static void for_each_gpu_pair(int num_gpus,
+			      struct xe_svm_gpu_info *gpus,
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn,
+			      unsigned int flags);
+
+static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
+		    uint32_t *vm, uint32_t *exec_queue)
+{
+	*vm = xe_vm_create(gpu->fd,
+			   DRM_XE_VM_CREATE_FLAG_LR_MODE | DRM_XE_VM_CREATE_FLAG_FAULT_MODE, 0);
+	*exec_queue = xe_exec_queue_create(gpu->fd, *vm, eci, 0);
+	xe_vm_bind_lr_sync(gpu->fd, *vm, 0, 0, 0, 1ull << gpu->va_bits,
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+}
+
+static void
+setup_sync(struct drm_xe_sync *sync, volatile uint64_t **sync_addr, uint64_t timeline_value)
+{
+	*sync_addr = malloc(sizeof(**sync_addr));
+	igt_assert(*sync_addr);
+	sync->flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync->type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	sync->addr = to_user_pointer((uint64_t *)*sync_addr);
+	sync->timeline_value = timeline_value;
+	**sync_addr = 0;
+}
+
+static void
+cleanup_vm_and_queue(struct xe_svm_gpu_info *gpu, uint32_t vm, uint32_t exec_queue)
+{
+	xe_vm_unbind_lr_sync(gpu->fd, vm, 0, 0, 1ull << gpu->va_bits);
+	xe_exec_queue_destroy(gpu->fd, exec_queue);
+	xe_vm_destroy(gpu->fd, vm);
+}
+
+static void xe_multigpu_madvise(int src_fd, uint32_t vm, uint64_t addr, uint64_t size,
+				uint64_t ext, uint32_t type, int dst_fd, uint16_t policy,
+				uint32_t instance, uint32_t exec_queue)
+{
+	int ret;
+
+	if (src_fd != dst_fd) {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type, dst_fd, policy, instance);
+		if (ret == -ENOLINK) {
+			igt_info("No fast interconnect between GPU0 and GPU1, falling back to local VRAM\n");
+			ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type,
+					    DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE,
+					    policy, 0);
+			if (ret) {
+				igt_info("Local VRAM madvise failed, falling back to system memory\n");
+				ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type,
+						    DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, policy,
+						    0);
+				igt_assert_eq(ret, 0);
+			}
+		} else {
+			igt_assert_eq(ret, 0);
+		}
+	} else {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type, dst_fd, policy, instance);
+		igt_assert_eq(ret, 0);
+	}
+}
+
+static void xe_multigpu_prefetch(int src_fd, uint32_t vm, uint64_t addr, uint64_t size,
+				 struct drm_xe_sync *sync, volatile uint64_t *sync_addr,
+				 uint32_t exec_queue, unsigned int flags)
+{
+	if (flags & MULTIGPU_PREFETCH) {
+		xe_vm_prefetch_async(src_fd, vm, 0, 0, addr, size, sync, 1,
+				     DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC);
+		if (*sync_addr != sync->timeline_value)
+			xe_wait_ufence(src_fd, (uint64_t *)sync_addr, sync->timeline_value,
+				       exec_queue, NSEC_PER_SEC * 10);
+	}
+}
+
+static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus,
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn, unsigned int flags)
+{
+	for (int src = 0; src < num_gpus; src++) {
+		if (!gpus[src].supports_faults)
+			continue;
+
+		for (int dst = 0; dst < num_gpus; dst++) {
+			if (src == dst)
+				continue;
+			fn(&gpus[src], &gpus[dst], eci, flags);
+		}
+	}
+}
+
+static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		       uint64_t dst_addr, uint64_t copy_size,
+		       uint32_t *bo, uint64_t *addr)
+{
+	uint32_t width = copy_size / 256;
+	uint32_t height = 1;
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	uint32_t mocs_index = intel_get_uc_mocs_index(fd);
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size, vram_if_possible(fd, 0), 0);
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+	cmd[i++] = MEM_COPY_CMD | (1 << 19);
+	cmd[i++] = width - 1;
+	cmd[i++] = height - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = src_addr & ((1UL << 32) - 1);
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = dst_addr & ((1UL << 32) - 1);
+	cmd[i++] = dst_addr >> 32;
+	cmd[i++] = mocs_index << XE2_MEM_COPY_MOCS_SHIFT | mocs_index;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr, batch_bo_size, 0);
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
+static void batch_fini(int fd, uint32_t vm, uint32_t bo, uint64_t addr)
+{
+	/* Unmap the batch bo by re-instating the SVM binding. */
+	xe_vm_bind_lr_sync(fd, vm, 0, 0, addr, BATCH_SIZE(fd),
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+	gem_close(fd, bo);
+}
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info)
+{
+	unsigned int count = 0;
+	uint64_t regions = all_memory_regions(fd);
+	uint32_t region;
+
+	xe_for_each_mem_region(fd, regions, region) {
+		if (XE_IS_VRAM_MEMORY_REGION(fd, region)) {
+			struct drm_xe_mem_region *mem_region =
+				xe_mem_region(fd, 1ull << (region - 1));
+			igt_assert(count < MAX_XE_REGIONS);
+			info->vram_regions[count++] = mem_region->instance;
+		}
+	}
+
+	info->num_regions = count;
+}
+
+static int get_device_info(struct xe_svm_gpu_info gpus[], int num_gpus)
+{
+	int cnt;
+	int xe;
+	int i;
+
+	for (i = 0, cnt = 0 && i < 128; cnt < num_gpus; i++) {
+		xe = __drm_open_driver_another(i, DRIVER_XE);
+		if (xe < 0)
+			break;
+
+		gpus[cnt].fd = xe;
+		cnt++;
+	}
+
+	return cnt;
+}
+
+static int
+mgpu_check_fault_support(struct xe_svm_gpu_info *gpu1,
+			 struct xe_svm_gpu_info *gpu2)
+{
+	int ret = 0;
+
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("GPU does not support page faults, skipping execution\n");
+		ret = 1;
+	}
+	return ret;
+}
+
+static void
+copy_src_dst(struct xe_svm_gpu_info *gpu1,
+	     struct xe_svm_gpu_info *gpu2,
+	     struct drm_xe_engine_class_instance *eci,
+	     unsigned int flags)
+{
+	uint32_t vm[1];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo;
+	void *copy_src, *copy_dst;
+	uint64_t batch_addr;
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Checking if GPU support page faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+
+	/* Allocate source and destination buffers */
+	copy_src = aligned_alloc(xe_get_default_alignment(gpu1->fd), SZ_64M);
+	igt_assert(copy_src);
+	copy_dst = aligned_alloc(xe_get_default_alignment(gpu2->fd), SZ_64M);
+	igt_assert(copy_dst);
+
+	batch_init(gpu1->fd, vm[0], to_user_pointer(copy_src), to_user_pointer(copy_dst),
+		   COPY_SIZE, &batch_bo, &batch_addr);
+
+	/* Fill the source with a pattern, clear the destination. */
+	memset(copy_src, 0x67, COPY_SIZE);
+	memset(copy_dst, 0x0, COPY_SIZE);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], to_user_pointer(copy_dst), COPY_SIZE,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], to_user_pointer(copy_dst), COPY_SIZE, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* Execute a GPU copy. */
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr, &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[0],
+			       NSEC_PER_SEC * 10);
+
+	igt_assert(memcmp(copy_src, copy_dst, COPY_SIZE) == 0);
+
+	free(copy_dst);
+	free(copy_src);
+	munmap((void *)batch_addr, BATCH_SIZE(gpu1->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo, batch_addr);
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+}
+
+static void
+gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	copy_src_dst(src, dst, eci, flags);
+}
+
+static void
+test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
+	       struct drm_xe_engine_class_instance *eci,
+	       unsigned int flags)
+{
+	if (flags & MULTIGPU_XGPU_ACCESS)
+		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_mem_access_wrapper, flags);
+}
+
+struct section {
+	const char *name;
+	unsigned int flags;
+};
+
+igt_main
+{
+	struct xe_svm_gpu_info gpus[MAX_XE_GPUS];
+	struct xe_device *xe;
+	int gpu, gpu_cnt;
+
+	struct drm_xe_engine_class_instance eci = {
+		.engine_class = DRM_XE_ENGINE_CLASS_COPY,
+	};
+
+	const struct section msections[] = {
+		{ "xgpu-access-basic", MULTIGPU_BASIC | MULTIGPU_XGPU_ACCESS },
+		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_XGPU_ACCESS },
+		{ NULL },
+	};
+
+	igt_fixture {
+		gpu_cnt = get_device_info(gpus, ARRAY_SIZE(gpus));
+		igt_skip_on(gpu_cnt < 2);
+
+		for (gpu = 0; gpu < gpu_cnt; ++gpu) {
+			igt_assert(gpu < MAX_XE_GPUS);
+
+			open_pagemaps(gpus[gpu].fd, &gpus[gpu]);
+			/* NOTE! inverted return value. */
+			gpus[gpu].supports_faults = !xe_supports_faults(gpus[gpu].fd);
+			fprintf(stderr, "GPU %u has %u VRAM regions%s, and %s SVM VMs.\n",
+				gpu, gpus[gpu].num_regions,
+				gpus[gpu].num_regions != 1 ? "s" : "",
+				gpus[gpu].supports_faults ? "supports" : "doesn't support");
+
+			xe = xe_device_get(gpus[gpu].fd);
+			gpus[gpu].va_bits = xe->va_bits;
+		}
+	}
+
+	igt_describe("gpu-gpu write-read");
+	for (const struct section *s = msections; s->name; s++) {
+		igt_subtest_f("mgpu-%s", s->name)
+			test_mgpu_exec(gpu_cnt, gpus, &eci, s->flags);
+	}
+
+	igt_fixture {
+		int cnt;
+
+		for (cnt = 0; cnt < gpu_cnt; cnt++)
+			drm_close_driver(gpus[cnt].fd);
+	}
+}
tests/meson.build +1 -0
index 9736f2338..1209f84a4 100644
@@ -313,6 +313,7 @@ intel_xe_progs = [
 	'xe_media_fill',
 	'xe_mmap',
 	'xe_module_load',
+        'xe_multi_gpusvm',
 	'xe_noexec_ping_pong',
 	'xe_oa',
 	'xe_pat',
Signature · 1 line
2.48.1
#8 lore raw

RE: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

Quoted 77 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of [email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, writes data to it from src GPU, and reads/verifies the data from dst GPU. Optionally, the CPU also reads or modifies the buffer and both GPUs verify the results, ensuring correct cross- GPU and CPU memory access in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 395
++++++++++++++++++++++++++++++++++
 tests/meson.build             |   1 +
 2 files changed, 396 insertions(+)
 create mode 100644 tests/intel/xe_multi_gpusvm.c
tests/intel/xe_multi_gpusvm.c new file +34 -0
new file mode 100644 index 000000000..471be6449
@@ -0,0 +1,395 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_multigpu.h"
+
+#include "intel_blt.h"
+#include "intel_mocs.h"
+#include "intel_reg.h"
+
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+#include "xe/xe_util.h"
+
+/**
+ * TEST: Basic multi-gpu SVM testing
+ * Category: SVM
+ * Mega feature: Compute
+ * Sub-category: Compute tests
+ * Functionality: SVM p2p access, madvise and prefetch.
+ * Test category: functionality test
+ *
+ * SUBTEST: mgpu-xgpu-access-basic
+ * Description:
+ *	Test basic cross-GPU memory access in multi-GPU SVM configuration
+ *
+ * SUBTEST: mgpu-xgpu-access-prefetch
+ * Description:
+ *	Test cross-GPU memory access with prefetch in multi-GPU SVM

configuration
+ *
+ */

tests/intel/xe_multi_gpusvm.c new file +6 -0
+
+#define MAX_XE_REGIONS	8
+#define MAX_XE_GPUS 8
+#define NUM_LOOPS 1
+#define BATCH_SIZE(_fd) ALIGN(SZ_8K, xe_get_default_alignment(_fd))
+#define BIND_SYNC_VAL 0x686868 #define EXEC_SYNC_VAL 0x676767

#define

tests/intel/xe_multi_gpusvm.c line 46

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c new file +3 -0
+COPY_SIZE SZ_64M
+
+#define MULTIGPU_BASIC			BIT(0)

We are not using this flag anywhere in code. Why are we maintaining this -Pravalika

Quoted 393 lines
tests/intel/xe_multi_gpusvm.c new file +31 -0
+#define MULTIGPU_PREFETCH		BIT(1)
+#define MULTIGPU_XGPU_ACCESS		BIT(2)
+
+struct xe_svm_gpu_info {
+	bool supports_faults;
+	int vram_regions[MAX_XE_REGIONS];
+	unsigned int num_regions;
+	unsigned int va_bits;
+	int fd;
+};
+
+typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info *src,
+			    struct xe_svm_gpu_info *dst,
+			    struct drm_xe_engine_class_instance *eci,
+			    unsigned int flags);
+
+static void for_each_gpu_pair(int num_gpus,
+			      struct xe_svm_gpu_info *gpus,
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn,
+			      unsigned int flags);
+
+static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c new file +3 -0
+		    uint32_t *vm, uint32_t *exec_queue) {
+	*vm = xe_vm_create(gpu->fd,
+			   DRM_XE_VM_CREATE_FLAG_LR_MODE |

DRM_XE_VM_CREATE_FLAG_FAULT_MODE, 0);

tests/intel/xe_multi_gpusvm.c new file +19 -0
+	*exec_queue = xe_exec_queue_create(gpu->fd, *vm, eci, 0);
+	xe_vm_bind_lr_sync(gpu->fd, *vm, 0, 0, 0, 1ull << gpu->va_bits,
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+}
+
+static void
+setup_sync(struct drm_xe_sync *sync, volatile uint64_t **sync_addr,
+uint64_t timeline_value) {
+	*sync_addr = malloc(sizeof(**sync_addr));
+	igt_assert(*sync_addr);
+	sync->flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync->type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	sync->addr = to_user_pointer((uint64_t *)*sync_addr);
+	sync->timeline_value = timeline_value;
+	**sync_addr = 0;
+}
+
+static void
+cleanup_vm_and_queue(struct xe_svm_gpu_info *gpu, uint32_t vm,

uint32_t

tests/intel/xe_multi_gpusvm.c new file +7 -0
+exec_queue) {
+	xe_vm_unbind_lr_sync(gpu->fd, vm, 0, 0, 1ull << gpu->va_bits);
+	xe_exec_queue_destroy(gpu->fd, exec_queue);
+	xe_vm_destroy(gpu->fd, vm);
+}
+
+static void xe_multigpu_madvise(int src_fd, uint32_t vm, uint64_t addr,

uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				uint64_t ext, uint32_t type, int dst_fd,

uint16_t policy,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+				uint32_t instance, uint32_t exec_queue) {
+	int ret;
+
+	if (src_fd != dst_fd) {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type,

dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (ret == -ENOLINK) {
+			igt_info("No fast interconnect between GPU0 and

GPU1, falling back to local VRAM\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			ret = xe_vm_madvise(src_fd, vm, addr, size, ext,

type,
+
DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE,

tests/intel/xe_multi_gpusvm.c new file +3 -0
+					    policy, 0);
+			if (ret) {
+				igt_info("Local VRAM madvise failed, falling

back to system memory\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				ret = xe_vm_madvise(src_fd, vm, addr, size,

ext, type,
+
DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, policy,

tests/intel/xe_multi_gpusvm.c new file +8 -0
+						    0);
+				igt_assert_eq(ret, 0);
+			}
+		} else {
+			igt_assert_eq(ret, 0);
+		}
+	} else {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type,

dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +5 -0
+		igt_assert_eq(ret, 0);
+	}
+}
+
+static void xe_multigpu_prefetch(int src_fd, uint32_t vm, uint64_t addr,

uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				 struct drm_xe_sync *sync, volatile uint64_t

*sync_addr,

tests/intel/xe_multi_gpusvm.c new file +4 -0
+				 uint32_t exec_queue, unsigned int flags) {
+	if (flags & MULTIGPU_PREFETCH) {
+		xe_vm_prefetch_async(src_fd, vm, 0, 0, addr, size, sync, 1,
+

DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (*sync_addr != sync->timeline_value)
+			xe_wait_ufence(src_fd, (uint64_t *)sync_addr, sync-
Quoted 1 line

timeline_value,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+				       exec_queue, NSEC_PER_SEC * 10);
+	}
+}
+
+static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info

*gpus,

tests/intel/xe_multi_gpusvm.c new file +29 -0
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn, unsigned int flags) {
+	for (int src = 0; src < num_gpus; src++) {
+		if (!gpus[src].supports_faults)
+			continue;
+
+		for (int dst = 0; dst < num_gpus; dst++) {
+			if (src == dst)
+				continue;
+			fn(&gpus[src], &gpus[dst], eci, flags);
+		}
+	}
+}
+
+static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		       uint64_t dst_addr, uint64_t copy_size,
+		       uint32_t *bo, uint64_t *addr)
+{
+	uint32_t width = copy_size / 256;
+	uint32_t height = 1;
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	uint32_t mocs_index = intel_get_uc_mocs_index(fd);
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c new file +12 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+	cmd[i++] = MEM_COPY_CMD | (1 << 19);
+	cmd[i++] = width - 1;
+	cmd[i++] = height - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = src_addr & ((1UL << 32) - 1);
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = dst_addr & ((1UL << 32) - 1);
+	cmd[i++] = dst_addr >> 32;
+	cmd[i++] = mocs_index << XE2_MEM_COPY_MOCS_SHIFT |

mocs_index;

tests/intel/xe_multi_gpusvm.c new file +6 -0
+	cmd[i++] = MI_BATCH_BUFFER_END;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c new file +23 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
+static void batch_fini(int fd, uint32_t vm, uint32_t bo, uint64_t addr)
+{
+	/* Unmap the batch bo by re-instating the SVM binding. */
+	xe_vm_bind_lr_sync(fd, vm, 0, 0, addr, BATCH_SIZE(fd),
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+	gem_close(fd, bo);
+}
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info) {
+	unsigned int count = 0;
+	uint64_t regions = all_memory_regions(fd);
+	uint32_t region;
+
+	xe_for_each_mem_region(fd, regions, region) {
+		if (XE_IS_VRAM_MEMORY_REGION(fd, region)) {
+			struct drm_xe_mem_region *mem_region =
+				xe_mem_region(fd, 1ull << (region - 1));
+			igt_assert(count < MAX_XE_REGIONS);
+			info->vram_regions[count++] = mem_region-
Quoted 1 line

instance;

tests/intel/xe_multi_gpusvm.c new file +32 -0
+		}
+	}
+
+	info->num_regions = count;
+}
+
+static int get_device_info(struct xe_svm_gpu_info gpus[], int num_gpus)
+{
+	int cnt;
+	int xe;
+	int i;
+
+	for (i = 0, cnt = 0 && i < 128; cnt < num_gpus; i++) {
+		xe = __drm_open_driver_another(i, DRIVER_XE);
+		if (xe < 0)
+			break;
+
+		gpus[cnt].fd = xe;
+		cnt++;
+	}
+
+	return cnt;
+}
+
+static int
+mgpu_check_fault_support(struct xe_svm_gpu_info *gpu1,
+			 struct xe_svm_gpu_info *gpu2)
+{
+	int ret = 0;
+
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("GPU does not support page faults, skipping

execution\n");

tests/intel/xe_multi_gpusvm.c new file +27 -0
+		ret = 1;
+	}
+	return ret;
+}
+
+static void
+copy_src_dst(struct xe_svm_gpu_info *gpu1,
+	     struct xe_svm_gpu_info *gpu2,
+	     struct drm_xe_engine_class_instance *eci,
+	     unsigned int flags)
+{
+	uint32_t vm[1];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo;
+	void *copy_src, *copy_dst;
+	uint64_t batch_addr;
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Checking if GPU support page faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+
+	/* Allocate source and destination buffers */
+	copy_src = aligned_alloc(xe_get_default_alignment(gpu1->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+	igt_assert(copy_src);
+	copy_dst = aligned_alloc(xe_get_default_alignment(gpu2->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+	igt_assert(copy_dst);
+
+	batch_init(gpu1->fd, vm[0], to_user_pointer(copy_src),

to_user_pointer(copy_dst),

tests/intel/xe_multi_gpusvm.c new file +7 -0
+		   COPY_SIZE, &batch_bo, &batch_addr);
+
+	/* Fill the source with a pattern, clear the destination. */
+	memset(copy_src, 0x67, COPY_SIZE);
+	memset(copy_dst, 0x0, COPY_SIZE);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], to_user_pointer(copy_dst),

COPY_SIZE,

tests/intel/xe_multi_gpusvm.c new file +2 -0
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], to_user_pointer(copy_dst),

COPY_SIZE, &sync,

tests/intel/xe_multi_gpusvm.c new file +12 -0
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* Execute a GPU copy. */
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr, &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c new file +29 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert(memcmp(copy_src, copy_dst, COPY_SIZE) == 0);
+
+	free(copy_dst);
+	free(copy_src);
+	munmap((void *)batch_addr, BATCH_SIZE(gpu1->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo, batch_addr);
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]); }
+
+static void
+gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	copy_src_dst(src, dst, eci, flags);
+}
+
+static void
+test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
+	       struct drm_xe_engine_class_instance *eci,
+	       unsigned int flags)
+{
+	if (flags & MULTIGPU_XGPU_ACCESS)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper, flags);

tests/intel/xe_multi_gpusvm.c new file +19 -0
+}
+
+struct section {
+	const char *name;
+	unsigned int flags;
+};
+
+igt_main
+{
+	struct xe_svm_gpu_info gpus[MAX_XE_GPUS];
+	struct xe_device *xe;
+	int gpu, gpu_cnt;
+
+	struct drm_xe_engine_class_instance eci = {
+		.engine_class = DRM_XE_ENGINE_CLASS_COPY,
+	};
+
+	const struct section msections[] = {
+		{ "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c new file +1 -0
+		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c new file +13 -0
+		{ NULL },
+	};
+
+	igt_fixture {
+		gpu_cnt = get_device_info(gpus, ARRAY_SIZE(gpus));
+		igt_skip_on(gpu_cnt < 2);
+
+		for (gpu = 0; gpu < gpu_cnt; ++gpu) {
+			igt_assert(gpu < MAX_XE_GPUS);
+
+			open_pagemaps(gpus[gpu].fd, &gpus[gpu]);
+			/* NOTE! inverted return value. */
+			gpus[gpu].supports_faults =

!xe_supports_faults(gpus[gpu].fd);

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			fprintf(stderr, "GPU %u has %u VRAM regions%s,

and %s SVM VMs.\n",

tests/intel/xe_multi_gpusvm.c new file +3 -0
+				gpu, gpus[gpu].num_regions,
+				gpus[gpu].num_regions != 1 ? "s" : "",
+				gpus[gpu].supports_faults ? "supports" :

"doesn't support");

tests/intel/xe_multi_gpusvm.c new file +19 -0
+
+			xe = xe_device_get(gpus[gpu].fd);
+			gpus[gpu].va_bits = xe->va_bits;
+		}
+	}
+
+	igt_describe("gpu-gpu write-read");
+	for (const struct section *s = msections; s->name; s++) {
+		igt_subtest_f("mgpu-%s", s->name)
+			test_mgpu_exec(gpu_cnt, gpus, &eci, s->flags);
+	}
+
+	igt_fixture {
+		int cnt;
+
+		for (cnt = 0; cnt < gpu_cnt; cnt++)
+			drm_close_driver(gpus[cnt].fd);
+	}
+}
tests/meson.build index renamed from tests/meson.build +0 -0

9736f2338..1209f84a4 100644

tests/meson.build +1 -1
@@ -313,6 +313,7 @@ intel_xe_progs = [
 	'xe_media_fill',
 	'xe_mmap',
 	'xe_module_load',
+        'xe_multi_gpusvm',
 	'xe_noexec_ping_pong',
 	'xe_oa',
 	'xe_pat',
--

2.48.1

#9 lore raw

RE: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

Using this flag for all subtests which are non-prefetch subtests. It was introduced in this patch and used in all other subtests

Nishit

-----Original Message-----
From: Gurram, Pravalika <[email protected]>
Sent: Wednesday, November 26, 2025 11:32 AM
To: Sharma, Nishit <[email protected]>; [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

Quoted 75 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of [email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, writes data to it from src GPU, and reads/verifies the data from dst GPU. Optionally, the CPU also reads or modifies the buffer and both GPUs verify the results, ensuring correct cross- GPU and CPU memory access in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 395
++++++++++++++++++++++++++++++++++
 tests/meson.build             |   1 +
 2 files changed, 396 insertions(+)
 create mode 100644 tests/intel/xe_multi_gpusvm.c
(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c new file mode 100644 index 000000000..471be6449

tests/intel/xe_multi_gpusvm.c new file +33 -0
@@ -0,0 +1,395 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation  */
+
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_multigpu.h"
+
+#include "intel_blt.h"
+#include "intel_mocs.h"
+#include "intel_reg.h"
+
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+#include "xe/xe_util.h"
+
+/**
+ * TEST: Basic multi-gpu SVM testing
+ * Category: SVM
+ * Mega feature: Compute
+ * Sub-category: Compute tests
+ * Functionality: SVM p2p access, madvise and prefetch.
+ * Test category: functionality test
+ *
+ * SUBTEST: mgpu-xgpu-access-basic
+ * Description:
+ *	Test basic cross-GPU memory access in multi-GPU SVM configuration
+ *
+ * SUBTEST: mgpu-xgpu-access-prefetch
+ * Description:
+ *	Test cross-GPU memory access with prefetch in multi-GPU SVM

configuration
+ *
+ */

tests/intel/xe_multi_gpusvm.c new file +6 -0
+
+#define MAX_XE_REGIONS	8
+#define MAX_XE_GPUS 8
+#define NUM_LOOPS 1
+#define BATCH_SIZE(_fd) ALIGN(SZ_8K, xe_get_default_alignment(_fd)) 
+#define BIND_SYNC_VAL 0x686868 #define EXEC_SYNC_VAL 0x676767

#define

tests/intel/xe_multi_gpusvm.c line 46

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c new file +3 -0
+COPY_SIZE SZ_64M
+
+#define MULTIGPU_BASIC			BIT(0)

We are not using this flag anywhere in code. Why are we maintaining this -Pravalika

Quoted 394 lines
tests/intel/xe_multi_gpusvm.c new file +31 -0
+#define MULTIGPU_PREFETCH		BIT(1)
+#define MULTIGPU_XGPU_ACCESS		BIT(2)
+
+struct xe_svm_gpu_info {
+	bool supports_faults;
+	int vram_regions[MAX_XE_REGIONS];
+	unsigned int num_regions;
+	unsigned int va_bits;
+	int fd;
+};
+
+typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info *src,
+			    struct xe_svm_gpu_info *dst,
+			    struct drm_xe_engine_class_instance *eci,
+			    unsigned int flags);
+
+static void for_each_gpu_pair(int num_gpus,
+			      struct xe_svm_gpu_info *gpus,
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn,
+			      unsigned int flags);
+
+static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c new file +3 -0
+		    uint32_t *vm, uint32_t *exec_queue) {
+	*vm = xe_vm_create(gpu->fd,
+			   DRM_XE_VM_CREATE_FLAG_LR_MODE |

DRM_XE_VM_CREATE_FLAG_FAULT_MODE, 0);

tests/intel/xe_multi_gpusvm.c new file +19 -0
+	*exec_queue = xe_exec_queue_create(gpu->fd, *vm, eci, 0);
+	xe_vm_bind_lr_sync(gpu->fd, *vm, 0, 0, 0, 1ull << gpu->va_bits,
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+}
+
+static void
+setup_sync(struct drm_xe_sync *sync, volatile uint64_t **sync_addr, 
+uint64_t timeline_value) {
+	*sync_addr = malloc(sizeof(**sync_addr));
+	igt_assert(*sync_addr);
+	sync->flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync->type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	sync->addr = to_user_pointer((uint64_t *)*sync_addr);
+	sync->timeline_value = timeline_value;
+	**sync_addr = 0;
+}
+
+static void
+cleanup_vm_and_queue(struct xe_svm_gpu_info *gpu, uint32_t vm,

uint32_t

tests/intel/xe_multi_gpusvm.c new file +8 -0
+exec_queue) {
+	xe_vm_unbind_lr_sync(gpu->fd, vm, 0, 0, 1ull << gpu->va_bits);
+	xe_exec_queue_destroy(gpu->fd, exec_queue);
+	xe_vm_destroy(gpu->fd, vm);
+}
+
+static void xe_multigpu_madvise(int src_fd, uint32_t vm, uint64_t 
+addr,

uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				uint64_t ext, uint32_t type, int dst_fd,

uint16_t policy,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+				uint32_t instance, uint32_t exec_queue) {
+	int ret;
+
+	if (src_fd != dst_fd) {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type,

dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (ret == -ENOLINK) {
+			igt_info("No fast interconnect between GPU0 and

GPU1, falling back to local VRAM\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			ret = xe_vm_madvise(src_fd, vm, addr, size, ext,

type,
+
DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE,

tests/intel/xe_multi_gpusvm.c new file +3 -0
+					    policy, 0);
+			if (ret) {
+				igt_info("Local VRAM madvise failed, falling

back to system memory\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				ret = xe_vm_madvise(src_fd, vm, addr, size,

ext, type,
+
DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, policy,

tests/intel/xe_multi_gpusvm.c new file +8 -0
+						    0);
+				igt_assert_eq(ret, 0);
+			}
+		} else {
+			igt_assert_eq(ret, 0);
+		}
+	} else {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type,

dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +6 -0
+		igt_assert_eq(ret, 0);
+	}
+}
+
+static void xe_multigpu_prefetch(int src_fd, uint32_t vm, uint64_t 
+addr,

uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				 struct drm_xe_sync *sync, volatile uint64_t

*sync_addr,

tests/intel/xe_multi_gpusvm.c new file +4 -0
+				 uint32_t exec_queue, unsigned int flags) {
+	if (flags & MULTIGPU_PREFETCH) {
+		xe_vm_prefetch_async(src_fd, vm, 0, 0, addr, size, sync, 1,
+

DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (*sync_addr != sync->timeline_value)
+			xe_wait_ufence(src_fd, (uint64_t *)sync_addr, sync-
Quoted 1 line

timeline_value,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+				       exec_queue, NSEC_PER_SEC * 10);
+	}
+}
+
+static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info

*gpus,

tests/intel/xe_multi_gpusvm.c new file +28 -0
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn, unsigned int flags) {
+	for (int src = 0; src < num_gpus; src++) {
+		if (!gpus[src].supports_faults)
+			continue;
+
+		for (int dst = 0; dst < num_gpus; dst++) {
+			if (src == dst)
+				continue;
+			fn(&gpus[src], &gpus[dst], eci, flags);
+		}
+	}
+}
+
+static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		       uint64_t dst_addr, uint64_t copy_size,
+		       uint32_t *bo, uint64_t *addr) {
+	uint32_t width = copy_size / 256;
+	uint32_t height = 1;
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	uint32_t mocs_index = intel_get_uc_mocs_index(fd);
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c new file +12 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+	cmd[i++] = MEM_COPY_CMD | (1 << 19);
+	cmd[i++] = width - 1;
+	cmd[i++] = height - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = src_addr & ((1UL << 32) - 1);
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = dst_addr & ((1UL << 32) - 1);
+	cmd[i++] = dst_addr >> 32;
+	cmd[i++] = mocs_index << XE2_MEM_COPY_MOCS_SHIFT |

mocs_index;

tests/intel/xe_multi_gpusvm.c new file +6 -0
+	cmd[i++] = MI_BATCH_BUFFER_END;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c new file +23 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
+static void batch_fini(int fd, uint32_t vm, uint32_t bo, uint64_t 
+addr) {
+	/* Unmap the batch bo by re-instating the SVM binding. */
+	xe_vm_bind_lr_sync(fd, vm, 0, 0, addr, BATCH_SIZE(fd),
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+	gem_close(fd, bo);
+}
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info) {
+	unsigned int count = 0;
+	uint64_t regions = all_memory_regions(fd);
+	uint32_t region;
+
+	xe_for_each_mem_region(fd, regions, region) {
+		if (XE_IS_VRAM_MEMORY_REGION(fd, region)) {
+			struct drm_xe_mem_region *mem_region =
+				xe_mem_region(fd, 1ull << (region - 1));
+			igt_assert(count < MAX_XE_REGIONS);
+			info->vram_regions[count++] = mem_region-
Quoted 1 line

instance;

tests/intel/xe_multi_gpusvm.c new file +32 -0
+		}
+	}
+
+	info->num_regions = count;
+}
+
+static int get_device_info(struct xe_svm_gpu_info gpus[], int 
+num_gpus) {
+	int cnt;
+	int xe;
+	int i;
+
+	for (i = 0, cnt = 0 && i < 128; cnt < num_gpus; i++) {
+		xe = __drm_open_driver_another(i, DRIVER_XE);
+		if (xe < 0)
+			break;
+
+		gpus[cnt].fd = xe;
+		cnt++;
+	}
+
+	return cnt;
+}
+
+static int
+mgpu_check_fault_support(struct xe_svm_gpu_info *gpu1,
+			 struct xe_svm_gpu_info *gpu2)
+{
+	int ret = 0;
+
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("GPU does not support page faults, skipping

execution\n");

tests/intel/xe_multi_gpusvm.c new file +27 -0
+		ret = 1;
+	}
+	return ret;
+}
+
+static void
+copy_src_dst(struct xe_svm_gpu_info *gpu1,
+	     struct xe_svm_gpu_info *gpu2,
+	     struct drm_xe_engine_class_instance *eci,
+	     unsigned int flags)
+{
+	uint32_t vm[1];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo;
+	void *copy_src, *copy_dst;
+	uint64_t batch_addr;
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Checking if GPU support page faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+
+	/* Allocate source and destination buffers */
+	copy_src = aligned_alloc(xe_get_default_alignment(gpu1->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+	igt_assert(copy_src);
+	copy_dst = aligned_alloc(xe_get_default_alignment(gpu2->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+	igt_assert(copy_dst);
+
+	batch_init(gpu1->fd, vm[0], to_user_pointer(copy_src),

to_user_pointer(copy_dst),

tests/intel/xe_multi_gpusvm.c new file +7 -0
+		   COPY_SIZE, &batch_bo, &batch_addr);
+
+	/* Fill the source with a pattern, clear the destination. */
+	memset(copy_src, 0x67, COPY_SIZE);
+	memset(copy_dst, 0x0, COPY_SIZE);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], to_user_pointer(copy_dst),

COPY_SIZE,

tests/intel/xe_multi_gpusvm.c new file +2 -0
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], to_user_pointer(copy_dst),

COPY_SIZE, &sync,

tests/intel/xe_multi_gpusvm.c new file +12 -0
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* Execute a GPU copy. */
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr, &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c new file +29 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert(memcmp(copy_src, copy_dst, COPY_SIZE) == 0);
+
+	free(copy_dst);
+	free(copy_src);
+	munmap((void *)batch_addr, BATCH_SIZE(gpu1->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo, batch_addr);
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]); }
+
+static void
+gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	copy_src_dst(src, dst, eci, flags);
+}
+
+static void
+test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
+	       struct drm_xe_engine_class_instance *eci,
+	       unsigned int flags)
+{
+	if (flags & MULTIGPU_XGPU_ACCESS)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper, flags);

tests/intel/xe_multi_gpusvm.c new file +19 -0
+}
+
+struct section {
+	const char *name;
+	unsigned int flags;
+};
+
+igt_main
+{
+	struct xe_svm_gpu_info gpus[MAX_XE_GPUS];
+	struct xe_device *xe;
+	int gpu, gpu_cnt;
+
+	struct drm_xe_engine_class_instance eci = {
+		.engine_class = DRM_XE_ENGINE_CLASS_COPY,
+	};
+
+	const struct section msections[] = {
+		{ "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c new file +1 -0
+		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c new file +13 -0
+		{ NULL },
+	};
+
+	igt_fixture {
+		gpu_cnt = get_device_info(gpus, ARRAY_SIZE(gpus));
+		igt_skip_on(gpu_cnt < 2);
+
+		for (gpu = 0; gpu < gpu_cnt; ++gpu) {
+			igt_assert(gpu < MAX_XE_GPUS);
+
+			open_pagemaps(gpus[gpu].fd, &gpus[gpu]);
+			/* NOTE! inverted return value. */
+			gpus[gpu].supports_faults =

!xe_supports_faults(gpus[gpu].fd);

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			fprintf(stderr, "GPU %u has %u VRAM regions%s,

and %s SVM VMs.\n",

tests/intel/xe_multi_gpusvm.c new file +3 -0
+				gpu, gpus[gpu].num_regions,
+				gpus[gpu].num_regions != 1 ? "s" : "",
+				gpus[gpu].supports_faults ? "supports" :

"doesn't support");

tests/intel/xe_multi_gpusvm.c new file +19 -0
+
+			xe = xe_device_get(gpus[gpu].fd);
+			gpus[gpu].va_bits = xe->va_bits;
+		}
+	}
+
+	igt_describe("gpu-gpu write-read");
+	for (const struct section *s = msections; s->name; s++) {
+		igt_subtest_f("mgpu-%s", s->name)
+			test_mgpu_exec(gpu_cnt, gpus, &eci, s->flags);
+	}
+
+	igt_fixture {
+		int cnt;
+
+		for (cnt = 0; cnt < gpu_cnt; cnt++)
+			drm_close_driver(gpus[cnt].fd);
+	}
+}
tests/meson.build index renamed from tests/meson.build +0 -0

9736f2338..1209f84a4 100644

tests/meson.build +1 -1
@@ -313,6 +313,7 @@ intel_xe_progs = [
 	'xe_media_fill',
 	'xe_mmap',
 	'xe_module_load',
+        'xe_multi_gpusvm',
 	'xe_noexec_ping_pong',
 	'xe_oa',
 	'xe_pat',
--

2.48.1

#10 lore raw

RE: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

Quoted 11 lines

-----Original Message-----
From: Sharma, Nishit <[email protected]>
Sent: Wednesday, November 26, 2025 11:35 AM
To: Gurram, Pravalika <[email protected]>; igt- [email protected]; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

Quoted 5 lines

Using this flag for all subtests which are non-prefetch subtests. It was introduced in this patch and used in all other subtests

Nishit

It will be good where ever your using introduce there itself. why to maintain unused flag

--Pravalika

Quoted 486 lines

-----Original Message-----
From: Gurram, Pravalika <[email protected]>
Sent: Wednesday, November 26, 2025 11:32 AM
To: Sharma, Nishit <[email protected]>; igt- [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

Quoted 10 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of [email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

Quoted 6 lines

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, writes data to it from src GPU, and reads/verifies the data from dst GPU. Optionally, the CPU also reads or modifies the buffer and both GPUs verify the results, ensuring correct cross- GPU and CPU memory access in a multi-GPU

environment.

Quoted 59 lines
---
 tests/intel/xe_multi_gpusvm.c | 395
++++++++++++++++++++++++++++++++++
 tests/meson.build             |   1 +
 2 files changed, 396 insertions(+)
 create mode 100644 tests/intel/xe_multi_gpusvm.c
(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c new file mode 100644 index 000000000..471be6449

tests/intel/xe_multi_gpusvm.c new file +33 -0
@@ -0,0 +1,395 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation  */
+
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_multigpu.h"
+
+#include "intel_blt.h"
+#include "intel_mocs.h"
+#include "intel_reg.h"
+
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+#include "xe/xe_util.h"
+
+/**
+ * TEST: Basic multi-gpu SVM testing
+ * Category: SVM
+ * Mega feature: Compute
+ * Sub-category: Compute tests
+ * Functionality: SVM p2p access, madvise and prefetch.
+ * Test category: functionality test
+ *
+ * SUBTEST: mgpu-xgpu-access-basic
+ * Description:
+ *	Test basic cross-GPU memory access in multi-GPU SVM configuration
+ *
+ * SUBTEST: mgpu-xgpu-access-prefetch
+ * Description:
+ *	Test cross-GPU memory access with prefetch in multi-GPU SVM

configuration
+ *
+ */

tests/intel/xe_multi_gpusvm.c new file +6 -0
+
+#define MAX_XE_REGIONS	8
+#define MAX_XE_GPUS 8
+#define NUM_LOOPS 1
+#define BATCH_SIZE(_fd) ALIGN(SZ_8K, xe_get_default_alignment(_fd))
+#define BIND_SYNC_VAL 0x686868 #define EXEC_SYNC_VAL 0x676767

#define

tests/intel/xe_multi_gpusvm.c line 46

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c new file +3 -0
+COPY_SIZE SZ_64M
+
+#define MULTIGPU_BASIC			BIT(0)

We are not using this flag anywhere in code. Why are we maintaining this - Pravalika

Quoted 394 lines
tests/intel/xe_multi_gpusvm.c new file +31 -0
+#define MULTIGPU_PREFETCH		BIT(1)
+#define MULTIGPU_XGPU_ACCESS		BIT(2)
+
+struct xe_svm_gpu_info {
+	bool supports_faults;
+	int vram_regions[MAX_XE_REGIONS];
+	unsigned int num_regions;
+	unsigned int va_bits;
+	int fd;
+};
+
+typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info *src,
+			    struct xe_svm_gpu_info *dst,
+			    struct drm_xe_engine_class_instance *eci,
+			    unsigned int flags);
+
+static void for_each_gpu_pair(int num_gpus,
+			      struct xe_svm_gpu_info *gpus,
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn,
+			      unsigned int flags);
+
+static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c new file +3 -0
+		    uint32_t *vm, uint32_t *exec_queue) {
+	*vm = xe_vm_create(gpu->fd,
+			   DRM_XE_VM_CREATE_FLAG_LR_MODE |

DRM_XE_VM_CREATE_FLAG_FAULT_MODE, 0);

tests/intel/xe_multi_gpusvm.c new file +19 -0
+	*exec_queue = xe_exec_queue_create(gpu->fd, *vm, eci, 0);
+	xe_vm_bind_lr_sync(gpu->fd, *vm, 0, 0, 0, 1ull << gpu->va_bits,
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+}
+
+static void
+setup_sync(struct drm_xe_sync *sync, volatile uint64_t **sync_addr,
+uint64_t timeline_value) {
+	*sync_addr = malloc(sizeof(**sync_addr));
+	igt_assert(*sync_addr);
+	sync->flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync->type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	sync->addr = to_user_pointer((uint64_t *)*sync_addr);
+	sync->timeline_value = timeline_value;
+	**sync_addr = 0;
+}
+
+static void
+cleanup_vm_and_queue(struct xe_svm_gpu_info *gpu, uint32_t vm,

uint32_t

tests/intel/xe_multi_gpusvm.c new file +8 -0
+exec_queue) {
+	xe_vm_unbind_lr_sync(gpu->fd, vm, 0, 0, 1ull << gpu->va_bits);
+	xe_exec_queue_destroy(gpu->fd, exec_queue);
+	xe_vm_destroy(gpu->fd, vm);
+}
+
+static void xe_multigpu_madvise(int src_fd, uint32_t vm, uint64_t
+addr,

uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				uint64_t ext, uint32_t type, int dst_fd,

uint16_t policy,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+				uint32_t instance, uint32_t exec_queue) {
+	int ret;
+
+	if (src_fd != dst_fd) {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type,

dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (ret == -ENOLINK) {
+			igt_info("No fast interconnect between GPU0 and

GPU1, falling back to local VRAM\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			ret = xe_vm_madvise(src_fd, vm, addr, size, ext,

type,
+
DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE,

tests/intel/xe_multi_gpusvm.c new file +3 -0
+					    policy, 0);
+			if (ret) {
+				igt_info("Local VRAM madvise failed, falling

back to system memory\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				ret = xe_vm_madvise(src_fd, vm, addr, size,

ext, type,
+
DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, policy,

tests/intel/xe_multi_gpusvm.c new file +8 -0
+						    0);
+				igt_assert_eq(ret, 0);
+			}
+		} else {
+			igt_assert_eq(ret, 0);
+		}
+	} else {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext, type,

dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +6 -0
+		igt_assert_eq(ret, 0);
+	}
+}
+
+static void xe_multigpu_prefetch(int src_fd, uint32_t vm, uint64_t
+addr,

uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				 struct drm_xe_sync *sync, volatile uint64_t

*sync_addr,

tests/intel/xe_multi_gpusvm.c new file +4 -0
+				 uint32_t exec_queue, unsigned int flags) {
+	if (flags & MULTIGPU_PREFETCH) {
+		xe_vm_prefetch_async(src_fd, vm, 0, 0, addr, size, sync, 1,
+

DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (*sync_addr != sync->timeline_value)
+			xe_wait_ufence(src_fd, (uint64_t *)sync_addr, sync-
Quoted 1 line

timeline_value,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+				       exec_queue, NSEC_PER_SEC * 10);
+	}
+}
+
+static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info

*gpus,

tests/intel/xe_multi_gpusvm.c new file +28 -0
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn, unsigned int flags) {
+	for (int src = 0; src < num_gpus; src++) {
+		if (!gpus[src].supports_faults)
+			continue;
+
+		for (int dst = 0; dst < num_gpus; dst++) {
+			if (src == dst)
+				continue;
+			fn(&gpus[src], &gpus[dst], eci, flags);
+		}
+	}
+}
+
+static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		       uint64_t dst_addr, uint64_t copy_size,
+		       uint32_t *bo, uint64_t *addr) {
+	uint32_t width = copy_size / 256;
+	uint32_t height = 1;
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	uint32_t mocs_index = intel_get_uc_mocs_index(fd);
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c new file +12 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+	cmd[i++] = MEM_COPY_CMD | (1 << 19);
+	cmd[i++] = width - 1;
+	cmd[i++] = height - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = src_addr & ((1UL << 32) - 1);
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = dst_addr & ((1UL << 32) - 1);
+	cmd[i++] = dst_addr >> 32;
+	cmd[i++] = mocs_index << XE2_MEM_COPY_MOCS_SHIFT |

mocs_index;

tests/intel/xe_multi_gpusvm.c new file +6 -0
+	cmd[i++] = MI_BATCH_BUFFER_END;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c new file +23 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
+static void batch_fini(int fd, uint32_t vm, uint32_t bo, uint64_t
+addr) {
+	/* Unmap the batch bo by re-instating the SVM binding. */
+	xe_vm_bind_lr_sync(fd, vm, 0, 0, addr, BATCH_SIZE(fd),
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+	gem_close(fd, bo);
+}
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info) {
+	unsigned int count = 0;
+	uint64_t regions = all_memory_regions(fd);
+	uint32_t region;
+
+	xe_for_each_mem_region(fd, regions, region) {
+		if (XE_IS_VRAM_MEMORY_REGION(fd, region)) {
+			struct drm_xe_mem_region *mem_region =
+				xe_mem_region(fd, 1ull << (region - 1));
+			igt_assert(count < MAX_XE_REGIONS);
+			info->vram_regions[count++] = mem_region-
Quoted 1 line

instance;

tests/intel/xe_multi_gpusvm.c new file +32 -0
+		}
+	}
+
+	info->num_regions = count;
+}
+
+static int get_device_info(struct xe_svm_gpu_info gpus[], int
+num_gpus) {
+	int cnt;
+	int xe;
+	int i;
+
+	for (i = 0, cnt = 0 && i < 128; cnt < num_gpus; i++) {
+		xe = __drm_open_driver_another(i, DRIVER_XE);
+		if (xe < 0)
+			break;
+
+		gpus[cnt].fd = xe;
+		cnt++;
+	}
+
+	return cnt;
+}
+
+static int
+mgpu_check_fault_support(struct xe_svm_gpu_info *gpu1,
+			 struct xe_svm_gpu_info *gpu2)
+{
+	int ret = 0;
+
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("GPU does not support page faults, skipping

execution\n");

tests/intel/xe_multi_gpusvm.c new file +27 -0
+		ret = 1;
+	}
+	return ret;
+}
+
+static void
+copy_src_dst(struct xe_svm_gpu_info *gpu1,
+	     struct xe_svm_gpu_info *gpu2,
+	     struct drm_xe_engine_class_instance *eci,
+	     unsigned int flags)
+{
+	uint32_t vm[1];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo;
+	void *copy_src, *copy_dst;
+	uint64_t batch_addr;
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Checking if GPU support page faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+
+	/* Allocate source and destination buffers */
+	copy_src = aligned_alloc(xe_get_default_alignment(gpu1->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+	igt_assert(copy_src);
+	copy_dst = aligned_alloc(xe_get_default_alignment(gpu2->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+	igt_assert(copy_dst);
+
+	batch_init(gpu1->fd, vm[0], to_user_pointer(copy_src),

to_user_pointer(copy_dst),

tests/intel/xe_multi_gpusvm.c new file +7 -0
+		   COPY_SIZE, &batch_bo, &batch_addr);
+
+	/* Fill the source with a pattern, clear the destination. */
+	memset(copy_src, 0x67, COPY_SIZE);
+	memset(copy_dst, 0x0, COPY_SIZE);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], to_user_pointer(copy_dst),

COPY_SIZE,

tests/intel/xe_multi_gpusvm.c new file +2 -0
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], to_user_pointer(copy_dst),

COPY_SIZE, &sync,

tests/intel/xe_multi_gpusvm.c new file +12 -0
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* Execute a GPU copy. */
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr, &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c new file +29 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert(memcmp(copy_src, copy_dst, COPY_SIZE) == 0);
+
+	free(copy_dst);
+	free(copy_src);
+	munmap((void *)batch_addr, BATCH_SIZE(gpu1->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo, batch_addr);
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]); }
+
+static void
+gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	copy_src_dst(src, dst, eci, flags);
+}
+
+static void
+test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
+	       struct drm_xe_engine_class_instance *eci,
+	       unsigned int flags)
+{
+	if (flags & MULTIGPU_XGPU_ACCESS)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper, flags);

tests/intel/xe_multi_gpusvm.c new file +19 -0
+}
+
+struct section {
+	const char *name;
+	unsigned int flags;
+};
+
+igt_main
+{
+	struct xe_svm_gpu_info gpus[MAX_XE_GPUS];
+	struct xe_device *xe;
+	int gpu, gpu_cnt;
+
+	struct drm_xe_engine_class_instance eci = {
+		.engine_class = DRM_XE_ENGINE_CLASS_COPY,
+	};
+
+	const struct section msections[] = {
+		{ "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c new file +1 -0
+		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c new file +13 -0
+		{ NULL },
+	};
+
+	igt_fixture {
+		gpu_cnt = get_device_info(gpus, ARRAY_SIZE(gpus));
+		igt_skip_on(gpu_cnt < 2);
+
+		for (gpu = 0; gpu < gpu_cnt; ++gpu) {
+			igt_assert(gpu < MAX_XE_GPUS);
+
+			open_pagemaps(gpus[gpu].fd, &gpus[gpu]);
+			/* NOTE! inverted return value. */
+			gpus[gpu].supports_faults =

!xe_supports_faults(gpus[gpu].fd);

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			fprintf(stderr, "GPU %u has %u VRAM regions%s,

and %s SVM VMs.\n",

tests/intel/xe_multi_gpusvm.c new file +3 -0
+				gpu, gpus[gpu].num_regions,
+				gpus[gpu].num_regions != 1 ? "s" : "",
+				gpus[gpu].supports_faults ? "supports" :

"doesn't support");

tests/intel/xe_multi_gpusvm.c new file +19 -0
+
+			xe = xe_device_get(gpus[gpu].fd);
+			gpus[gpu].va_bits = xe->va_bits;
+		}
+	}
+
+	igt_describe("gpu-gpu write-read");
+	for (const struct section *s = msections; s->name; s++) {
+		igt_subtest_f("mgpu-%s", s->name)
+			test_mgpu_exec(gpu_cnt, gpus, &eci, s->flags);
+	}
+
+	igt_fixture {
+		int cnt;
+
+		for (cnt = 0; cnt < gpu_cnt; cnt++)
+			drm_close_driver(gpus[cnt].fd);
+	}
+}
tests/meson.build index renamed from tests/meson.build +0 -0

9736f2338..1209f84a4 100644

tests/meson.build +1 -1
@@ -313,6 +313,7 @@ intel_xe_progs = [
 	'xe_media_fill',
 	'xe_mmap',
 	'xe_module_load',
+        'xe_multi_gpusvm',
 	'xe_noexec_ping_pong',
 	'xe_oa',
 	'xe_pat',
--

2.48.1

#11 lore raw

Re: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

In reply to [email protected]
Quoted 324 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, writes data to it from src GPU, and reads/verifies the data from dst GPU. Optionally, the CPU also reads or modifies the buffer and both GPUs verify the results, ensuring correct cross-GPU and CPU memory access in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 395
++++++++++++++++++++++++++++++++++
 tests/meson.build             |   1 +

 2 files changed, 396 insertions(+)

 create mode 100644 tests/intel/xe_multi_gpusvm.c

tests/intel/xe_multi_gpusvm.c new file +30 -0
new file mode 100644
index 000000000..471be6449
@@ -0,0 +1,395 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_multigpu.h"
+
+#include "intel_blt.h"
+#include "intel_mocs.h"
+#include "intel_reg.h"
+
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+#include "xe/xe_util.h"
+
+/**
+ * TEST: Basic multi-gpu SVM testing
+ * Category: SVM
+ * Mega feature: Compute
+ * Sub-category: Compute tests
+ * Functionality: SVM p2p access, madvise and prefetch.
+ * Test category: functionality test
+ *
+ * SUBTEST: mgpu-xgpu-access-basic
+ * Description:
+ *	Test basic cross-GPU memory access in multi-GPU SVM

configuration
+ *
+ * SUBTEST: mgpu-xgpu-access-prefetch
+ * Description:
+ * Test cross-GPU memory access with prefetch in multi-GPU SVM
configuration
+ *
+ */

tests/intel/xe_multi_gpusvm.c new file +24 -0
+
+#define MAX_XE_REGIONS	8
+#define MAX_XE_GPUS 8
+#define NUM_LOOPS 1
+#define BATCH_SIZE(_fd) ALIGN(SZ_8K, xe_get_default_alignment(_fd))
+#define BIND_SYNC_VAL 0x686868
+#define EXEC_SYNC_VAL 0x676767
+#define COPY_SIZE SZ_64M
+
+#define MULTIGPU_BASIC			BIT(0)
+#define MULTIGPU_PREFETCH		BIT(1)
+#define MULTIGPU_XGPU_ACCESS		BIT(2)
+
+struct xe_svm_gpu_info {
+	bool supports_faults;
+	int vram_regions[MAX_XE_REGIONS];
+	unsigned int num_regions;
+	unsigned int va_bits;
+	int fd;
+};
+
+typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info *src,
+			    struct xe_svm_gpu_info *dst,
+			    struct drm_xe_engine_class_instance

*eci,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+			    unsigned int flags);
+
+static void for_each_gpu_pair(int num_gpus,
+			      struct xe_svm_gpu_info *gpus,
+			      struct drm_xe_engine_class_instance

*eci,

tests/intel/xe_multi_gpusvm.c new file +6 -0
+			      gpu_pair_fn fn,
+			      unsigned int flags);
+
+static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c new file +6 -0
+				   unsigned int flags);
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c new file +4 -0
+		    uint32_t *vm, uint32_t *exec_queue)
+{
+	*vm = xe_vm_create(gpu->fd,
+			   DRM_XE_VM_CREATE_FLAG_LR_MODE |

DRM_XE_VM_CREATE_FLAG_FAULT_MODE, 0);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+	*exec_queue = xe_exec_queue_create(gpu->fd, *vm, eci, 0);
+	xe_vm_bind_lr_sync(gpu->fd, *vm, 0, 0, 0, 1ull << gpu-
Quoted 1 line

va_bits,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+}
+
+static void
+setup_sync(struct drm_xe_sync *sync, volatile uint64_t **sync_addr,

uint64_t timeline_value)

tests/intel/xe_multi_gpusvm.c new file +12 -0
+{
+	*sync_addr = malloc(sizeof(**sync_addr));
+	igt_assert(*sync_addr);
+	sync->flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync->type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	sync->addr = to_user_pointer((uint64_t *)*sync_addr);
+	sync->timeline_value = timeline_value;
+	**sync_addr = 0;
+}
+
+static void
+cleanup_vm_and_queue(struct xe_svm_gpu_info *gpu, uint32_t vm,

uint32_t exec_queue)

tests/intel/xe_multi_gpusvm.c new file +2 -0
+{
+	xe_vm_unbind_lr_sync(gpu->fd, vm, 0, 0, 1ull << gpu-
Quoted 1 line

va_bits);

tests/intel/xe_multi_gpusvm.c new file +5 -0
+	xe_exec_queue_destroy(gpu->fd, exec_queue);
+	xe_vm_destroy(gpu->fd, vm);
+}
+
+static void xe_multigpu_madvise(int src_fd, uint32_t vm, uint64_t

addr, uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				uint64_t ext, uint32_t type, int

dst_fd, uint16_t policy,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				uint32_t instance, uint32_t

exec_queue)

tests/intel/xe_multi_gpusvm.c new file +5 -0
+{
+	int ret;
+
+	if (src_fd != dst_fd) {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext,

type, dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (ret == -ENOLINK) {
+			igt_info("No fast interconnect between GPU0

and GPU1, falling back to local VRAM\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			ret = xe_vm_madvise(src_fd, vm, addr, size,

ext, type,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+					   

DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE,

tests/intel/xe_multi_gpusvm.c new file +3 -0
+					    policy, 0);
+			if (ret) {
+				igt_info("Local VRAM madvise failed,

falling back to system memory\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				ret = xe_vm_madvise(src_fd, vm,

addr, size, ext, type,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+						   

DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, policy,

tests/intel/xe_multi_gpusvm.c new file +8 -0
+						    0);
+				igt_assert_eq(ret, 0);
+			}
+		} else {
+			igt_assert_eq(ret, 0);
+		}
+	} else {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext,

type, dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +5 -0
+		igt_assert_eq(ret, 0);
+	}
+}
+
+static void xe_multigpu_prefetch(int src_fd, uint32_t vm, uint64_t

addr, uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				 struct drm_xe_sync *sync, volatile

uint64_t *sync_addr,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				 uint32_t exec_queue, unsigned int

flags)

tests/intel/xe_multi_gpusvm.c new file +3 -0
+{
+	if (flags & MULTIGPU_PREFETCH) {
+		xe_vm_prefetch_async(src_fd, vm, 0, 0, addr, size,

sync, 1,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				    

DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (*sync_addr != sync->timeline_value)
+			xe_wait_ufence(src_fd, (uint64_t

*)sync_addr, sync->timeline_value,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				       exec_queue, NSEC_PER_SEC *

10);

tests/intel/xe_multi_gpusvm.c new file +4 -0
+	}
+}
+
+static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info

*gpus,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			      struct drm_xe_engine_class_instance

*eci,

tests/intel/xe_multi_gpusvm.c new file +29 -0
+			      gpu_pair_fn fn, unsigned int flags)
+{
+	for (int src = 0; src < num_gpus; src++) {
+		if (!gpus[src].supports_faults)
+			continue;
+
+		for (int dst = 0; dst < num_gpus; dst++) {
+			if (src == dst)
+				continue;
+			fn(&gpus[src], &gpus[dst], eci, flags);
+		}
+	}
+}
+
+static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		       uint64_t dst_addr, uint64_t copy_size,
+		       uint32_t *bo, uint64_t *addr)
+{
+	uint32_t width = copy_size / 256;
+	uint32_t height = 1;
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	uint32_t mocs_index = intel_get_uc_mocs_index(fd);
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c new file +12 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+	cmd[i++] = MEM_COPY_CMD | (1 << 19);
+	cmd[i++] = width - 1;
+	cmd[i++] = height - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = src_addr & ((1UL << 32) - 1);
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = dst_addr & ((1UL << 32) - 1);
+	cmd[i++] = dst_addr >> 32;
+	cmd[i++] = mocs_index << XE2_MEM_COPY_MOCS_SHIFT |

mocs_index;

tests/intel/xe_multi_gpusvm.c new file +6 -0
+	cmd[i++] = MI_BATCH_BUFFER_END;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c new file +5 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
+static void batch_fini(int fd, uint32_t vm, uint32_t bo, uint64_t

addr)

tests/intel/xe_multi_gpusvm.c new file +17 -0
+{
+	/* Unmap the batch bo by re-instating the SVM binding. */
+	xe_vm_bind_lr_sync(fd, vm, 0, 0, addr, BATCH_SIZE(fd),
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+	gem_close(fd, bo);
+}
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info)
+{
+	unsigned int count = 0;
+	uint64_t regions = all_memory_regions(fd);
+	uint32_t region;
+
+	xe_for_each_mem_region(fd, regions, region) {
+		if (XE_IS_VRAM_MEMORY_REGION(fd, region)) {
+			struct drm_xe_mem_region *mem_region =
+				xe_mem_region(fd, 1ull << (region -

1));

tests/intel/xe_multi_gpusvm.c new file +2 -0
+			igt_assert(count < MAX_XE_REGIONS);
+			info->vram_regions[count++] = mem_region-
Quoted 1 line

instance;

tests/intel/xe_multi_gpusvm.c new file +7 -0
+		}
+	}
+
+	info->num_regions = count;
+}
+
+static int get_device_info(struct xe_svm_gpu_info gpus[], int

num_gpus)

tests/intel/xe_multi_gpusvm.c new file +25 -0
+{
+	int cnt;
+	int xe;
+	int i;
+
+	for (i = 0, cnt = 0 && i < 128; cnt < num_gpus; i++) {
+		xe = __drm_open_driver_another(i, DRIVER_XE);
+		if (xe < 0)
+			break;
+
+		gpus[cnt].fd = xe;
+		cnt++;
+	}
+
+	return cnt;
+}
+
+static int
+mgpu_check_fault_support(struct xe_svm_gpu_info *gpu1,
+			 struct xe_svm_gpu_info *gpu2)
+{
+	int ret = 0;
+
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("GPU does not support page faults,

skipping execution\n");

tests/intel/xe_multi_gpusvm.c new file +8 -0
+		ret = 1;
+	}
+	return ret;
+}
+
+static void
+copy_src_dst(struct xe_svm_gpu_info *gpu1,
+	     struct xe_svm_gpu_info *gpu2,

tests/intel/xe_multi_gpusvm.c line 271

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c new file +10 -0
+	     struct drm_xe_engine_class_instance *eci,
+	     unsigned int flags)
+{
+	uint32_t vm[1];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo;
+	void *copy_src, *copy_dst;
+	uint64_t batch_addr;
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;

I just noticed that IGT implements the READ_ONCE() and WRITE_ONCE() macros. That means we could skip the "volatile" keyword and instead use those macros when accessing memory that is modified by the GPU. If doing that, please change across all tests:

Quoted 32 lines
tests/intel/xe_multi_gpusvm.c new file +9 -0
+
+	/* Checking if GPU support page faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+
+	/* Allocate source and destination buffers */
+	copy_src = aligned_alloc(xe_get_default_alignment(gpu1->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+	igt_assert(copy_src);
+	copy_dst = aligned_alloc(xe_get_default_alignment(gpu2->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+	igt_assert(copy_dst);
+
+	batch_init(gpu1->fd, vm[0], to_user_pointer(copy_src),

to_user_pointer(copy_dst),

tests/intel/xe_multi_gpusvm.c new file +7 -0
+		   COPY_SIZE, &batch_bo, &batch_addr);
+
+	/* Fill the source with a pattern, clear the destination. */
+	memset(copy_src, 0x67, COPY_SIZE);
+	memset(copy_dst, 0x0, COPY_SIZE);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0],

to_user_pointer(copy_dst), COPY_SIZE,

tests/intel/xe_multi_gpusvm.c new file +2 -0
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0],

to_user_pointer(copy_dst), COPY_SIZE, &sync,

tests/intel/xe_multi_gpusvm.c line 299

Quoted 2 lines
tests/intel/xe_multi_gpusvm.c new file +2 -0
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);

This then becomes free(sync_addr);

tests/intel/xe_multi_gpusvm.c line 304

Quoted 5 lines
tests/intel/xe_multi_gpusvm.c new file +5 -0
+
+	sync_addr = (void *)((char *)batch_addr + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;

WRITE_ONCE()

tests/intel/xe_multi_gpusvm.c line 308

Quoted 4 lines
tests/intel/xe_multi_gpusvm.c new file +4 -0
+
+	/* Execute a GPU copy. */
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr, &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)

if (READ_ONCE(*sync_addr) != EXEC_SYNC_VAL) etc.

Quoted 54 lines
tests/intel/xe_multi_gpusvm.c new file +1 -0
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c new file +30 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert(memcmp(copy_src, copy_dst, COPY_SIZE) == 0);
+
+	free(copy_dst);
+	free(copy_src);
+	munmap((void *)batch_addr, BATCH_SIZE(gpu1->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo, batch_addr);
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+}
+
+static void
+gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	copy_src_dst(src, dst, eci, flags);
+}
+
+static void
+test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
+	       struct drm_xe_engine_class_instance *eci,
+	       unsigned int flags)
+{
+	if (flags & MULTIGPU_XGPU_ACCESS)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper, flags);

tests/intel/xe_multi_gpusvm.c new file +19 -0
+}
+
+struct section {
+	const char *name;
+	unsigned int flags;
+};
+
+igt_main
+{
+	struct xe_svm_gpu_info gpus[MAX_XE_GPUS];
+	struct xe_device *xe;
+	int gpu, gpu_cnt;
+
+	struct drm_xe_engine_class_instance eci = {
+		.engine_class = DRM_XE_ENGINE_CLASS_COPY,
+	};
+
+	const struct section msections[] = {
+		{ "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c new file +1 -0
+		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH |
Quoted 1 line

MULTIGPU_XGPU_ACCESS },

Here, I think it might make sense to also do the conflicting madvise tests as a variant, but that could be done as a follow-up if needed. So we would get

xgpu-access-basic-conflicting
xgpu-access-prefetch-conflicting.

Thanks,
Thomas

Quoted 53 lines
tests/intel/xe_multi_gpusvm.c new file +13 -0
+		{ NULL },
+	};
+
+	igt_fixture {
+		gpu_cnt = get_device_info(gpus, ARRAY_SIZE(gpus));
+		igt_skip_on(gpu_cnt < 2);
+
+		for (gpu = 0; gpu < gpu_cnt; ++gpu) {
+			igt_assert(gpu < MAX_XE_GPUS);
+
+			open_pagemaps(gpus[gpu].fd, &gpus[gpu]);
+			/* NOTE! inverted return value. */
+			gpus[gpu].supports_faults =

!xe_supports_faults(gpus[gpu].fd);

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			fprintf(stderr, "GPU %u has %u VRAM

regions%s, and %s SVM VMs.\n",

tests/intel/xe_multi_gpusvm.c new file +2 -0
+				gpu, gpus[gpu].num_regions,
+				gpus[gpu].num_regions != 1 ? "s" :

"",

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				gpus[gpu].supports_faults ?

"supports" : "doesn't support");

tests/intel/xe_multi_gpusvm.c new file +10 -0
+
+			xe = xe_device_get(gpus[gpu].fd);
+			gpus[gpu].va_bits = xe->va_bits;
+		}
+	}
+
+	igt_describe("gpu-gpu write-read");
+	for (const struct section *s = msections; s->name; s++) {
+		igt_subtest_f("mgpu-%s", s->name)
+			test_mgpu_exec(gpu_cnt, gpus, &eci, s-
Quoted 1 line

flags);

tests/intel/xe_multi_gpusvm.c new file +9 -0
+	}
+
+	igt_fixture {
+		int cnt;
+
+		for (cnt = 0; cnt < gpu_cnt; cnt++)
+			drm_close_driver(gpus[cnt].fd);
+	}
+}
tests/meson.build +1 -0
index 9736f2338..1209f84a4 100644
@@ -313,6 +313,7 @@ intel_xe_progs = [
  	'xe_media_fill',
  	'xe_mmap',
  	'xe_module_load',
+        'xe_multi_gpusvm',
  	'xe_noexec_ping_pong',
  	'xe_oa',
  	'xe_pat',
#12 lore raw

RE: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

@Hellstrom, Thomas, volatile identifier removed. And READ_ONCE(), WRITE_ONCE() not required as we are not reading from sync_addr. @Gurram, Pravalika, your comment regarding MULTIGPU-BASIC incorporated.

Nishit

-----Original Message-----
From: Hellstrom, Thomas <[email protected]>
Sent: Wednesday, November 26, 2025 2:35 PM
To: [email protected]; Sharma, Nishit <[email protected]>
Subject: Re: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

Quoted 317 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, writes data to it from src GPU, and reads/verifies the data from dst GPU. Optionally, the CPU also reads or modifies the buffer and both GPUs verify the results, ensuring correct cross-GPU and CPU memory access in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 395
++++++++++++++++++++++++++++++++++
 tests/meson.build             |   1 +

 2 files changed, 396 insertions(+)

 create mode 100644 tests/intel/xe_multi_gpusvm.c

(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c new file mode 100644 index 000000000..471be6449

tests/intel/xe_multi_gpusvm.c new file +29 -0
@@ -0,0 +1,395 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation  */
+
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_multigpu.h"
+
+#include "intel_blt.h"
+#include "intel_mocs.h"
+#include "intel_reg.h"
+
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+#include "xe/xe_util.h"
+
+/**
+ * TEST: Basic multi-gpu SVM testing
+ * Category: SVM
+ * Mega feature: Compute
+ * Sub-category: Compute tests
+ * Functionality: SVM p2p access, madvise and prefetch.
+ * Test category: functionality test
+ *
+ * SUBTEST: mgpu-xgpu-access-basic
+ * Description:
+ *	Test basic cross-GPU memory access in multi-GPU SVM

configuration
+ *
+ * SUBTEST: mgpu-xgpu-access-prefetch
+ * Description:
+ * Test cross-GPU memory access with prefetch in multi-GPU SVM
configuration
+ *
+ */

tests/intel/xe_multi_gpusvm.c new file +23 -0
+
+#define MAX_XE_REGIONS	8
+#define MAX_XE_GPUS 8
+#define NUM_LOOPS 1
+#define BATCH_SIZE(_fd) ALIGN(SZ_8K, xe_get_default_alignment(_fd)) 
+#define BIND_SYNC_VAL 0x686868 #define EXEC_SYNC_VAL 0x676767 #define 
+COPY_SIZE SZ_64M
+
+#define MULTIGPU_BASIC			BIT(0)
+#define MULTIGPU_PREFETCH		BIT(1)
+#define MULTIGPU_XGPU_ACCESS		BIT(2)
+
+struct xe_svm_gpu_info {
+	bool supports_faults;
+	int vram_regions[MAX_XE_REGIONS];
+	unsigned int num_regions;
+	unsigned int va_bits;
+	int fd;
+};
+
+typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info *src,
+			    struct xe_svm_gpu_info *dst,
+			    struct drm_xe_engine_class_instance

*eci,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+			    unsigned int flags);
+
+static void for_each_gpu_pair(int num_gpus,
+			      struct xe_svm_gpu_info *gpus,
+			      struct drm_xe_engine_class_instance

*eci,

tests/intel/xe_multi_gpusvm.c new file +6 -0
+			      gpu_pair_fn fn,
+			      unsigned int flags);
+
+static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c new file +6 -0
+				   unsigned int flags);
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c new file +3 -0
+		    uint32_t *vm, uint32_t *exec_queue) {
+	*vm = xe_vm_create(gpu->fd,
+			   DRM_XE_VM_CREATE_FLAG_LR_MODE |

DRM_XE_VM_CREATE_FLAG_FAULT_MODE, 0);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+	*exec_queue = xe_exec_queue_create(gpu->fd, *vm, eci, 0);
+	xe_vm_bind_lr_sync(gpu->fd, *vm, 0, 0, 0, 1ull << gpu-
Quoted 1 line

va_bits,

tests/intel/xe_multi_gpusvm.c new file +5 -0
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+}
+
+static void
+setup_sync(struct drm_xe_sync *sync, volatile uint64_t **sync_addr,

uint64_t timeline_value)

tests/intel/xe_multi_gpusvm.c new file +12 -0
+{
+	*sync_addr = malloc(sizeof(**sync_addr));
+	igt_assert(*sync_addr);
+	sync->flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync->type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	sync->addr = to_user_pointer((uint64_t *)*sync_addr);
+	sync->timeline_value = timeline_value;
+	**sync_addr = 0;
+}
+
+static void
+cleanup_vm_and_queue(struct xe_svm_gpu_info *gpu, uint32_t vm,

uint32_t exec_queue)

tests/intel/xe_multi_gpusvm.c new file +2 -0
+{
+	xe_vm_unbind_lr_sync(gpu->fd, vm, 0, 0, 1ull << gpu-
Quoted 1 line

va_bits);

tests/intel/xe_multi_gpusvm.c new file +5 -0
+	xe_exec_queue_destroy(gpu->fd, exec_queue);
+	xe_vm_destroy(gpu->fd, vm);
+}
+
+static void xe_multigpu_madvise(int src_fd, uint32_t vm, uint64_t

addr, uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				uint64_t ext, uint32_t type, int

dst_fd, uint16_t policy,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				uint32_t instance, uint32_t

exec_queue)

tests/intel/xe_multi_gpusvm.c new file +5 -0
+{
+	int ret;
+
+	if (src_fd != dst_fd) {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext,

type, dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (ret == -ENOLINK) {
+			igt_info("No fast interconnect between GPU0

and GPU1, falling back to local VRAM\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			ret = xe_vm_madvise(src_fd, vm, addr, size,

ext, type,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+					   

DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE,

tests/intel/xe_multi_gpusvm.c new file +3 -0
+					    policy, 0);
+			if (ret) {
+				igt_info("Local VRAM madvise failed,

falling back to system memory\n");

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				ret = xe_vm_madvise(src_fd, vm,

addr, size, ext, type,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+						   

DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, policy,

tests/intel/xe_multi_gpusvm.c new file +8 -0
+						    0);
+				igt_assert_eq(ret, 0);
+			}
+		} else {
+			igt_assert_eq(ret, 0);
+		}
+	} else {
+		ret = xe_vm_madvise(src_fd, vm, addr, size, ext,

type, dst_fd, policy, instance);

tests/intel/xe_multi_gpusvm.c new file +5 -0
+		igt_assert_eq(ret, 0);
+	}
+}
+
+static void xe_multigpu_prefetch(int src_fd, uint32_t vm, uint64_t

addr, uint64_t size,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				 struct drm_xe_sync *sync, volatile

uint64_t *sync_addr,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				 uint32_t exec_queue, unsigned int

flags)

tests/intel/xe_multi_gpusvm.c new file +3 -0
+{
+	if (flags & MULTIGPU_PREFETCH) {
+		xe_vm_prefetch_async(src_fd, vm, 0, 0, addr, size,

sync, 1,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				    

DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+		if (*sync_addr != sync->timeline_value)
+			xe_wait_ufence(src_fd, (uint64_t

*)sync_addr, sync->timeline_value,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				       exec_queue, NSEC_PER_SEC *

10);

tests/intel/xe_multi_gpusvm.c new file +4 -0
+	}
+}
+
+static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info

*gpus,

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			      struct drm_xe_engine_class_instance

*eci,

tests/intel/xe_multi_gpusvm.c new file +27 -0
+			      gpu_pair_fn fn, unsigned int flags) {
+	for (int src = 0; src < num_gpus; src++) {
+		if (!gpus[src].supports_faults)
+			continue;
+
+		for (int dst = 0; dst < num_gpus; dst++) {
+			if (src == dst)
+				continue;
+			fn(&gpus[src], &gpus[dst], eci, flags);
+		}
+	}
+}
+
+static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		       uint64_t dst_addr, uint64_t copy_size,
+		       uint32_t *bo, uint64_t *addr) {
+	uint32_t width = copy_size / 256;
+	uint32_t height = 1;
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	uint32_t mocs_index = intel_get_uc_mocs_index(fd);
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c new file +12 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+	cmd[i++] = MEM_COPY_CMD | (1 << 19);
+	cmd[i++] = width - 1;
+	cmd[i++] = height - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = src_addr & ((1UL << 32) - 1);
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = dst_addr & ((1UL << 32) - 1);
+	cmd[i++] = dst_addr >> 32;
+	cmd[i++] = mocs_index << XE2_MEM_COPY_MOCS_SHIFT |

mocs_index;

tests/intel/xe_multi_gpusvm.c new file +6 -0
+	cmd[i++] = MI_BATCH_BUFFER_END;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c new file +5 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
+static void batch_fini(int fd, uint32_t vm, uint32_t bo, uint64_t

addr)

tests/intel/xe_multi_gpusvm.c new file +16 -0
+{
+	/* Unmap the batch bo by re-instating the SVM binding. */
+	xe_vm_bind_lr_sync(fd, vm, 0, 0, addr, BATCH_SIZE(fd),
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+	gem_close(fd, bo);
+}
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info) {
+	unsigned int count = 0;
+	uint64_t regions = all_memory_regions(fd);
+	uint32_t region;
+
+	xe_for_each_mem_region(fd, regions, region) {
+		if (XE_IS_VRAM_MEMORY_REGION(fd, region)) {
+			struct drm_xe_mem_region *mem_region =
+				xe_mem_region(fd, 1ull << (region -

1));

tests/intel/xe_multi_gpusvm.c new file +2 -0
+			igt_assert(count < MAX_XE_REGIONS);
+			info->vram_regions[count++] = mem_region-
Quoted 1 line

instance;

tests/intel/xe_multi_gpusvm.c new file +7 -0
+		}
+	}
+
+	info->num_regions = count;
+}
+
+static int get_device_info(struct xe_svm_gpu_info gpus[], int

num_gpus)

tests/intel/xe_multi_gpusvm.c new file +25 -0
+{
+	int cnt;
+	int xe;
+	int i;
+
+	for (i = 0, cnt = 0 && i < 128; cnt < num_gpus; i++) {
+		xe = __drm_open_driver_another(i, DRIVER_XE);
+		if (xe < 0)
+			break;
+
+		gpus[cnt].fd = xe;
+		cnt++;
+	}
+
+	return cnt;
+}
+
+static int
+mgpu_check_fault_support(struct xe_svm_gpu_info *gpu1,
+			 struct xe_svm_gpu_info *gpu2)
+{
+	int ret = 0;
+
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("GPU does not support page faults,

skipping execution\n");

tests/intel/xe_multi_gpusvm.c new file +8 -0
+		ret = 1;
+	}
+	return ret;
+}
+
+static void
+copy_src_dst(struct xe_svm_gpu_info *gpu1,
+	     struct xe_svm_gpu_info *gpu2,

tests/intel/xe_multi_gpusvm.c line 271

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c new file +10 -0
+	     struct drm_xe_engine_class_instance *eci,
+	     unsigned int flags)
+{
+	uint32_t vm[1];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo;
+	void *copy_src, *copy_dst;
+	uint64_t batch_addr;
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;

I just noticed that IGT implements the READ_ONCE() and WRITE_ONCE() macros. That means we could skip the "volatile" keyword and instead use those macros when accessing memory that is modified by the GPU. If doing that, please change across all tests:

Quoted 32 lines
tests/intel/xe_multi_gpusvm.c new file +9 -0
+
+	/* Checking if GPU support page faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+
+	/* Allocate source and destination buffers */
+	copy_src = aligned_alloc(xe_get_default_alignment(gpu1->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +2 -0
+	igt_assert(copy_src);
+	copy_dst = aligned_alloc(xe_get_default_alignment(gpu2->fd),

SZ_64M);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+	igt_assert(copy_dst);
+
+	batch_init(gpu1->fd, vm[0], to_user_pointer(copy_src),

to_user_pointer(copy_dst),

tests/intel/xe_multi_gpusvm.c new file +7 -0
+		   COPY_SIZE, &batch_bo, &batch_addr);
+
+	/* Fill the source with a pattern, clear the destination. */
+	memset(copy_src, 0x67, COPY_SIZE);
+	memset(copy_dst, 0x0, COPY_SIZE);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0],

to_user_pointer(copy_dst), COPY_SIZE,

tests/intel/xe_multi_gpusvm.c new file +2 -0
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c new file +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0],

to_user_pointer(copy_dst), COPY_SIZE, &sync,

tests/intel/xe_multi_gpusvm.c line 299

Quoted 2 lines
tests/intel/xe_multi_gpusvm.c new file +2 -0
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);

This then becomes free(sync_addr);

tests/intel/xe_multi_gpusvm.c line 304

Quoted 5 lines
tests/intel/xe_multi_gpusvm.c new file +5 -0
+
+	sync_addr = (void *)((char *)batch_addr + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;

WRITE_ONCE()

tests/intel/xe_multi_gpusvm.c line 308

Quoted 4 lines
tests/intel/xe_multi_gpusvm.c new file +4 -0
+
+	/* Execute a GPU copy. */
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr, &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)

if (READ_ONCE(*sync_addr) != EXEC_SYNC_VAL) etc.

Quoted 53 lines
tests/intel/xe_multi_gpusvm.c new file +1 -0
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c new file +29 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert(memcmp(copy_src, copy_dst, COPY_SIZE) == 0);
+
+	free(copy_dst);
+	free(copy_src);
+	munmap((void *)batch_addr, BATCH_SIZE(gpu1->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo, batch_addr);
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]); }
+
+static void
+gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	copy_src_dst(src, dst, eci, flags);
+}
+
+static void
+test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
+	       struct drm_xe_engine_class_instance *eci,
+	       unsigned int flags)
+{
+	if (flags & MULTIGPU_XGPU_ACCESS)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper, flags);

tests/intel/xe_multi_gpusvm.c new file +19 -0
+}
+
+struct section {
+	const char *name;
+	unsigned int flags;
+};
+
+igt_main
+{
+	struct xe_svm_gpu_info gpus[MAX_XE_GPUS];
+	struct xe_device *xe;
+	int gpu, gpu_cnt;
+
+	struct drm_xe_engine_class_instance eci = {
+		.engine_class = DRM_XE_ENGINE_CLASS_COPY,
+	};
+
+	const struct section msections[] = {
+		{ "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c new file +1 -0
+		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH |
Quoted 1 line

MULTIGPU_XGPU_ACCESS },

Here, I think it might make sense to also do the conflicting madvise tests as a variant, but that could be done as a follow-up if needed. So we would get

xgpu-access-basic-conflicting
xgpu-access-prefetch-conflicting.

Thanks,
Thomas

Quoted 53 lines
tests/intel/xe_multi_gpusvm.c new file +13 -0
+		{ NULL },
+	};
+
+	igt_fixture {
+		gpu_cnt = get_device_info(gpus, ARRAY_SIZE(gpus));
+		igt_skip_on(gpu_cnt < 2);
+
+		for (gpu = 0; gpu < gpu_cnt; ++gpu) {
+			igt_assert(gpu < MAX_XE_GPUS);
+
+			open_pagemaps(gpus[gpu].fd, &gpus[gpu]);
+			/* NOTE! inverted return value. */
+			gpus[gpu].supports_faults =

!xe_supports_faults(gpus[gpu].fd);

tests/intel/xe_multi_gpusvm.c new file +1 -0
+			fprintf(stderr, "GPU %u has %u VRAM

regions%s, and %s SVM VMs.\n",

tests/intel/xe_multi_gpusvm.c new file +2 -0
+				gpu, gpus[gpu].num_regions,
+				gpus[gpu].num_regions != 1 ? "s" :

"",

tests/intel/xe_multi_gpusvm.c new file +1 -0
+				gpus[gpu].supports_faults ?

"supports" : "doesn't support");

tests/intel/xe_multi_gpusvm.c new file +10 -0
+
+			xe = xe_device_get(gpus[gpu].fd);
+			gpus[gpu].va_bits = xe->va_bits;
+		}
+	}
+
+	igt_describe("gpu-gpu write-read");
+	for (const struct section *s = msections; s->name; s++) {
+		igt_subtest_f("mgpu-%s", s->name)
+			test_mgpu_exec(gpu_cnt, gpus, &eci, s-
Quoted 1 line

flags);

tests/intel/xe_multi_gpusvm.c new file +9 -0
+	}
+
+	igt_fixture {
+		int cnt;
+
+		for (cnt = 0; cnt < gpu_cnt; cnt++)
+			drm_close_driver(gpus[cnt].fd);
+	}
+}
tests/meson.build index renamed from tests/meson.build +0 -0

9736f2338..1209f84a4 100644

tests/meson.build +1 -0
@@ -313,6 +313,7 @@ intel_xe_progs = [
  	'xe_media_fill',
  	'xe_mmap',
  	'xe_module_load',
+        'xe_multi_gpusvm',
  	'xe_noexec_ping_pong',
  	'xe_oa',
  	'xe_pat',
#13 lore raw

Re: [PATCH i-g-t v8 03/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

In reply to [email protected]

Hi nishit.sharma,

Quoted 6 lines · On 2025-11-21 at 16:25:30 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, writes data to it from src GPU, and reads/verifies the data from dst GPU. Optionally, the CPU also reads or modifies the buffer and both GPUs verify the results, ensuring correct cross-GPU and CPU memory access in a multi-GPU environment.

Please add link to kernel part, preferrably to lore.kernel.org

+Cc: Pravalika Gurram <[email protected]>

Quoted 5 lines
---
 tests/intel/xe_multi_gpusvm.c | 395 ++++++++++++++++++++++++++++++++++

imho test shoud be named xe_svm.c (best) or xe_multigpu_svm.c (second best) or xe_multi_gpu_svm.c For rationale see below.

Quoted 21 lines
 tests/meson.build             |   1 +
 2 files changed, 396 insertions(+)
 create mode 100644 tests/intel/xe_multi_gpusvm.c
tests/intel/xe_multi_gpusvm.c new file +11 -0
new file mode 100644
index 000000000..471be6449
@@ -0,0 +1,395 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_multigpu.h"
+

tests/intel/xe_multi_gpusvm.c line 21

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c new file +10 -0
+#include "intel_blt.h"
+#include "intel_mocs.h"
+#include "intel_reg.h"
+
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+#include "xe/xe_util.h"
+
+/**
+ * TEST: Basic multi-gpu SVM testing

Here in description you do not use GPUSVM, so test name should follow. Also s/gpu/GPU/

tests/intel/xe_multi_gpusvm.c line 22

Quoted 1 line
tests/intel/xe_multi_gpusvm.c new file +1 -0
+ * Category: SVM

Add description here, also write down what is SVM shortcut, for example:

* Description: Test for Shared Virtual Memory (SVM) on multi-GPU

Regards,
Kamil

Quoted 14 lines
tests/intel/xe_multi_gpusvm.c new file +14 -0
+ * Mega feature: Compute
+ * Sub-category: Compute tests
+ * Functionality: SVM p2p access, madvise and prefetch.
+ * Test category: functionality test
+ *
+ * SUBTEST: mgpu-xgpu-access-basic
+ * Description:
+ *	Test basic cross-GPU memory access in multi-GPU SVM configuration
+ *
+ * SUBTEST: mgpu-xgpu-access-prefetch
+ * Description:
+ *	Test cross-GPU memory access with prefetch in multi-GPU SVM configuration
+ *
+ */

[cut]

#14 lore raw

PATCH v8 4/10 tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This test performs atomic increment operation on a shared SVM buffer from both GPUs and the CPU in a multi-GPU environment. It uses madvise and prefetch to control buffer placement and verifies correctness and ordering of atomic updates across agents.

---
 tests/intel/xe_multi_gpusvm.c | 162 +++++++++++++++++++++++++++++++++-
 1 file changed, 160 insertions(+), 2 deletions(-)
tests/intel/xe_multi_gpusvm.c +160 -2
index 471be6449..4e817edf9 100644
@@ -33,6 +33,17 @@
  * Description:
  *	Test cross-GPU memory access with prefetch in multi-GPU SVM configuration
  *
+ * SUBTEST: mgpu-atomic-op-basic
+ * Description:
+ *	Test basic cross-GPU atomic increment operations in multi-GPU SVM configuration
+ *	operation on GPU1 and then atomic operation on GPU2 using same
+ *	address
+ *
+ * SUBTEST: mgpu-atomic-op-prefetch
+ * Description:
+ *	Tests cross-GPU atomic increment operations with explicit memory prefetch
+ *	to validate SVM atomic operations in multi-GPU config
+ *
  */
 
 #define MAX_XE_REGIONS	8
@@ -42,10 +53,12 @@
 #define BIND_SYNC_VAL 0x686868
 #define EXEC_SYNC_VAL 0x676767
 #define COPY_SIZE SZ_64M
+#define	ATOMIC_OP_VAL	56
 
 #define MULTIGPU_BASIC			BIT(0)
 #define MULTIGPU_PREFETCH		BIT(1)
 #define MULTIGPU_XGPU_ACCESS		BIT(2)
+#define MULTIGPU_ATOMIC_OP		BIT(3)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -60,6 +73,16 @@ typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info *src,
 			    struct drm_xe_engine_class_instance *eci,
 			    unsigned int flags);
 
+struct test_exec_data {
+	uint32_t batch[32];
+	uint64_t pad;
+	uint64_t vm_sync;
+	uint64_t exec_sync;
+	uint32_t data;
+	uint32_t expected_data;
+	uint64_t batch_addr;
+};
+
 static void for_each_gpu_pair(int num_gpus,
 			      struct xe_svm_gpu_info *gpus,
 			      struct drm_xe_engine_class_instance *eci,
@@ -71,7 +94,10 @@ static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 				   struct drm_xe_engine_class_instance *eci,
 				   unsigned int flags);
 
-static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+static void gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
 
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
@@ -162,6 +188,35 @@ static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus,
 	}
 }
 
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		  uint32_t *bo, uint64_t *addr)
+{
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size, vram_if_possible(fd, 0), 0);
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+
+	cmd[i++] = MI_ATOMIC | MI_ATOMIC_INC;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr, batch_bo_size, 0);
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
 static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
 		       uint64_t dst_addr, uint64_t copy_size,
 		       uint32_t *bo, uint64_t *addr)
@@ -318,6 +373,93 @@ copy_src_dst(struct xe_svm_gpu_info *gpu1,
 	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
 }
 
+static void
+atomic_inc_op(struct xe_svm_gpu_info *gpu1,
+	      struct xe_svm_gpu_info *gpu2,
+	      struct drm_xe_engine_class_instance *eci,
+	      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = ATOMIC_OP_VAL - 1;
+
+	atomic_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0], &batch_addr[0]);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* Executing ATOMIC_INC on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[0],
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL);
+
+	atomic_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1], &batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* Execute ATOMIC_INC on GPU2 */
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[1],
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL + 1);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst,
@@ -330,6 +472,18 @@ gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 	copy_src_dst(src, dst, eci, flags);
 }
 
+static void
+gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	atomic_inc_op(src, dst, eci, flags);
+}
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 	       struct drm_xe_engine_class_instance *eci,
@@ -337,6 +491,8 @@ test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 {
 	if (flags & MULTIGPU_XGPU_ACCESS)
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_mem_access_wrapper, flags);
+	if (flags & MULTIGPU_ATOMIC_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_atomic_inc_wrapper, flags);
 }
 
 struct section {
@@ -357,6 +513,8 @@ igt_main
 	const struct section msections[] = {
 		{ "xgpu-access-basic", MULTIGPU_BASIC | MULTIGPU_XGPU_ACCESS },
 		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_XGPU_ACCESS },
+		{ "atomic-op-basic", MULTIGPU_BASIC | MULTIGPU_ATOMIC_OP },
+		{ "atomic-op-prefetch", MULTIGPU_PREFETCH | MULTIGPU_ATOMIC_OP },
 		{ NULL },
 	};
 
@@ -380,7 +538,7 @@ igt_main
 		}
 	}
 
-	igt_describe("gpu-gpu write-read");
+	igt_describe("multigpu svm operations");
 	for (const struct section *s = msections; s->name; s++) {
 		igt_subtest_f("mgpu-%s", s->name)
 			test_mgpu_exec(gpu_cnt, gpus, &eci, s->flags);
Signature · 1 line
2.48.1
#15 lore raw

RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

Quoted 181 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of [email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

From: Nishit Sharma <[email protected]>

This test performs atomic increment operation on a shared SVM buffer from both GPUs and the CPU in a multi-GPU environment. It uses madvise and prefetch to control buffer placement and verifies correctness and ordering of atomic updates across agents.

---
 tests/intel/xe_multi_gpusvm.c | 162
+++++++++++++++++++++++++++++++++-
 1 file changed, 160 insertions(+), 2 deletions(-)
tests/intel/xe_multi_gpusvm.c +0 -0
index 471be6449..4e817edf9 100644
@@ -33,6 +33,17 @@
  * Description:
  *	Test cross-GPU memory access with prefetch in multi-GPU SVM

configuration
*
+ * SUBTEST: mgpu-atomic-op-basic
+ * Description:
+ * Test basic cross-GPU atomic increment operations in multi-GPU SVM
configuration
+ * operation on GPU1 and then atomic operation on GPU2 using same
+ * address
+ *
+ * SUBTEST: mgpu-atomic-op-prefetch
+ * Description:
+ * Tests cross-GPU atomic increment operations with explicit memory
prefetch
+ * to validate SVM atomic operations in multi-GPU config
+ *
*/

#define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +12 -0
@@ -42,10 +53,12 @@
 #define BIND_SYNC_VAL 0x686868
 #define EXEC_SYNC_VAL 0x676767
 #define COPY_SIZE SZ_64M
+#define	ATOMIC_OP_VAL	56
 
 #define MULTIGPU_BASIC			BIT(0)
 #define MULTIGPU_PREFETCH		BIT(1)
 #define MULTIGPU_XGPU_ACCESS		BIT(2)
+#define MULTIGPU_ATOMIC_OP		BIT(3)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -60,6 +73,16 @@ typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info
 *src,
 			    struct drm_xe_engine_class_instance *eci,
 			    unsigned int flags);
 
+struct test_exec_data {
+	uint32_t batch[32];
+	uint64_t pad;
+	uint64_t vm_sync;
+	uint64_t exec_sync;
+	uint32_t data;
+	uint32_t expected_data;
+	uint64_t batch_addr;
+};
+
 static void for_each_gpu_pair(int num_gpus,
 			      struct xe_svm_gpu_info *gpus,

struct drm_xe_engine_class_instance *eci, @@ -
71,7 +94,10 @@ static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,

tests/intel/xe_multi_gpusvm.c +4 -1
 				   struct drm_xe_engine_class_instance *eci,
 				   unsigned int flags);
 
-static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+static void gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
 
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct

drm_xe_engine_class_instance *eci, @@ -162,6 +188,35 @@ static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus,

tests/intel/xe_multi_gpusvm.c +14 -0
 	}
 }
 
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		  uint32_t *bo, uint64_t *addr)
+{
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c +11 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+
+	cmd[i++] = MI_ATOMIC | MI_ATOMIC_INC;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c +48 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
 static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
 		       uint64_t dst_addr, uint64_t copy_size,
 		       uint32_t *bo, uint64_t *addr)
@@ -318,6 +373,93 @@ copy_src_dst(struct xe_svm_gpu_info *gpu1,
 	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);  }
 
+static void
+atomic_inc_op(struct xe_svm_gpu_info *gpu1,
+	      struct xe_svm_gpu_info *gpu2,
+	      struct drm_xe_engine_class_instance *eci,
+	      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = ATOMIC_OP_VAL - 1;
+
+	atomic_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],
+&batch_addr[0]);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],
 exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* Executing ATOMIC_INC on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);

tests/intel/xe_multi_gpusvm.c copy_src_dst(struct xe_svm_gpu_info *gpu1, · line 429

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c +9 -0
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,
 EXEC_SYNC_VAL, exec_queue[0],
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL);

This test only doing
GPU0 writes -> CPU reads
GPU1 writes -> CPU reads
GPUs NEVER communicate with each other
Only tests GPU -> CPU coherency
Missing GPU <-> GPU coherency

am thinking if we do below operation it will be good.
GPU0 writes -> GPU1 READS what GPU0 wrote -> (GPU-to-GPU)
GPU1 writes -> GPU0 READS what GPU1 wrote -> (GPU-to-GPU) This test GPU-to-GPU shared memory

-Pravalika
@Hellstrom, Thomas is my understanding is correct?

Quoted 94 lines
tests/intel/xe_multi_gpusvm.c +47 -0
+
+	atomic_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1],
+&batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],
 exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* Execute ATOMIC_INC on GPU2 */
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,
 EXEC_SYNC_VAL, exec_queue[1],
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL + 1);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]); }
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst,
@@ -330,6 +472,18 @@ gpu_mem_access_wrapper(struct
 xe_svm_gpu_info *src,
 	copy_src_dst(src, dst, eci, flags);
 }
 
+static void
+gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	atomic_inc_op(src, dst, eci, flags);
+}
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,

struct drm_xe_engine_class_instance *eci, @@ -337,6 +491,8
@@ test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, {

tests/intel/xe_multi_gpusvm.c +0 -0
 	if (flags & MULTIGPU_XGPU_ACCESS)
 		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper, flags);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (flags & MULTIGPU_ATOMIC_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_atomic_inc_wrapper, flags);
}

struct section {

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -357,6 +513,8 @@ igt_main
 	const struct section msections[] = {
 		{ "xgpu-access-basic", MULTIGPU_BASIC |
 MULTIGPU_XGPU_ACCESS },
 		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH |
 MULTIGPU_XGPU_ACCESS },
+		{ "atomic-op-basic", MULTIGPU_BASIC |
 MULTIGPU_ATOMIC_OP },
+		{ "atomic-op-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_ATOMIC_OP },

tests/intel/xe_multi_gpusvm.c +1 -2
 		{ NULL },
 	};
@@ -380,7 +538,7 @@ igt_main
 		}
 	}
 
-	igt_describe("gpu-gpu write-read");
+	igt_describe("multigpu svm operations");
 	for (const struct section *s = msections; s->name; s++) {
 		igt_subtest_f("mgpu-%s", s->name)
 			test_mgpu_exec(gpu_cnt, gpus, &eci, s->flags);
--

2.48.1

#16 lore raw

RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

Can be done but we are checking atomic operation in multi-GPU scenarios, so idea was whether all GPUs performing atomic operation correctly and data can be read from CPU. GPU1 write - GPU2 read implemented in other subtests.

Nishit

-----Original Message-----
From: Gurram, Pravalika <[email protected]>
Sent: Tuesday, November 25, 2025 8:01 PM
To: Sharma, Nishit <[email protected]>; [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

Quoted 186 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of [email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

From: Nishit Sharma <[email protected]>

This test performs atomic increment operation on a shared SVM buffer from both GPUs and the CPU in a multi-GPU environment. It uses madvise and prefetch to control buffer placement and verifies correctness and ordering of atomic updates across agents.

---
 tests/intel/xe_multi_gpusvm.c | 162
+++++++++++++++++++++++++++++++++-
 1 file changed, 160 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c index 471be6449..4e817edf9 100644

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -33,6 +33,17 @@
  * Description:
  *	Test cross-GPU memory access with prefetch in multi-GPU SVM

configuration
*
+ * SUBTEST: mgpu-atomic-op-basic
+ * Description:
+ * Test basic cross-GPU atomic increment operations in multi-GPU SVM
configuration
+ * operation on GPU1 and then atomic operation on GPU2 using same
+ * address
+ *
+ * SUBTEST: mgpu-atomic-op-prefetch
+ * Description:
+ * Tests cross-GPU atomic increment operations with explicit memory
prefetch
+ * to validate SVM atomic operations in multi-GPU config
+ *
*/

#define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +12 -0
@@ -42,10 +53,12 @@
 #define BIND_SYNC_VAL 0x686868
 #define EXEC_SYNC_VAL 0x676767
 #define COPY_SIZE SZ_64M
+#define	ATOMIC_OP_VAL	56
 
 #define MULTIGPU_BASIC			BIT(0)
 #define MULTIGPU_PREFETCH		BIT(1)
 #define MULTIGPU_XGPU_ACCESS		BIT(2)
+#define MULTIGPU_ATOMIC_OP		BIT(3)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -60,6 +73,16 @@ typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info 
 *src,
 			    struct drm_xe_engine_class_instance *eci,
 			    unsigned int flags);
 
+struct test_exec_data {
+	uint32_t batch[32];
+	uint64_t pad;
+	uint64_t vm_sync;
+	uint64_t exec_sync;
+	uint32_t data;
+	uint32_t expected_data;
+	uint64_t batch_addr;
+};
+
 static void for_each_gpu_pair(int num_gpus,
 			      struct xe_svm_gpu_info *gpus,

struct drm_xe_engine_class_instance *eci, @@ -
71,7 +94,10 @@ static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,

tests/intel/xe_multi_gpusvm.c +4 -1
 				   struct drm_xe_engine_class_instance *eci,
 				   unsigned int flags);
 
-static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+static void gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
 
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct 

drm_xe_engine_class_instance *eci, @@ -162,6 +188,35 @@ static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus,

tests/intel/xe_multi_gpusvm.c +14 -0
 	}
 }
 
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		  uint32_t *bo, uint64_t *addr)
+{
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c +11 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+
+	cmd[i++] = MI_ATOMIC | MI_ATOMIC_INC;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c +4 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
 static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
 		       uint64_t dst_addr, uint64_t copy_size,
 		       uint32_t *bo, uint64_t *addr) @@ -318,6 +373,93 @@ 

copy_src_dst(struct xe_svm_gpu_info *gpu1,

tests/intel/xe_multi_gpusvm.c +35 -0
 	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);  }
 
+static void
+atomic_inc_op(struct xe_svm_gpu_info *gpu1,
+	      struct xe_svm_gpu_info *gpu2,
+	      struct drm_xe_engine_class_instance *eci,
+	      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = ATOMIC_OP_VAL - 1;
+
+	atomic_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0], 
+&batch_addr[0]);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +15 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* Executing ATOMIC_INC on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c copy_src_dst(struct xe_svm_gpu_info *gpu1, · line 427

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL);

This test only doing
GPU0 writes -> CPU reads
GPU1 writes -> CPU reads
GPUs NEVER communicate with each other
Only tests GPU -> CPU coherency
Missing GPU <-> GPU coherency

am thinking if we do below operation it will be good.
GPU0 writes -> GPU1 READS what GPU0 wrote -> (GPU-to-GPU)
GPU1 writes -> GPU0 READS what GPU1 wrote -> (GPU-to-GPU) This test GPU-to-GPU shared memory

-Pravalika
@Hellstrom, Thomas is my understanding is correct?

Quoted 91 lines
tests/intel/xe_multi_gpusvm.c +7 -0
+
+	atomic_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1], 
+&batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +15 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* Execute ATOMIC_INC on GPU2 */
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[1],

tests/intel/xe_multi_gpusvm.c +13 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL + 1);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]); }
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst, @@ -330,6 +472,18 @@ 

gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,

tests/intel/xe_multi_gpusvm.c +11 -0
 	copy_src_dst(src, dst, eci, flags);
 }
 
+static void
+gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	atomic_inc_op(src, dst, eci, flags); }
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 	       struct drm_xe_engine_class_instance *eci, @@ -337,6 +491,8 @@ 

test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, {

tests/intel/xe_multi_gpusvm.c +0 -0
 	if (flags & MULTIGPU_XGPU_ACCESS)
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_mem_access_wrapper, 

flags);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (flags & MULTIGPU_ATOMIC_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_atomic_inc_wrapper, flags);
}

struct section {

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -357,6 +513,8 @@ igt_main
 	const struct section msections[] = {
 		{ "xgpu-access-basic", MULTIGPU_BASIC | MULTIGPU_XGPU_ACCESS },
 		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_XGPU_ACCESS 
 },
+		{ "atomic-op-basic", MULTIGPU_BASIC |
 MULTIGPU_ATOMIC_OP },
+		{ "atomic-op-prefetch", MULTIGPU_PREFETCH |
 MULTIGPU_ATOMIC_OP },
tests/intel/xe_multi_gpusvm.c +1 -2
 		{ NULL },
 	};
@@ -380,7 +538,7 @@ igt_main
 		}
 	}
 
-	igt_describe("gpu-gpu write-read");
+	igt_describe("multigpu svm operations");
 	for (const struct section *s = msections; s->name; s++) {
 		igt_subtest_f("mgpu-%s", s->name)
 			test_mgpu_exec(gpu_cnt, gpus, &eci, s->flags);
--

2.48.1

#17 lore raw

RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

Quoted 11 lines

-----Original Message-----
From: Sharma, Nishit <[email protected]>
Sent: Tuesday, November 25, 2025 8:07 PM
To: Gurram, Pravalika <[email protected]>; igt- [email protected]; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

Quoted 7 lines

Can be done but we are checking atomic operation in multi-GPU scenarios, so idea was whether all GPUs performing atomic operation correctly and data can be read from CPU. GPU1 write - GPU2 read implemented in other subtests.

Nishit

Okay, if that is the case, it will be good if we mention " testing GPU -> CPU coherency."

--Pravalika

Quoted 310 lines

-----Original Message-----
From: Gurram, Pravalika <[email protected]>
Sent: Tuesday, November 25, 2025 8:01 PM
To: Sharma, Nishit <[email protected]>; igt- [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

tests/intel/xe_multi_gpusvm.c typedef void (*gpu_pair_fn)(struct

Quoted 62 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of [email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

From: Nishit Sharma <[email protected]>

This test performs atomic increment operation on a shared SVM buffer from both GPUs and the CPU in a multi-GPU environment. It uses madvise and prefetch to control buffer placement and verifies correctness and ordering of atomic updates across agents.

---
 tests/intel/xe_multi_gpusvm.c | 162
+++++++++++++++++++++++++++++++++-
 1 file changed, 160 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c index 471be6449..4e817edf9 100644

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -33,6 +33,17 @@
  * Description:
  *	Test cross-GPU memory access with prefetch in multi-GPU SVM

configuration
*
+ * SUBTEST: mgpu-atomic-op-basic
+ * Description:
+ * Test basic cross-GPU atomic increment operations in multi-GPU SVM
configuration
+ * operation on GPU1 and then atomic operation on GPU2 using same
+ * address
+ *
+ * SUBTEST: mgpu-atomic-op-prefetch
+ * Description:
+ * Tests cross-GPU atomic increment operations with explicit memory
prefetch
+ * to validate SVM atomic operations in multi-GPU config
+ *
*/

#define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -42,10 +53,12 @@
 #define BIND_SYNC_VAL 0x686868
 #define EXEC_SYNC_VAL 0x676767
 #define COPY_SIZE SZ_64M
+#define	ATOMIC_OP_VAL	56
 
 #define MULTIGPU_BASIC			BIT(0)
 #define MULTIGPU_PREFETCH		BIT(1)
 #define MULTIGPU_XGPU_ACCESS		BIT(2)
+#define MULTIGPU_ATOMIC_OP		BIT(3)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -60,6 +73,16 @@ typedef void (*gpu_pair_fn)(struct

xe_svm_gpu_info

Quoted 124 lines
tests/intel/xe_multi_gpusvm.c +10 -0
 *src,
 			    struct drm_xe_engine_class_instance *eci,
 			    unsigned int flags);
 
+struct test_exec_data {
+	uint32_t batch[32];
+	uint64_t pad;
+	uint64_t vm_sync;
+	uint64_t exec_sync;
+	uint32_t data;
+	uint32_t expected_data;
+	uint64_t batch_addr;
+};
+
 static void for_each_gpu_pair(int num_gpus,
 			      struct xe_svm_gpu_info *gpus,

struct drm_xe_engine_class_instance *eci, @@ -
71,7 +94,10 @@ static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,

tests/intel/xe_multi_gpusvm.c +4 -1
 				   struct drm_xe_engine_class_instance *eci,
 				   unsigned int flags);
 
-static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+static void gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
 
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct

drm_xe_engine_class_instance *eci, @@ -162,6 +188,35 @@ static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus,

tests/intel/xe_multi_gpusvm.c +14 -0
 	}
 }
 
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		  uint32_t *bo, uint64_t *addr)
+{
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c +11 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+
+	cmd[i++] = MI_ATOMIC | MI_ATOMIC_INC;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c +4 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
 static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
 		       uint64_t dst_addr, uint64_t copy_size,
 		       uint32_t *bo, uint64_t *addr) @@ -318,6 +373,93 @@

copy_src_dst(struct xe_svm_gpu_info *gpu1,

tests/intel/xe_multi_gpusvm.c +35 -0
 	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);  }
 
+static void
+atomic_inc_op(struct xe_svm_gpu_info *gpu1,
+	      struct xe_svm_gpu_info *gpu2,
+	      struct drm_xe_engine_class_instance *eci,
+	      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = ATOMIC_OP_VAL - 1;
+
+	atomic_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],
+&batch_addr[0]);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +15 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* Executing ATOMIC_INC on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c copy_src_dst(struct xe_svm_gpu_info *gpu1, · line 427

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL);

This test only doing
GPU0 writes -> CPU reads
GPU1 writes -> CPU reads
GPUs NEVER communicate with each other
Only tests GPU -> CPU coherency
Missing GPU <-> GPU coherency

am thinking if we do below operation it will be good. GPU0 writes -> GPU1 READS what GPU0 wrote -> (GPU-to-GPU) GPU1 writes -> GPU0 READS what GPU1 wrote -> (GPU-to-GPU) This test GPU-to-GPU shared memory

-Pravalika
@Hellstrom, Thomas is my understanding is correct?

Quoted 48 lines
tests/intel/xe_multi_gpusvm.c +7 -0
+
+	atomic_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1],
+&batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +15 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* Execute ATOMIC_INC on GPU2 */
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[1],

tests/intel/xe_multi_gpusvm.c +13 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL + 1);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]); }
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst, @@ -330,6 +472,18 @@

gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,

tests/intel/xe_multi_gpusvm.c +4 -0
 	copy_src_dst(src, dst, eci, flags);
 }
 
+static void
+gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c +7 -0
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	atomic_inc_op(src, dst, eci, flags); }
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 	       struct drm_xe_engine_class_instance *eci, @@ -337,6 +491,8

@@

tests/intel/xe_multi_gpusvm.c

Quoted 3 lines

test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, {

tests/intel/xe_multi_gpusvm.c +0 -0
 	if (flags & MULTIGPU_XGPU_ACCESS)
 		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper,

tests/intel/xe_multi_gpusvm.c igt_main · line 514

Quoted 10 lines

flags);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (flags & MULTIGPU_ATOMIC_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_atomic_inc_wrapper, flags);
}

struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -357,6 +513,8 @@ igt_main
 	const struct section msections[] = {
 		{ "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c igt_main · line 515

Quoted 1 line
tests/intel/xe_multi_gpusvm.c +0 -0
 		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_XGPU_ACCESS

Quoted 19 lines
tests/intel/xe_multi_gpusvm.c +2 -0
 },
+		{ "atomic-op-basic", MULTIGPU_BASIC |
 MULTIGPU_ATOMIC_OP },
+		{ "atomic-op-prefetch", MULTIGPU_PREFETCH |
 MULTIGPU_ATOMIC_OP },
tests/intel/xe_multi_gpusvm.c +1 -2
 		{ NULL },
 	};
@@ -380,7 +538,7 @@ igt_main
 		}
 	}
 
-	igt_describe("gpu-gpu write-read");
+	igt_describe("multigpu svm operations");
 	for (const struct section *s = msections; s->name; s++) {
 		igt_subtest_f("mgpu-%s", s->name)
 			test_mgpu_exec(gpu_cnt, gpus, &eci, s->flags);
--

2.48.1

#18 lore raw

Re: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

Hi, Nishit, Pravalika

Quoted 19 lines · Pravalika
Quoted 19 lines

-----Original Message-----
From: Sharma, Nishit <[email protected]>
Sent: Tuesday, November 25, 2025 8:07 PM
To: Gurram, Pravalika <[email protected]>; igt- [email protected]; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm:
Add SVM
multi-GPU atomic operations

Can be done but we are checking atomic operation in multi-GPU scenarios,
so idea was whether all GPUs performing atomic operation correctly and data
can be read from CPU. GPU1 write - GPU2 read implemented in other subtests.

Quoted 4 lines
Quoted 2 lines

Nishit

Okay, if that is the case, it will be good if we mention " testing GPU -> CPU coherency."

I think if the test doesn't have any GPU <-> GPU interaction we could essentially rely on the other atomic test which exercises simultaneous atomic operation. This test would essentially otherwise be two standalone single-GPU tests and should be covered in other igts, so I suggest skipping this test except for the atomic batch buffer setup that could be added to patch 8? Thoughts?

Thomas

Quoted 339 lines

--Pravalika

Quoted 336 lines

-----Original Message-----
From: Gurram, Pravalika <[email protected]>
Sent: Tuesday, November 25, 2025 8:01 PM
To: Sharma, Nishit <[email protected]>; igt- [email protected]; Sharma, Nishit <[email protected]>;
Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm:
Add SVM
multi-GPU atomic operations

tests/intel/xe_multi_gpusvm.c typedef void (*gpu_pair_fn)(struct

Quoted 71 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of
[email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM
multi-GPU atomic operations

From: Nishit Sharma <[email protected]>

This test performs atomic increment operation on a shared SVM buffer
from both GPUs and the CPU in a multi-GPU environment. It uses madvise
and prefetch to control buffer placement and verifies correctness and
ordering of atomic updates across agents.

---
 tests/intel/xe_multi_gpusvm.c | 162
+++++++++++++++++++++++++++++++++-

 1 file changed, 160 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c index 471be6449..4e817edf9 100644

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -33,6 +33,17 @@
   * Description:
   *	Test cross-GPU memory access with prefetch in multi-GPU

SVM
configuration
  *
+ * SUBTEST: mgpu-atomic-op-basic
+ * Description:
+ * Test basic cross-GPU atomic increment operations in
multi-GPU SVM
configuration
+ * operation on GPU1 and then atomic operation on GPU2
using same
+ * address
+ *
+ * SUBTEST: mgpu-atomic-op-prefetch
+ * Description:
+ * Tests cross-GPU atomic increment operations with
explicit memory
prefetch
+ * to validate SVM atomic operations in multi-GPU config
+ *
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -42,10 +53,12 @@
  #define BIND_SYNC_VAL 0x686868
  #define EXEC_SYNC_VAL 0x676767
  #define COPY_SIZE SZ_64M
+#define	ATOMIC_OP_VAL	56
 
  #define MULTIGPU_BASIC			BIT(0)
  #define MULTIGPU_PREFETCH		BIT(1)
  #define MULTIGPU_XGPU_ACCESS		BIT(2)
+#define MULTIGPU_ATOMIC_OP		BIT(3)
 
  struct xe_svm_gpu_info {
  	bool supports_faults;
@@ -60,6 +73,16 @@ typedef void (*gpu_pair_fn)(struct

xe_svm_gpu_info

Quoted 133 lines
tests/intel/xe_multi_gpusvm.c +0 -0
 *src,

      struct drm_xe_engine_class_instance *eci,
      unsigned int flags);

tests/intel/xe_multi_gpusvm.c +10 -0
+struct test_exec_data {
+	uint32_t batch[32];
+	uint64_t pad;
+	uint64_t vm_sync;
+	uint64_t exec_sync;
+	uint32_t data;
+	uint32_t expected_data;
+	uint64_t batch_addr;
+};
+

 static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci, @@ -
71,7 +94,10 @@ static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
     struct drm_xe_engine_class_instance *eci,
     unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -1
-static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+static void gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +1 -0
+				   unsigned int flags);

 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci, @@ -162,6 +188,35 @@ static void
for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus, }
 }

tests/intel/xe_multi_gpusvm.c +14 -0
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		  uint32_t *bo, uint64_t *addr)
+{
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c +10 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+
+	cmd[i++] = MI_ATOMIC | MI_ATOMIC_INC;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo

*/

tests/intel/xe_multi_gpusvm.c +1 -0
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c +4 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+

 static void batch_init(int fd, uint32_t vm, uint64_t src_addr, uint64_t dst_addr, uint64_t copy_size, uint32_t *bo, uint64_t *addr) @@ -318,6 +373,93 @@
copy_src_dst(struct xe_svm_gpu_info *gpu1, cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);  }

tests/intel/xe_multi_gpusvm.c +35 -0
+static void
+atomic_inc_op(struct xe_svm_gpu_info *gpu1,
+	      struct xe_svm_gpu_info *gpu2,
+	      struct drm_xe_engine_class_instance *eci,
+	      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = ATOMIC_OP_VAL - 1;
+
+	atomic_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],
+&batch_addr[0]);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K,

&sync,

tests/intel/xe_multi_gpusvm.c +10 -0
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* Executing ATOMIC_INC on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0],

&sync, 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c copy_src_dst(struct xe_svm_gpu_info *gpu1, · line 427

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL);

This test only doing
GPU0 writes -> CPU reads
GPU1 writes -> CPU reads
GPUs NEVER communicate with each other
Only tests GPU -> CPU coherency
Missing GPU <-> GPU coherency

am thinking if we do below operation it will be good. GPU0 writes -> GPU1 READS what GPU0 wrote -> (GPU-to-GPU) GPU1 writes -> GPU0 READS what GPU1 wrote -> (GPU-to-GPU) This test GPU-to-GPU shared memory

-Pravalika
@Hellstrom, Thomas is my understanding is correct?

Quoted 58 lines
tests/intel/xe_multi_gpusvm.c +7 -0
+
+	atomic_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1],
+&batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K,

&sync,

tests/intel/xe_multi_gpusvm.c +10 -0
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* Execute ATOMIC_INC on GPU2 */
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1],

&sync, 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[1],

tests/intel/xe_multi_gpusvm.c +13 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL + 1);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]); }
+

 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, struct xe_svm_gpu_info *dst, @@ -330,6 +472,18 @@
gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, copy_src_dst(src, dst, eci, flags);
 }

tests/intel/xe_multi_gpusvm.c +11 -0
+static void
+gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	atomic_inc_op(src, dst, eci, flags); }
+
Quoted 4 lines

 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci, @@ - 337,6 +491,8

@@

Quoted 3 lines

test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,  { if (flags & MULTIGPU_XGPU_ACCESS) for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper,

Quoted 10 lines

flags);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (flags & MULTIGPU_ATOMIC_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_atomic_inc_wrapper, flags);
 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -357,6 +513,8 @@ igt_main
  	const struct section msections[] = {

  { "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

Quoted 1 line

  { "xgpu-access-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_XGPU_ACCESS

Quoted 21 lines

},

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "atomic-op-basic", MULTIGPU_BASIC |

MULTIGPU_ATOMIC_OP },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "atomic-op-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_ATOMIC_OP },
  { NULL },
  };

tests/intel/xe_multi_gpusvm.c +1 -1
@@ -380,7 +538,7 @@ igt_main
  		}
  	}
 
-	igt_describe("gpu-gpu write-read");
+	igt_describe("multigpu svm operations");
  	for (const struct section *s = msections; s->name; s++)
 {
  		igt_subtest_f("mgpu-%s", s->name)

  test_mgpu_exec(gpu_cnt, gpus, &eci, s-

Quoted 1 line

flags);

--
2.48.1

#19 lore raw

Re: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

Hi Thomas, Pravallika,

I think let's not skip the test but add like GPU1 done atomic operation  (Already doing), Read from GPU2 and perform Atomic operation and read from GPU1 as initially Pravlikka suggested.

Any inputs,

Nishit

Quoted 374 lines · Thomas

Hi, Nishit, Pravalika

Quoted 18 lines · Pravalika
Quoted 18 lines

-----Original Message-----
From: Sharma, Nishit <[email protected]>
Sent: Tuesday, November 25, 2025 8:07 PM
To: Gurram, Pravalika <[email protected]>; igt- [email protected]; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm:
Add SVM
multi-GPU atomic operations

Can be done but we are checking atomic operation in multi-GPU scenarios,
so idea was whether all GPUs performing atomic operation correctly and data
can be read from CPU. GPU1 write - GPU2 read implemented in other subtests.

Quoted 4 lines
Quoted 2 lines

Nishit

Okay, if that is the case, it will be good if we mention " testing GPU -> CPU coherency."

I think if the test doesn't have any GPU <-> GPU interaction we could essentially rely on the other atomic test which exercises simultaneous atomic operation. This test would essentially otherwise be two standalone single-GPU tests and should be covered in other igts, so I suggest skipping this test except for the atomic batch buffer setup that could be added to patch 8? Thoughts?

Thomas

Quoted 337 lines

--Pravalika

Quoted 336 lines

-----Original Message-----
From: Gurram, Pravalika <[email protected]>
Sent: Tuesday, November 25, 2025 8:01 PM
To: Sharma, Nishit <[email protected]>; igt- [email protected]; Sharma, Nishit <[email protected]>;
Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm:
Add SVM
multi-GPU atomic operations

tests/intel/xe_multi_gpusvm.c typedef void (*gpu_pair_fn)(struct

Quoted 71 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of
[email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM
multi-GPU atomic operations

From: Nishit Sharma <[email protected]>

This test performs atomic increment operation on a shared SVM buffer
from both GPUs and the CPU in a multi-GPU environment. It uses madvise
and prefetch to control buffer placement and verifies correctness and
ordering of atomic updates across agents.

---
  tests/intel/xe_multi_gpusvm.c | 162
+++++++++++++++++++++++++++++++++-
  1 file changed, 160 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c index 471be6449..4e817edf9 100644

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -33,6 +33,17 @@
   * Description:
   *	Test cross-GPU memory access with prefetch in multi-GPU

SVM
configuration
  *
+ * SUBTEST: mgpu-atomic-op-basic
+ * Description:
+ * Test basic cross-GPU atomic increment operations in
multi-GPU SVM
configuration
+ * operation on GPU1 and then atomic operation on GPU2
using same
+ * address
+ *
+ * SUBTEST: mgpu-atomic-op-prefetch
+ * Description:
+ * Tests cross-GPU atomic increment operations with
explicit memory
prefetch
+ * to validate SVM atomic operations in multi-GPU config
+ *
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -42,10 +53,12 @@
  #define BIND_SYNC_VAL 0x686868
  #define EXEC_SYNC_VAL 0x676767
  #define COPY_SIZE SZ_64M
+#define	ATOMIC_OP_VAL	56
 
  #define MULTIGPU_BASIC			BIT(0)
  #define MULTIGPU_PREFETCH		BIT(1)
  #define MULTIGPU_XGPU_ACCESS		BIT(2)
+#define MULTIGPU_ATOMIC_OP		BIT(3)
 
  struct xe_svm_gpu_info {
  	bool supports_faults;
@@ -60,6 +73,16 @@ typedef void (*gpu_pair_fn)(struct

xe_svm_gpu_info

Quoted 133 lines
tests/intel/xe_multi_gpusvm.c +10 -0
 *src,
  			    struct drm_xe_engine_class_instance
 *eci,
  			    unsigned int flags);
 
+struct test_exec_data {
+	uint32_t batch[32];
+	uint64_t pad;
+	uint64_t vm_sync;
+	uint64_t exec_sync;
+	uint32_t data;
+	uint32_t expected_data;
+	uint64_t batch_addr;
+};
+
  static void for_each_gpu_pair(int num_gpus,

        struct xe_svm_gpu_info *gpus, struct
drm_xe_engine_class_instance *eci, @@ -
71,7 +94,10 @@ static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
     struct
drm_xe_engine_class_instance *eci,
     unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -1
-static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+static void gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +1 -0
+				   unsigned int flags);
 
  static void
  create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct

drm_xe_engine_class_instance *eci, @@ -162,6 +188,35 @@ static void
for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus,
  }
 }

tests/intel/xe_multi_gpusvm.c +14 -0
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		  uint32_t *bo, uint64_t *addr)
+{
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c +10 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+
+	cmd[i++] = MI_ATOMIC | MI_ATOMIC_INC;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo

*/

tests/intel/xe_multi_gpusvm.c +1 -0
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c +5 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
  static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
  		       uint64_t dst_addr, uint64_t copy_size,
  		       uint32_t *bo, uint64_t *addr) @@ -318,6
+373,93 @@

copy_src_dst(struct xe_svm_gpu_info *gpu1,
  cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);  }

tests/intel/xe_multi_gpusvm.c +35 -0
+static void
+atomic_inc_op(struct xe_svm_gpu_info *gpu1,
+	      struct xe_svm_gpu_info *gpu2,
+	      struct drm_xe_engine_class_instance *eci,
+	      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = ATOMIC_OP_VAL - 1;
+
+	atomic_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],
+&batch_addr[0]);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K,

&sync,

tests/intel/xe_multi_gpusvm.c +10 -0
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* Executing ATOMIC_INC on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0],

&sync, 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c copy_src_dst(struct xe_svm_gpu_info *gpu1, · line 427

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL);

This test only doing
GPU0 writes -> CPU reads
GPU1 writes -> CPU reads
GPUs NEVER communicate with each other
Only tests GPU -> CPU coherency
Missing GPU <-> GPU coherency

am thinking if we do below operation it will be good. GPU0 writes -> GPU1 READS what GPU0 wrote -> (GPU-to-GPU) GPU1 writes -> GPU0 READS what GPU1 wrote -> (GPU-to-GPU) This test GPU-to-GPU shared memory

-Pravalika
@Hellstrom, Thomas is my understanding is correct?

Quoted 61 lines
tests/intel/xe_multi_gpusvm.c +7 -0
+
+	atomic_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1],
+&batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K,

&sync,

tests/intel/xe_multi_gpusvm.c +10 -0
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* Execute ATOMIC_INC on GPU2 */
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1],

&sync, 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[1],

tests/intel/xe_multi_gpusvm.c +14 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL + 1);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]); }
+
  static void
  gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
  		       struct xe_svm_gpu_info *dst, @@ -330,6
+472,18 @@

gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
  copy_src_dst(src, dst, eci, flags); }

tests/intel/xe_multi_gpusvm.c +11 -0
+static void
+gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	atomic_inc_op(src, dst, eci, flags); }
+
  static void
  test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
  	       struct drm_xe_engine_class_instance *eci, @@ -
Quoted 1 line

337,6 +491,8

@@

Quoted 3 lines

test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,  {
  if (flags & MULTIGPU_XGPU_ACCESS) for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper,

tests/intel/xe_multi_gpusvm.c igt_main · line 514

Quoted 10 lines

flags);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (flags & MULTIGPU_ATOMIC_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_atomic_inc_wrapper, flags);
 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -357,6 +513,8 @@ igt_main
  	const struct section msections[] = {
  		{ "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

tests/intel/xe_multi_gpusvm.c igt_main · line 515

Quoted 1 line
tests/intel/xe_multi_gpusvm.c +0 -0
  		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_XGPU_ACCESS

Quoted 21 lines
tests/intel/xe_multi_gpusvm.c +2 -0
 },
+		{ "atomic-op-basic", MULTIGPU_BASIC |
 MULTIGPU_ATOMIC_OP },
+		{ "atomic-op-prefetch", MULTIGPU_PREFETCH |
 MULTIGPU_ATOMIC_OP },

  { NULL },
  };

tests/intel/xe_multi_gpusvm.c +1 -1
@@ -380,7 +538,7 @@ igt_main
  		}
  	}
 
-	igt_describe("gpu-gpu write-read");
+	igt_describe("multigpu svm operations");
  	for (const struct section *s = msections; s->name; s++)
 {
  		igt_subtest_f("mgpu-%s", s->name)

  test_mgpu_exec(gpu_cnt, gpus, &eci, s-

Quoted 1 line

flags);

--
2.48.1

#20 lore raw

Re: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

Quoted 8 lines · Nishit

Hi Thomas, Pravallika,

I think let's not skip the test but add like GPU1 done atomic operation
(Already doing), Read from GPU2 and perform Atomic operation and read from GPU1 as initially Pravlikka suggested.

Any inputs,

Works fine with me as well.
Thanks,
Thomas

Quoted 425 lines

Nishit

Quoted 420 lines · Thomas

Hi, Nishit, Pravalika

Quoted 21 lines · Pravalika
Quoted 21 lines

-----Original Message-----
From: Sharma, Nishit <[email protected]>
Sent: Tuesday, November 25, 2025 8:07 PM
To: Gurram, Pravalika <[email protected]>; igt- [email protected]; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm:
Add SVM
multi-GPU atomic operations

Can be done but we are checking atomic operation in multi-GPU scenarios,
so idea was whether all GPUs performing atomic operation correctly
and data
can be read from CPU. GPU1 write - GPU2 read implemented in other
subtests.

Quoted 5 lines
Quoted 2 lines

Nishit

Okay, if that is the case, it will be good if we mention " testing
GPU -> CPU coherency."

I think if the test doesn't have any GPU <-> GPU interaction we could
essentially rely on the other atomic test which exercises simultaneous
atomic operation. This test would essentially otherwise be two standalone single-GPU tests and should be covered in other igts, so I
suggest skipping this test except for the atomic batch buffer setup that could be added to patch 8? Thoughts?

Thomas

Quoted 376 lines

--Pravalika

Quoted 375 lines

-----Original Message-----
From: Gurram, Pravalika <[email protected]>
Sent: Tuesday, November 25, 2025 8:01 PM
To: Sharma, Nishit <[email protected]>; igt- [email protected]; Sharma, Nishit <[email protected]>;
Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm:
Add SVM
multi-GPU atomic operations

tests/intel/xe_multi_gpusvm.c typedef void (*gpu_pair_fn)(struct

Quoted 78 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf
Of
[email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm:
Add
SVM
multi-GPU atomic operations

From: Nishit Sharma <[email protected]>

This test performs atomic increment operation on a shared SVM buffer
from both GPUs and the CPU in a multi-GPU environment. It uses
madvise
and prefetch to control buffer placement and verifies correctness
and
ordering of atomic updates across agents.

---
  tests/intel/xe_multi_gpusvm.c | 162
+++++++++++++++++++++++++++++++++-

  1 file changed, 160 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c index 471be6449..4e817edf9 100644

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -33,6 +33,17 @@
    * Description:
    *	Test cross-GPU memory access with prefetch in multi-

GPU
SVM
configuration
   *
+ * SUBTEST: mgpu-atomic-op-basic
+ * Description:
+ * Test basic cross-GPU atomic increment operations in
multi-GPU SVM
configuration
+ * operation on GPU1 and then atomic operation on GPU2
using same
+ * address
+ *
+ * SUBTEST: mgpu-atomic-op-prefetch
+ * Description:
+ * Tests cross-GPU atomic increment operations with
explicit memory
prefetch
+ * to validate SVM atomic operations in multi-GPU
config
+ *
   */

  #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -42,10 +53,12 @@
   #define BIND_SYNC_VAL 0x686868
   #define EXEC_SYNC_VAL 0x676767
   #define COPY_SIZE SZ_64M
+#define	ATOMIC_OP_VAL	56
 
   #define MULTIGPU_BASIC			BIT(0)
   #define MULTIGPU_PREFETCH		BIT(1)
   #define MULTIGPU_XGPU_ACCESS		BIT(2)
+#define MULTIGPU_ATOMIC_OP		BIT(3)
 
   struct xe_svm_gpu_info {
   	bool supports_faults;
@@ -60,6 +73,16 @@ typedef void (*gpu_pair_fn)(struct

xe_svm_gpu_info

Quoted 150 lines
tests/intel/xe_multi_gpusvm.c +0 -0
 *src,

       struct
drm_xe_engine_class_instance
*eci,
       unsigned int flags);

tests/intel/xe_multi_gpusvm.c +10 -0
+struct test_exec_data {
+	uint32_t batch[32];
+	uint64_t pad;
+	uint64_t vm_sync;
+	uint64_t exec_sync;
+	uint32_t data;
+	uint32_t expected_data;
+	uint64_t batch_addr;
+};
+

  static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci, @@ -
71,7 +94,10 @@ static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
      struct drm_xe_engine_class_instance *eci,
      unsigned int flags);

-static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+static void gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,

tests/intel/xe_multi_gpusvm.c +1 -0
+				   struct xe_svm_gpu_info

*dst,

tests/intel/xe_multi_gpusvm.c +1 -0
+				   struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +1 -0
+				   unsigned int flags);

  static void
  create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci, @@ -162,6 +188,35 @@ static
void
for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus, }
  }

+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);

tests/intel/xe_multi_gpusvm.c +13 -0
+
+static void
+atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		  uint32_t *bo, uint64_t *addr)
+{
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c +10 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+
+	cmd[i++] = MI_ATOMIC | MI_ATOMIC_INC;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the

batch_bo
*/

tests/intel/xe_multi_gpusvm.c +1 -0
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c +4 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+

  static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
          uint64_t dst_addr, uint64_t copy_size,
          uint32_t *bo, uint64_t *addr) @@ - 318,6
+373,93 @@
copy_src_dst(struct xe_svm_gpu_info *gpu1, cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);  }

tests/intel/xe_multi_gpusvm.c +20 -0
+static void
+atomic_inc_op(struct xe_svm_gpu_info *gpu1,
+	      struct xe_svm_gpu_info *gpu2,
+	      struct drm_xe_engine_class_instance *eci,
+	      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0],

&exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +1 -0
+	create_vm_and_queue(gpu2, eci, &vm[1],

&exec_queue[1]);

tests/intel/xe_multi_gpusvm.c +9 -0
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = ATOMIC_OP_VAL - 1;
+
+	atomic_batch_init(gpu1->fd, vm[0], addr,

&batch_bo[0],
+&batch_addr[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			   

DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,

tests/intel/xe_multi_gpusvm.c +1 -0
+			    gpu1->fd, 0, gpu1-
Quoted 1 line

vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K,

&sync,

tests/intel/xe_multi_gpusvm.c +1 -0
+			     sync_addr, exec_queue[0],

flags);

tests/intel/xe_multi_gpusvm.c +9 -0
+	free((void *)sync_addr);
+
+	/* Executing ATOMIC_INC on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0],

&sync, 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t

*)sync_addr,
EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c copy_src_dst(struct xe_svm_gpu_info *gpu1, · line 427

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL);

This test only doing
GPU0 writes -> CPU reads
GPU1 writes -> CPU reads
GPUs NEVER communicate with each other
Only tests GPU -> CPU coherency
Missing GPU <-> GPU coherency

am thinking if we do below operation it will be good. GPU0 writes -> GPU1 READS what GPU0 wrote -> (GPU-to-GPU) GPU1 writes -> GPU0 READS what GPU1 wrote -> (GPU-to-GPU) This test
GPU-to-GPU shared memory

-Pravalika
@Hellstrom, Thomas is my understanding is correct?

Quoted 67 lines
tests/intel/xe_multi_gpusvm.c +2 -0
+
+	atomic_batch_init(gpu2->fd, vm[1], addr,

&batch_bo[1],
+&batch_addr[1]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			   

DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,

tests/intel/xe_multi_gpusvm.c +1 -0
+			    gpu2->fd, 0, gpu2-
Quoted 1 line

vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K,

&sync,

tests/intel/xe_multi_gpusvm.c +1 -0
+			     sync_addr, exec_queue[1],

flags);

tests/intel/xe_multi_gpusvm.c +9 -0
+	free((void *)sync_addr);
+
+	/* Execute ATOMIC_INC on GPU2 */
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1],

&sync, 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t

*)sync_addr,
EXEC_SYNC_VAL, exec_queue[1],

tests/intel/xe_multi_gpusvm.c +7 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL + 1);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0],

batch_addr[0]);

tests/intel/xe_multi_gpusvm.c +1 -0
+	batch_fini(gpu2->fd, vm[1], batch_bo[1],

batch_addr[1]);

tests/intel/xe_multi_gpusvm.c +5 -0
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]); }
+

  static void
  gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, struct xe_svm_gpu_info *dst, @@ - 330,6
+472,18 @@
gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, copy_src_dst(src, dst, eci, flags);
  }

tests/intel/xe_multi_gpusvm.c +4 -0
+static void
+gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance

*eci,

tests/intel/xe_multi_gpusvm.c +7 -0
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	atomic_inc_op(src, dst, eci, flags); }
+
Quoted 5 lines

  static void
  test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci, @@ -
337,6 +491,8

@@

Quoted 3 lines

test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,  { if (flags & MULTIGPU_XGPU_ACCESS) for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper,

Quoted 10 lines

flags);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (flags & MULTIGPU_ATOMIC_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_atomic_inc_wrapper, flags);
  }

  struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -357,6 +513,8 @@ igt_main
   	const struct section msections[] = {

   { "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

Quoted 2 lines

   { "xgpu-access-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_XGPU_ACCESS

Quoted 23 lines

},

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "atomic-op-basic", MULTIGPU_BASIC |

MULTIGPU_ATOMIC_OP },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "atomic-op-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_ATOMIC_OP },
   { NULL },
   };

tests/intel/xe_multi_gpusvm.c +1 -1
@@ -380,7 +538,7 @@ igt_main
   		}
   	}
 
-	igt_describe("gpu-gpu write-read");
+	igt_describe("multigpu svm operations");
   	for (const struct section *s = msections; s->name;
 s++)
 {

   igt_subtest_f("mgpu-%s", s->name) test_mgpu_exec(gpu_cnt, gpus, &eci, s-

Quoted 1 line

flags);

--
2.48.1

#21 lore raw

RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

In reply to Hellstrom, Thomas

Comments incorporated. Now the sequence is GPU1-Write (1st Atomic Op), GPU2-Read, GPU2-Write (2nd Atomic Op), GPU1-Read.

Nishit

-----Original Message-----
From: Hellstrom, Thomas <[email protected]>
Sent: Wednesday, November 26, 2025 4:16 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Gurram, Pravalika <[email protected]>
Subject: Re: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

Hi, Nishit, Pravalika

Quoted 17 lines · Pravalika
Quoted 17 lines

-----Original Message-----
From: Sharma, Nishit <[email protected]>
Sent: Tuesday, November 25, 2025 8:07 PM
To: Gurram, Pravalika <[email protected]>; igt- [email protected]; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm:
Add SVM
multi-GPU atomic operations

Can be done but we are checking atomic operation in multi-GPU scenarios, so idea was whether all GPUs performing atomic operation correctly and data can be read from CPU. GPU1 write - GPU2 read implemented in other subtests.

Quoted 4 lines
Quoted 2 lines

Nishit

Okay, if that is the case, it will be good if we mention " testing GPU -> CPU coherency."

I think if the test doesn't have any GPU <-> GPU interaction we could essentially rely on the other atomic test which exercises simultaneous atomic operation. This test would essentially otherwise be two standalone single-GPU tests and should be covered in other igts, so I suggest skipping this test except for the atomic batch buffer setup that could be added to patch 8? Thoughts?

Thomas

Quoted 328 lines

--Pravalika

Quoted 325 lines

-----Original Message-----
From: Gurram, Pravalika <[email protected]>
Sent: Tuesday, November 25, 2025 8:01 PM
To: Sharma, Nishit <[email protected]>; igt- [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: RE: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm:
Add SVM
multi-GPU atomic operations

tests/intel/xe_multi_gpusvm.c typedef void (*gpu_pair_fn)(struct

Quoted 66 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of [email protected]
Sent: Friday, November 21, 2025 9:56 PM
To: [email protected]; Sharma, Nishit <[email protected]>; Hellstrom, Thomas <[email protected]>
Subject: [PATCH i-g-t v8 04/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations

From: Nishit Sharma <[email protected]>

This test performs atomic increment operation on a shared SVM buffer from both GPUs and the CPU in a multi-GPU environment. It uses madvise and prefetch to control buffer placement and verifies correctness and ordering of atomic updates across agents.

---
 tests/intel/xe_multi_gpusvm.c | 162
+++++++++++++++++++++++++++++++++-

 1 file changed, 160 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c index 471be6449..4e817edf9 100644

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -33,6 +33,17 @@
   * Description:
   *	Test cross-GPU memory access with prefetch in multi-GPU

SVM
configuration
  *
+ * SUBTEST: mgpu-atomic-op-basic
+ * Description:
+ * Test basic cross-GPU atomic increment operations in
multi-GPU SVM
configuration
+ * operation on GPU1 and then atomic operation on GPU2
using same
+ * address
+ *
+ * SUBTEST: mgpu-atomic-op-prefetch
+ * Description:
+ * Tests cross-GPU atomic increment operations with
explicit memory
prefetch
+ * to validate SVM atomic operations in multi-GPU config
+ *
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -42,10 +53,12 @@
  #define BIND_SYNC_VAL 0x686868
  #define EXEC_SYNC_VAL 0x676767
  #define COPY_SIZE SZ_64M
+#define	ATOMIC_OP_VAL	56
 
  #define MULTIGPU_BASIC			BIT(0)
  #define MULTIGPU_PREFETCH		BIT(1)
  #define MULTIGPU_XGPU_ACCESS		BIT(2)
+#define MULTIGPU_ATOMIC_OP		BIT(3)
 
  struct xe_svm_gpu_info {
  	bool supports_faults;
@@ -60,6 +73,16 @@ typedef void (*gpu_pair_fn)(struct

xe_svm_gpu_info

Quoted 130 lines
tests/intel/xe_multi_gpusvm.c +10 -0
 *src,
  			    struct drm_xe_engine_class_instance *eci,
  			    unsigned int flags);
 
+struct test_exec_data {
+	uint32_t batch[32];
+	uint64_t pad;
+	uint64_t vm_sync;
+	uint64_t exec_sync;
+	uint32_t data;
+	uint32_t expected_data;
+	uint64_t batch_addr;
+};
+
  static void for_each_gpu_pair(int num_gpus,
  			      struct xe_svm_gpu_info *gpus,

        struct drm_xe_engine_class_instance *eci, @@ -
71,7 +94,10 @@ static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
     struct drm_xe_engine_class_instance *eci,
     unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -1
-static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+static void gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +1 -0
+				   unsigned int flags);

 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci, @@ -162,6 +188,35 @@ static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus, }
 }

tests/intel/xe_multi_gpusvm.c +13 -0
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		  uint32_t *bo, uint64_t *addr) {
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c +10 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+
+	cmd[i++] = MI_ATOMIC | MI_ATOMIC_INC;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo

*/

tests/intel/xe_multi_gpusvm.c +1 -0
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c +4 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+

 static void batch_init(int fd, uint32_t vm, uint64_t src_addr, uint64_t dst_addr, uint64_t copy_size, uint32_t *bo, uint64_t *addr) @@ -318,6 +373,93 @@
copy_src_dst(struct xe_svm_gpu_info *gpu1, cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);  }

tests/intel/xe_multi_gpusvm.c +35 -0
+static void
+atomic_inc_op(struct xe_svm_gpu_info *gpu1,
+	      struct xe_svm_gpu_info *gpu2,
+	      struct drm_xe_engine_class_instance *eci,
+	      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = ATOMIC_OP_VAL - 1;
+
+	atomic_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0], 
+&batch_addr[0]);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K,

&sync,

tests/intel/xe_multi_gpusvm.c +10 -0
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* Executing ATOMIC_INC on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0],

&sync, 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c copy_src_dst(struct xe_svm_gpu_info *gpu1, · line 427

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL);

This test only doing
GPU0 writes -> CPU reads
GPU1 writes -> CPU reads
GPUs NEVER communicate with each other Only tests GPU -> CPU coherency Missing GPU <-> GPU coherency

am thinking if we do below operation it will be good. GPU0 writes -> GPU1 READS what GPU0 wrote -> (GPU-to-GPU) GPU1 writes -> GPU0 READS what GPU1 wrote -> (GPU-to-GPU) This test GPU-to-GPU shared memory

-Pravalika
@Hellstrom, Thomas is my understanding is correct?

Quoted 58 lines
tests/intel/xe_multi_gpusvm.c +7 -0
+
+	atomic_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1], 
+&batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K,

&sync,

tests/intel/xe_multi_gpusvm.c +10 -0
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* Execute ATOMIC_INC on GPU2 */
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1],

&sync, 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[1],

tests/intel/xe_multi_gpusvm.c +13 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)addr, ATOMIC_OP_VAL + 1);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]); }
+

 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, struct xe_svm_gpu_info *dst, @@ -330,6 +472,18 @@
gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, copy_src_dst(src, dst, eci, flags);
 }

tests/intel/xe_multi_gpusvm.c +11 -0
+static void
+gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	atomic_inc_op(src, dst, eci, flags); }
+
Quoted 4 lines

 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci, @@ - 337,6 +491,8

@@

Quoted 3 lines

test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,  { if (flags & MULTIGPU_XGPU_ACCESS) for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_mem_access_wrapper,

Quoted 10 lines

flags);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (flags & MULTIGPU_ATOMIC_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_atomic_inc_wrapper, flags);
 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -357,6 +513,8 @@ igt_main
  	const struct section msections[] = {

  { "xgpu-access-basic", MULTIGPU_BASIC |

MULTIGPU_XGPU_ACCESS },

Quoted 1 line

  { "xgpu-access-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_XGPU_ACCESS

Quoted 20 lines

},

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "atomic-op-basic", MULTIGPU_BASIC |

MULTIGPU_ATOMIC_OP },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "atomic-op-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_ATOMIC_OP },
  { NULL },
  };

tests/intel/xe_multi_gpusvm.c +1 -1
@@ -380,7 +538,7 @@ igt_main
  		}
  	}
 
-	igt_describe("gpu-gpu write-read");
+	igt_describe("multigpu svm operations");
  	for (const struct section *s = msections; s->name; s++) {
  		igt_subtest_f("mgpu-%s", s->name)

  test_mgpu_exec(gpu_cnt, gpus, &eci, s-

Quoted 1 line

flags);

--
2.48.1

#22 lore raw

PATCH v8 5/10 tests/intel/xe_multi_gpusvm: Add SVM multi-GPU coherency test

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This test verifies memory coherency in a multi-GPU environment using SVM. GPU 1 writes to a shared buffer, GPU 2 reads and checks for correct data without explicit synchronization, and the test is repeated with CPU and both GPUs to ensure consistent memory visibility across agents.

---
 tests/intel/xe_multi_gpusvm.c | 255 ++++++++++++++++++++++++++++++++++
 1 file changed, 255 insertions(+)
tests/intel/xe_multi_gpusvm.c +255 -0
index 4e817edf9..43a8e6f0b 100644
@@ -44,6 +44,26 @@
  *	Tests cross-GPU atomic increment operations with explicit memory prefetch
  *	to validate SVM atomic operations in multi-GPU config
  *
+ * SUBTEST: mgpu-coherency-basic
+ * Description:
+ *	Test basic cross-GPU memory coherency where one GPU writes data
+ *	and another GPU reads to verify coherent memory access without prefetch
+ *
+ * SUBTEST: mgpu-coherency-fail-basic
+ * Description:
+ *	Test concurrent write race conditions between GPUs to verify coherency
+ *	behavior when multiple GPUs write to the same memory location without prefetch
+ *
+ * SUBTEST: mgpu-coherency-prefetch
+ * Description:
+ *	Test cross-GPU memory coherency with explicit prefetch to validate
+ *	coherent memory access and migration across GPUs
+ *
+ * SUBTEST: mgpu-coherency-fail-prefetch
+ * Description:
+ *	Test concurrent write race conditions with prefetch to verify coherency
+ *	behavior and memory migration when multiple GPUs compete for same location
+ *
  */
 
 #define MAX_XE_REGIONS	8
@@ -59,6 +79,8 @@
 #define MULTIGPU_PREFETCH		BIT(1)
 #define MULTIGPU_XGPU_ACCESS		BIT(2)
 #define MULTIGPU_ATOMIC_OP		BIT(3)
+#define MULTIGPU_COH_OP			BIT(4)
+#define MULTIGPU_COH_FAIL		BIT(5)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -99,6 +121,11 @@ static void gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
 				   struct drm_xe_engine_class_instance *eci,
 				   unsigned int flags);
 
+static void gpu_coherecy_test_wrapper(struct xe_svm_gpu_info *src,
+				      struct xe_svm_gpu_info *dst,
+				      struct drm_xe_engine_class_instance *eci,
+				      unsigned int flags);
+
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
 		    uint32_t *vm, uint32_t *exec_queue)
@@ -217,6 +244,35 @@ atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
 	*addr = batch_addr;
 }
 
+static void
+store_dword_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		       uint32_t *bo, uint64_t *addr, int value)
+{
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size, vram_if_possible(fd, 0), 0);
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *) batch;
+
+	cmd[i++] = MI_STORE_DWORD_IMM_GEN4;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = value;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr, batch_bo_size, 0);
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
 static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
 		       uint64_t dst_addr, uint64_t copy_size,
 		       uint32_t *bo, uint64_t *addr)
@@ -460,6 +516,186 @@ atomic_inc_op(struct xe_svm_gpu_info *gpu1,
 	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
 }
 
+static void
+coherency_test_multigpu(struct xe_svm_gpu_info *gpu1,
+			struct xe_svm_gpu_info *gpu2,
+			struct drm_xe_engine_class_instance *eci,
+			unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2], batch1_bo[2];
+	uint64_t batch_addr[2], batch1_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+	int value = 60;
+	uint64_t *data1;
+	void *copy_dst;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data1 = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data1);
+	addr = to_user_pointer(data1);
+
+	copy_dst = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(copy_dst);
+
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0], &batch_addr[0], value);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* Execute STORE command on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[0],
+			       NSEC_PER_SEC * 10);
+
+	igt_debug("GPU1 wrote, add value: 0x%lx\n", *(uint64_t *)addr);
+
+	/* Creating batch for GPU2 using addr as Src which have value from GPU1 */
+	batch_init(gpu2->fd, vm[1], addr, to_user_pointer(copy_dst), SZ_4K,
+		   &batch_bo[1], &batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], to_user_pointer(copy_dst), SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0], exec_queue[1]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], to_user_pointer(copy_dst), SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* GPU2 copies from addr (GPU1's write) to copy_dst */
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[1],
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)copy_dst, value);
+
+	if (flags & MULTIGPU_COH_FAIL) {
+		struct drm_xe_sync sync0 = {}, sync1 = {}, sync_read = {};
+		uint32_t batch_read_bo;
+		uint64_t batch_read_addr;
+		uint64_t *result;
+		volatile uint64_t *sync_addr0, *sync_addr1, *sync_addr_read;
+
+		igt_info("verifying concurrent write race\n");
+
+		*(uint64_t *)addr = 0;
+
+		store_dword_batch_init(gpu1->fd, vm[0], addr, &batch1_bo[0],
+				       &batch1_addr[0], value + 10);
+		store_dword_batch_init(gpu2->fd, vm[1], addr, &batch1_bo[1],
+				       &batch1_addr[1], value + 20);
+
+		/* Setup sync for GPU1 */
+		sync_addr0 = (void *)((char *)batch1_addr[0] + SZ_4K);
+		sync0.flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync0.type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync0.addr = to_user_pointer((uint64_t *)sync_addr0);
+		sync0.timeline_value = EXEC_SYNC_VAL;
+		*sync_addr0 = 0;
+
+		/* Setup sync for GPU2 */
+		sync_addr1 = (void *)((char *)batch1_addr[1] + SZ_4K);
+		sync1.flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync1.type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync1.addr = to_user_pointer((uint64_t *)sync_addr1);
+		sync1.timeline_value = EXEC_SYNC_VAL;
+		*sync_addr1 = 0;
+
+		/* Launch both concurrently - no wait between them */
+		xe_exec_sync(gpu1->fd, exec_queue[0], batch1_addr[0], &sync0, 1);
+		xe_exec_sync(gpu2->fd, exec_queue[1], batch1_addr[1], &sync1, 1);
+
+		/* Wait for both ito complete */
+		if (*sync_addr0 != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr0, EXEC_SYNC_VAL,
+				       exec_queue[0], NSEC_PER_SEC * 10);
+		if (*sync_addr1 != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr1, EXEC_SYNC_VAL,
+				       exec_queue[1], NSEC_PER_SEC * 10);
+
+		/* Create result buffer for GPU to copy the final value */
+		result = aligned_alloc(SZ_2M, SZ_4K);
+		igt_assert(result);
+		*result = 0xDEADBEEF; // Initialize with known pattern
+
+		usleep(100000); // 100ms to let writes settle
+
+		/* Create a batch buffer that copies from addr to result */
+		batch_init(gpu2->fd, vm[1], addr, to_user_pointer(result),
+			   SZ_4K, &batch_read_bo, &batch_read_addr);
+
+		/* Setup sync for read operation */
+		sync_addr_read = (void *)((char *)batch_read_addr + SZ_4K);
+		sync_read.flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync_read.type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync_read.addr = to_user_pointer((uint64_t *)sync_addr_read);
+		sync_read.timeline_value = EXEC_SYNC_VAL;
+		*sync_addr_read = 0;
+
+		/* Execute the read/copy batch */
+		xe_exec_sync(gpu2->fd, exec_queue[1], batch_read_addr, &sync_read, 1);
+		if (*sync_addr_read != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr_read, EXEC_SYNC_VAL,
+				       exec_queue[1], NSEC_PER_SEC * 10);
+
+		/* Check which write won (or if we got a mix) */
+		if (*result == (value + 10))
+			igt_info("GPU1's write won the race\n");
+		else if (*result == (value + 20))
+			igt_info("GPU2's write won the race\n");
+		else if (*result == 0)
+			igt_warn("Both writes failed - coherency issue\n");
+		else
+			igt_warn("Unexpected value 0x%lx - possible coherency corruption\n",
+				 *result);
+
+		munmap((void *)batch1_addr[0], BATCH_SIZE(gpu1->fd));
+		munmap((void *)batch1_addr[1], BATCH_SIZE(gpu2->fd));
+
+		batch_fini(gpu1->fd, vm[0], batch1_bo[0], batch1_addr[0]);
+		batch_fini(gpu2->fd, vm[1], batch1_bo[1], batch1_addr[1]);
+		free(result);
+	}
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data1);
+	free(copy_dst);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst,
@@ -484,6 +720,18 @@ gpu_atomic_inc_wrapper(struct xe_svm_gpu_info *src,
 	atomic_inc_op(src, dst, eci, flags);
 }
 
+static void
+gpu_coherecy_test_wrapper(struct xe_svm_gpu_info *src,
+			  struct xe_svm_gpu_info *dst,
+			  struct drm_xe_engine_class_instance *eci,
+			  unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	coherency_test_multigpu(src, dst, eci, flags);
+}
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 	       struct drm_xe_engine_class_instance *eci,
@@ -493,6 +741,8 @@ test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_mem_access_wrapper, flags);
 	if (flags & MULTIGPU_ATOMIC_OP)
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_atomic_inc_wrapper, flags);
+	if (flags & MULTIGPU_COH_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_coherecy_test_wrapper, flags);
 }
 
 struct section {
@@ -515,6 +765,11 @@ igt_main
 		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_XGPU_ACCESS },
 		{ "atomic-op-basic", MULTIGPU_BASIC | MULTIGPU_ATOMIC_OP },
 		{ "atomic-op-prefetch", MULTIGPU_PREFETCH | MULTIGPU_ATOMIC_OP },
+		{ "coherency-basic", MULTIGPU_BASIC | MULTIGPU_COH_OP },
+		{ "coherency-fail-basic", MULTIGPU_BASIC | MULTIGPU_COH_OP | MULTIGPU_COH_FAIL },
+		{ "coherency-prefetch", MULTIGPU_PREFETCH | MULTIGPU_COH_OP },
+		{ "coherency-fail-prefetch",
+		  MULTIGPU_PREFETCH | MULTIGPU_COH_OP | MULTIGPU_COH_FAIL},
 		{ NULL },
 	};
 
Signature · 1 line
2.48.1
#23 lore raw

Re: [PATCH i-g-t v8 05/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU coherency test

Quoted 127 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test verifies memory coherency in a multi-GPU environment using SVM.
GPU 1 writes to a shared buffer, GPU 2 reads and checks for correct data
without explicit synchronization, and the test is repeated with CPU and
both GPUs to ensure consistent memory visibility across agents.

---
 tests/intel/xe_multi_gpusvm.c | 255
++++++++++++++++++++++++++++++++++

 1 file changed, 255 insertions(+)
tests/intel/xe_multi_gpusvm.c +0 -0
index 4e817edf9..43a8e6f0b 100644
@@ -44,6 +44,26 @@
   *	Tests cross-GPU atomic increment operations with explicit

memory prefetch
  * to validate SVM atomic operations in multi-GPU config
  *
+ * SUBTEST: mgpu-coherency-basic
+ * Description:
+ * Test basic cross-GPU memory coherency where one GPU writes
data
+ * and another GPU reads to verify coherent memory access
without prefetch
+ *
+ * SUBTEST: mgpu-coherency-fail-basic
+ * Description:
+ * Test concurrent write race conditions between GPUs to verify
coherency
+ * behavior when multiple GPUs write to the same memory
location without prefetch
+ *
+ * SUBTEST: mgpu-coherency-prefetch
+ * Description:
+ * Test cross-GPU memory coherency with explicit prefetch to
validate
+ * coherent memory access and migration across GPUs
+ *
+ * SUBTEST: mgpu-coherency-fail-prefetch
+ * Description:
+ * Test concurrent write race conditions with prefetch to
verify coherency
+ * behavior and memory migration when multiple GPUs compete for
same location
+ *
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -59,6 +79,8 @@
  #define MULTIGPU_PREFETCH		BIT(1)
  #define MULTIGPU_XGPU_ACCESS		BIT(2)
  #define MULTIGPU_ATOMIC_OP		BIT(3)
+#define MULTIGPU_COH_OP			BIT(4)
+#define MULTIGPU_COH_FAIL		BIT(5)


 struct xe_svm_gpu_info {
  bool supports_faults;

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -99,6 +121,11 @@ static void gpu_atomic_inc_wrapper(struct
 xe_svm_gpu_info *src,

     struct drm_xe_engine_class_instance *eci,
     unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -0
+static void gpu_coherecy_test_wrapper(struct xe_svm_gpu_info *src,
+				      struct xe_svm_gpu_info *dst,
+				      struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
+				      unsigned int flags);
+

 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
      uint32_t *vm, uint32_t *exec_queue)

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -217,6 +244,35 @@ atomic_batch_init(int fd, uint32_t vm, uint64_t
 src_addr,
  	*addr = batch_addr;
  }

tests/intel/xe_multi_gpusvm.c +12 -0
+static void
+store_dword_batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		       uint32_t *bo, uint64_t *addr, int value)
+{
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size,

vram_if_possible(fd, 0), 0);

tests/intel/xe_multi_gpusvm.c +13 -0
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *) batch;
+
+	cmd[i++] = MI_STORE_DWORD_IMM_GEN4;
+	cmd[i++] = src_addr;
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = value;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr,

batch_bo_size, 0);

tests/intel/xe_multi_gpusvm.c +4 -0
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+

 static void batch_init(int fd, uint32_t vm, uint64_t src_addr, uint64_t dst_addr, uint64_t copy_size, uint32_t *bo, uint64_t *addr)

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -460,6 +516,186 @@ atomic_inc_op(struct xe_svm_gpu_info *gpu1,
  	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
  }

tests/intel/xe_multi_gpusvm.c +3 -0
+static void
+coherency_test_multigpu(struct xe_svm_gpu_info *gpu1,
+			struct xe_svm_gpu_info *gpu2,

tests/intel/xe_multi_gpusvm.c atomic_inc_op(struct xe_svm_gpu_info *gpu1, · line 531

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c +10 -0
+			struct drm_xe_engine_class_instance *eci,
+			unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2], batch1_bo[2];
+	uint64_t batch_addr[2], batch1_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;

See previous reviews WRT volatile.

Quoted 45 lines
tests/intel/xe_multi_gpusvm.c +19 -0
+	int value = 60;
+	uint64_t *data1;
+	void *copy_dst;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data1 = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data1);
+	addr = to_user_pointer(data1);
+
+	copy_dst = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(copy_dst);
+
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],

&batch_addr[0], value);

tests/intel/xe_multi_gpusvm.c +4 -0
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +13 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* Execute STORE command on GPU1 */
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync,

1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_debug("GPU1 wrote, add value: 0x%lx\n", *(uint64_t
Quoted 1 line

*)addr);

Suggest skipping this to avoid migration to system. like previously discussed.

Also *addr accesses should use READ_ONCE() / WRITE_ONCE().

Quoted 30 lines
tests/intel/xe_multi_gpusvm.c +2 -0
+
+	/* Creating batch for GPU2 using addr as Src which have

value from GPU1 */

tests/intel/xe_multi_gpusvm.c +1 -0
+	batch_init(gpu2->fd, vm[1], addr, to_user_pointer(copy_dst),

SZ_4K,

tests/intel/xe_multi_gpusvm.c +3 -0
+		   &batch_bo[1], &batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1],

to_user_pointer(copy_dst), SZ_4K, 0,

tests/intel/xe_multi_gpusvm.c +2 -0
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[1]);

tests/intel/xe_multi_gpusvm.c +3 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1],

to_user_pointer(copy_dst), SZ_4K, &sync,

tests/intel/xe_multi_gpusvm.c +10 -0
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* GPU2 copies from addr (GPU1's write) to copy_dst */
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync,

1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[1],

tests/intel/xe_multi_gpusvm.c atomic_inc_op(struct xe_svm_gpu_info *gpu1, · line 598

Quoted 3 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	igt_assert_eq(*(uint64_t *)copy_dst, value);

READ_ONCE()

Quoted 67 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+
+	if (flags & MULTIGPU_COH_FAIL) {
+		struct drm_xe_sync sync0 = {}, sync1 = {}, sync_read

= {};

tests/intel/xe_multi_gpusvm.c +4 -0
+		uint32_t batch_read_bo;
+		uint64_t batch_read_addr;
+		uint64_t *result;
+		volatile uint64_t *sync_addr0, *sync_addr1,

*sync_addr_read;

tests/intel/xe_multi_gpusvm.c +6 -0
+
+		igt_info("verifying concurrent write race\n");
+
+		*(uint64_t *)addr = 0;
+
+		store_dword_batch_init(gpu1->fd, vm[0], addr,

&batch1_bo[0],

tests/intel/xe_multi_gpusvm.c +2 -0
+				       &batch1_addr[0], value + 10);
+		store_dword_batch_init(gpu2->fd, vm[1], addr,

&batch1_bo[1],

tests/intel/xe_multi_gpusvm.c +4 -0
+				       &batch1_addr[1], value + 20);
+
+		/* Setup sync for GPU1 */
+		sync_addr0 = (void *)((char *)batch1_addr[0] +

SZ_4K);

tests/intel/xe_multi_gpusvm.c +3 -0
+		sync0.flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync0.type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync0.addr = to_user_pointer((uint64_t

*)sync_addr0);

tests/intel/xe_multi_gpusvm.c +5 -0
+		sync0.timeline_value = EXEC_SYNC_VAL;
+		*sync_addr0 = 0;
+
+		/* Setup sync for GPU2 */
+		sync_addr1 = (void *)((char *)batch1_addr[1] +

SZ_4K);

tests/intel/xe_multi_gpusvm.c +3 -0
+		sync1.flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync1.type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync1.addr = to_user_pointer((uint64_t

*)sync_addr1);

tests/intel/xe_multi_gpusvm.c +4 -0
+		sync1.timeline_value = EXEC_SYNC_VAL;
+		*sync_addr1 = 0;
+
+		/* Launch both concurrently - no wait between them

*/

tests/intel/xe_multi_gpusvm.c +1 -0
+		xe_exec_sync(gpu1->fd, exec_queue[0],

batch1_addr[0], &sync0, 1);

tests/intel/xe_multi_gpusvm.c +1 -0
+		xe_exec_sync(gpu2->fd, exec_queue[1],

batch1_addr[1], &sync1, 1);

tests/intel/xe_multi_gpusvm.c +4 -0
+
+		/* Wait for both ito complete */
+		if (*sync_addr0 != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu1->fd, (uint64_t

*)sync_addr0, EXEC_SYNC_VAL,

tests/intel/xe_multi_gpusvm.c +1 -0
+				       exec_queue[0], NSEC_PER_SEC *

10);

tests/intel/xe_multi_gpusvm.c +2 -0
+		if (*sync_addr1 != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu2->fd, (uint64_t

*)sync_addr1, EXEC_SYNC_VAL,

tests/intel/xe_multi_gpusvm.c +1 -0
+				       exec_queue[1], NSEC_PER_SEC *

10);

tests/intel/xe_multi_gpusvm.c +2 -0
+
+		/* Create result buffer for GPU to copy the final

value */

tests/intel/xe_multi_gpusvm.c +3 -0
+		result = aligned_alloc(SZ_2M, SZ_4K);
 
 
+		igt_assert(result);
+		*result = 0xDEADBEEF; // Initialize with known
Quoted 2 lines

pattern
+

result also need to be accessed using READ / WRITE once.

tests/intel/xe_multi_gpusvm.c atomic_inc_op(struct xe_svm_gpu_info *gpu1, · line 649

Quoted 1 line
tests/intel/xe_multi_gpusvm.c +1 -0
+		usleep(100000); // 100ms to let writes settle

Why is this needed? Writes should have executed when the ufence signals.

Thanks,
Thomas

Quoted 117 lines
tests/intel/xe_multi_gpusvm.c +2 -0
+
+		/* Create a batch buffer that copies from addr to

result */

tests/intel/xe_multi_gpusvm.c +1 -0
+		batch_init(gpu2->fd, vm[1], addr,

to_user_pointer(result),

tests/intel/xe_multi_gpusvm.c +4 -0
+			   SZ_4K, &batch_read_bo, &batch_read_addr);
+
+		/* Setup sync for read operation */
+		sync_addr_read = (void *)((char *)batch_read_addr +

SZ_4K);

tests/intel/xe_multi_gpusvm.c +3 -0
+		sync_read.flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync_read.type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync_read.addr = to_user_pointer((uint64_t

*)sync_addr_read);

tests/intel/xe_multi_gpusvm.c +5 -0
+		sync_read.timeline_value = EXEC_SYNC_VAL;
+		*sync_addr_read = 0;
+
+		/* Execute the read/copy batch */
+		xe_exec_sync(gpu2->fd, exec_queue[1],

batch_read_addr, &sync_read, 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+		if (*sync_addr_read != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu2->fd, (uint64_t

*)sync_addr_read, EXEC_SYNC_VAL,

tests/intel/xe_multi_gpusvm.c +1 -0
+				       exec_queue[1], NSEC_PER_SEC *

10);

tests/intel/xe_multi_gpusvm.c +8 -0
+
+		/* Check which write won (or if we got a mix) */
+		if (*result == (value + 10))
+			igt_info("GPU1's write won the race\n");
+		else if (*result == (value + 20))
+			igt_info("GPU2's write won the race\n");
+		else if (*result == 0)
+			igt_warn("Both writes failed - coherency

issue\n");

tests/intel/xe_multi_gpusvm.c +2 -0
+		else
+			igt_warn("Unexpected value 0x%lx - possible

coherency corruption\n",

tests/intel/xe_multi_gpusvm.c +3 -0
+				 *result);
+
+		munmap((void *)batch1_addr[0], BATCH_SIZE(gpu1-
Quoted 1 line

fd));

tests/intel/xe_multi_gpusvm.c +1 -0
+		munmap((void *)batch1_addr[1], BATCH_SIZE(gpu2-
Quoted 1 line

fd));

tests/intel/xe_multi_gpusvm.c +2 -0
+
+		batch_fini(gpu1->fd, vm[0], batch1_bo[0],

batch1_addr[0]);

tests/intel/xe_multi_gpusvm.c +1 -0
+		batch_fini(gpu2->fd, vm[1], batch1_bo[1],

batch1_addr[1]);

tests/intel/xe_multi_gpusvm.c +14 -0
+		free(result);
+	}
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data1);
+	free(copy_dst);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+

 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, struct xe_svm_gpu_info *dst,

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -484,6 +720,18 @@ gpu_atomic_inc_wrapper(struct xe_svm_gpu_info
 *src,
  	atomic_inc_op(src, dst, eci, flags);
  }

tests/intel/xe_multi_gpusvm.c +12 -0
+static void
+gpu_coherecy_test_wrapper(struct xe_svm_gpu_info *src,
+			  struct xe_svm_gpu_info *dst,
+			  struct drm_xe_engine_class_instance *eci,
+			  unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	coherency_test_multigpu(src, dst, eci, flags);
+}
+

 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -493,6 +741,8 @@ test_mgpu_exec(int gpu_cnt, struct
 xe_svm_gpu_info *gpus,
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_mem_access_wrapper, flags);
  	if (flags & MULTIGPU_ATOMIC_OP)
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_atomic_inc_wrapper, flags);
+	if (flags & MULTIGPU_COH_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_coherecy_test_wrapper, flags);
 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -515,6 +765,11 @@ igt_main

  { "xgpu-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_XGPU_ACCESS },
  { "atomic-op-basic", MULTIGPU_BASIC | MULTIGPU_ATOMIC_OP },
  { "atomic-op-prefetch", MULTIGPU_PREFETCH | MULTIGPU_ATOMIC_OP },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "coherency-basic", MULTIGPU_BASIC |

MULTIGPU_COH_OP },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "coherency-fail-basic", MULTIGPU_BASIC |

MULTIGPU_COH_OP | MULTIGPU_COH_FAIL },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "coherency-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_COH_OP },

tests/intel/xe_multi_gpusvm.c +2 -0
+		{ "coherency-fail-prefetch",
+		  MULTIGPU_PREFETCH | MULTIGPU_COH_OP |

MULTIGPU_COH_FAIL},
  { NULL },
  };

#24 lore raw

PATCH v8 6/10 tests/intel/xe_multi_gpusvm: Add SVM multi-GPU performance test

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This test measures latency and bandwidth for buffer access from each GPU and the CPU in a multi-GPU SVM environment. It compares performance for local versus remote access using madvise and prefetch to control buffer placement

---
 tests/intel/xe_multi_gpusvm.c | 184 ++++++++++++++++++++++++++++++++++
 1 file changed, 184 insertions(+)
tests/intel/xe_multi_gpusvm.c +184 -0
index 43a8e6f0b..9701ba92c 100644
@@ -13,6 +13,8 @@
 #include "intel_mocs.h"
 #include "intel_reg.h"
 
+#include "time.h"
+
 #include "xe/xe_ioctl.h"
 #include "xe/xe_query.h"
 #include "xe/xe_util.h"
@@ -64,6 +66,26 @@
  *	Test concurrent write race conditions with prefetch to verify coherency
  *	behavior and memory migration when multiple GPUs compete for same location
  *
+ * SUBTEST: mgpu-latency-basic
+ * Description:
+ *	Measure basic cross-GPU memory access latency where one GPU writes
+ *	and another GPU reads without prefetch to evaluate remote access overhead
+ *
+ * SUBTEST: mgpu-latency-prefetch
+ * Description:
+ *	Measure cross-GPU memory access latency with explicit prefetch to
+ *	evaluate memory migration overhead and local access performance
+ *
+ * SUBTEST: mgpu-latency-copy-basic
+ * Description:
+ *	Measure latency of cross-GPU memory copy operations where one GPU
+ *	copies data from another GPU's memory without prefetch
+ *
+ * SUBTEST: mgpu-latency-copy-prefetch
+ * Description:
+ *	Measure latency of cross-GPU memory copy operations with prefetch
+ *	to evaluate copy performance with memory migration to local VRAM
+ *
  */
 
 #define MAX_XE_REGIONS	8
@@ -81,6 +103,8 @@
 #define MULTIGPU_ATOMIC_OP		BIT(3)
 #define MULTIGPU_COH_OP			BIT(4)
 #define MULTIGPU_COH_FAIL		BIT(5)
+#define MULTIGPU_PERF_OP		BIT(6)
+#define MULTIGPU_PERF_REM_COPY		BIT(7)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -126,6 +150,11 @@ static void gpu_coherecy_test_wrapper(struct xe_svm_gpu_info *src,
 				      struct drm_xe_engine_class_instance *eci,
 				      unsigned int flags);
 
+static void gpu_latency_test_wrapper(struct xe_svm_gpu_info *src,
+				     struct xe_svm_gpu_info *dst,
+				     struct drm_xe_engine_class_instance *eci,
+				     unsigned int flags);
+
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
 		    uint32_t *vm, uint32_t *exec_queue)
@@ -217,6 +246,11 @@ static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus,
 
 static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
 
+static double time_diff(struct timespec *start, struct timespec *end)
+{
+	return (end->tv_sec - start->tv_sec) + (end->tv_nsec - start->tv_nsec) / 1e9;
+}
+
 static void
 atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr,
 		  uint32_t *bo, uint64_t *addr)
@@ -696,6 +730,136 @@ coherency_test_multigpu(struct xe_svm_gpu_info *gpu1,
 	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
 }
 
+static void
+latency_test_multigpu(struct xe_svm_gpu_info *gpu1,
+		      struct xe_svm_gpu_info *gpu2,
+		      struct drm_xe_engine_class_instance *eci,
+		      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	uint8_t *copy_dst;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+	int value = 60;
+	struct test_exec_data *data;
+	struct timespec t_start, t_end;
+	double gpu1_latency, gpu2_latency;
+	double gpu1_bw, gpu2_bw;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	copy_dst = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(copy_dst);
+
+	/*** GPU1 writes at addr ***/
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0], &batch_addr[0], value);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* START TIMING: GPU1 execution */
+	clock_gettime(CLOCK_MONOTONIC, &t_start);
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[0],
+			       NSEC_PER_SEC * 10);
+
+	clock_gettime(CLOCK_MONOTONIC, &t_end);
+	/* END TIMING */
+
+	gpu1_latency = time_diff(&t_start, &t_end);
+	gpu1_bw = (SZ_4K / (gpu1_latency / 1e9)) / (1024.0 * 1024.0);
+
+	igt_info("GPU1 write: Latency %.3f us, Bandwidth %.2f MB/s\n",
+		 gpu1_latency / 1000.0, gpu1_bw);
+
+	igt_assert_eq(*(uint64_t *)addr, value);
+
+	*(uint64_t *)addr = 50;
+
+	if (flags & MULTIGPU_PERF_REM_COPY) {
+		batch_init(gpu2->fd, vm[1], addr, to_user_pointer(copy_dst),
+			   SZ_4K, &batch_bo[1], &batch_addr[1]);
+	} else {
+		store_dword_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1],
+				       &batch_addr[1], value + 10);
+	}
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0], exec_queue[1]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* START TIMING : GPU2 execution */
+	clock_gettime(CLOCK_MONOTONIC, &t_start);
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[1],
+			       NSEC_PER_SEC * 10);
+
+	clock_gettime(CLOCK_MONOTONIC, &t_end);
+	/* END TIMING */
+
+	gpu2_latency = time_diff(&t_start, &t_end);
+	gpu2_bw = (SZ_4K / (gpu2_latency / 1e9)) / (1024.0 * 1024.0);
+
+	igt_info("GPU2 %s copy: Latency %.3f us, Bandwidth %.2f MB/s\n",
+		 (flags & MULTIGPU_PERF_REM_COPY) ? "remote" : "local",
+		 gpu2_latency / 1000.0, gpu2_bw);
+
+	if (!(flags & MULTIGPU_PERF_REM_COPY))
+		igt_assert_eq(*(uint64_t *)addr, value + 10);
+	else
+		igt_assert_eq(*(uint64_t *)copy_dst, 50);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+	free(copy_dst);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst,
@@ -732,6 +896,18 @@ gpu_coherecy_test_wrapper(struct xe_svm_gpu_info *src,
 	coherency_test_multigpu(src, dst, eci, flags);
 }
 
+static void
+gpu_latency_test_wrapper(struct xe_svm_gpu_info *src,
+			 struct xe_svm_gpu_info *dst,
+			 struct drm_xe_engine_class_instance *eci,
+			 unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	latency_test_multigpu(src, dst, eci, flags);
+}
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 	       struct drm_xe_engine_class_instance *eci,
@@ -743,6 +919,8 @@ test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_atomic_inc_wrapper, flags);
 	if (flags & MULTIGPU_COH_OP)
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_coherecy_test_wrapper, flags);
+	if (flags & MULTIGPU_PERF_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_latency_test_wrapper, flags);
 }
 
 struct section {
@@ -770,6 +948,12 @@ igt_main
 		{ "coherency-prefetch", MULTIGPU_PREFETCH | MULTIGPU_COH_OP },
 		{ "coherency-fail-prefetch",
 		  MULTIGPU_PREFETCH | MULTIGPU_COH_OP | MULTIGPU_COH_FAIL},
+		{ "latency-basic", MULTIGPU_BASIC | MULTIGPU_PERF_OP },
+		{ "latency-copy-basic",
+		  MULTIGPU_BASIC | MULTIGPU_PERF_OP | MULTIGPU_PERF_REM_COPY },
+		{ "latency-prefetch", MULTIGPU_PREFETCH | MULTIGPU_PERF_OP },
+		{ "latency-copy-prefetch",
+		  MULTIGPU_PREFETCH | MULTIGPU_PERF_OP | MULTIGPU_PERF_REM_COPY },
 		{ NULL },
 	};
 
Signature · 1 line
2.48.1
#25 lore raw

Re: [PATCH i-g-t v8 06/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU performance test

Quoted 184 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test measures latency and bandwidth for buffer access from each GPU
and the CPU in a multi-GPU SVM environment. It compares performance for
local versus remote access using madvise and prefetch to control buffer
placement

---
 tests/intel/xe_multi_gpusvm.c | 184
++++++++++++++++++++++++++++++++++

 1 file changed, 184 insertions(+)
tests/intel/xe_multi_gpusvm.c +0 -0
index 43a8e6f0b..9701ba92c 100644
@@ -13,6 +13,8 @@
  #include "intel_mocs.h"
  #include "intel_reg.h"

tests/intel/xe_multi_gpusvm.c +2 -0
+#include "time.h"
+

 #include "xe/xe_ioctl.h"
 #include "xe/xe_query.h"
 #include "xe/xe_util.h"

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -64,6 +66,26 @@
   *	Test concurrent write race conditions with prefetch to

verify coherency
  * behavior and memory migration when multiple GPUs compete for
same location
  *
+ * SUBTEST: mgpu-latency-basic
+ * Description:
+ * Measure basic cross-GPU memory access latency where one GPU
writes
+ * and another GPU reads without prefetch to evaluate remote
access overhead
+ *
+ * SUBTEST: mgpu-latency-prefetch
+ * Description:
+ * Measure cross-GPU memory access latency with explicit
prefetch to
+ * evaluate memory migration overhead and local access
performance
+ *
+ * SUBTEST: mgpu-latency-copy-basic
+ * Description:
+ * Measure latency of cross-GPU memory copy operations where
one GPU
+ * copies data from another GPU's memory without prefetch
+ *
+ * SUBTEST: mgpu-latency-copy-prefetch
+ * Description:
+ * Measure latency of cross-GPU memory copy operations with
prefetch
+ * to evaluate copy performance with memory migration to local
VRAM
+ *
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -81,6 +103,8 @@
  #define MULTIGPU_ATOMIC_OP		BIT(3)
  #define MULTIGPU_COH_OP			BIT(4)
  #define MULTIGPU_COH_FAIL		BIT(5)
+#define MULTIGPU_PERF_OP		BIT(6)
+#define MULTIGPU_PERF_REM_COPY		BIT(7)


 struct xe_svm_gpu_info {
  bool supports_faults;

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -126,6 +150,11 @@ static void gpu_coherecy_test_wrapper(struct
 xe_svm_gpu_info *src,

        struct drm_xe_engine_class_instance *eci,
        unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -0
+static void gpu_latency_test_wrapper(struct xe_svm_gpu_info *src,
+				     struct xe_svm_gpu_info *dst,
+				     struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
+				     unsigned int flags);
+

 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
      uint32_t *vm, uint32_t *exec_queue)

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -217,6 +246,11 @@ static void for_each_gpu_pair(int num_gpus,
 struct xe_svm_gpu_info *gpus,


 static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+static double time_diff(struct timespec *start, struct timespec *end)

tests/intel/xe_multi_gpusvm.c +2 -0
+{
+	return (end->tv_sec - start->tv_sec) + (end->tv_nsec -

start->tv_nsec) / 1e9;

tests/intel/xe_multi_gpusvm.c +2 -0
+}
+

 static void
 atomic_batch_init(int fd, uint32_t vm, uint64_t src_addr, uint32_t *bo, uint64_t *addr)

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -696,6 +730,136 @@ coherency_test_multigpu(struct xe_svm_gpu_info
 *gpu1,
  	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
  }

tests/intel/xe_multi_gpusvm.c +37 -0
+static void
+latency_test_multigpu(struct xe_svm_gpu_info *gpu1,
+		      struct xe_svm_gpu_info *gpu2,
+		      struct drm_xe_engine_class_instance *eci,
+		      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	uint8_t *copy_dst;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+	int value = 60;
+	struct test_exec_data *data;
+	struct timespec t_start, t_end;
+	double gpu1_latency, gpu2_latency;
+	double gpu1_bw, gpu2_bw;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	copy_dst = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(copy_dst);
+
+	/*** GPU1 writes at addr ***/
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],

&batch_addr[0], value);

tests/intel/xe_multi_gpusvm.c +4 -0
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +15 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* START TIMING: GPU1 execution */
+	clock_gettime(CLOCK_MONOTONIC, &t_start);
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync,

1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c +7 -0
+			       NSEC_PER_SEC * 10);
+
+	clock_gettime(CLOCK_MONOTONIC, &t_end);
+	/* END TIMING */
+
+	gpu1_latency = time_diff(&t_start, &t_end);
+	gpu1_bw = (SZ_4K / (gpu1_latency / 1e9)) / (1024.0 *

1024.0);

tests/intel/xe_multi_gpusvm.c +2 -0
+
+	igt_info("GPU1 write: Latency %.3f us, Bandwidth %.2f

MB/s\n",

tests/intel/xe_multi_gpusvm.c coherency_test_multigpu(struct xe_svm_gpu_info *gpu1, · line 800

Quoted 1 line
tests/intel/xe_multi_gpusvm.c +1 -0
+		 gpu1_latency / 1000.0, gpu1_bw);

So the GPU operation here is only a dword, but the migration would be 4K. But OTOH migration is already done if prefetching. Hence the bandwidth figure means different things depending on the test. Could that be clarified somehow?

tests/intel/xe_multi_gpusvm.c

Quoted 2 lines
tests/intel/xe_multi_gpusvm.c +2 -0
+
+	igt_assert_eq(*(uint64_t *)addr, value);

This migrates back to system, making the tests two single-gpu tests.

tests/intel/xe_multi_gpusvm.c

Quoted 12 lines
tests/intel/xe_multi_gpusvm.c +5 -0
+
+	*(uint64_t *)addr = 50;
+
+	if (flags & MULTIGPU_PERF_REM_COPY) {
+		batch_init(gpu2->fd, vm[1], addr,

to_user_pointer(copy_dst),

tests/intel/xe_multi_gpusvm.c +3 -0
+			   SZ_4K, &batch_bo[1], &batch_addr[1]);
+	} else {
+		store_dword_batch_init(gpu2->fd, vm[1], addr,

&batch_bo[1],

tests/intel/xe_multi_gpusvm.c +2 -0
+				       &batch_addr[1], value + 10);
+	}

What does remote mean here? It seems like with REM copy, we're using gpu2 to read from system / gpu1 memory and then write to gpu2 memory. But without we're just storing a value in gpu2 memory, also making the test decoupled to two single-gpu tests.

Quoted 37 lines
tests/intel/xe_multi_gpusvm.c +4 -0
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[1]);

tests/intel/xe_multi_gpusvm.c +15 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* START TIMING : GPU2 execution */
+	clock_gettime(CLOCK_MONOTONIC, &t_start);
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync,

1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[1],

tests/intel/xe_multi_gpusvm.c +7 -0
+			       NSEC_PER_SEC * 10);
+
+	clock_gettime(CLOCK_MONOTONIC, &t_end);
+	/* END TIMING */
+
+	gpu2_latency = time_diff(&t_start, &t_end);
+	gpu2_bw = (SZ_4K / (gpu2_latency / 1e9)) / (1024.0 *

1024.0);

tests/intel/xe_multi_gpusvm.c +2 -0
+
+	igt_info("GPU2 %s copy: Latency %.3f us, Bandwidth %.2f

MB/s\n",

tests/intel/xe_multi_gpusvm.c +1 -0
+		 (flags & MULTIGPU_PERF_REM_COPY) ? "remote" :

"local",

tests/intel/xe_multi_gpusvm.c coherency_test_multigpu(struct xe_svm_gpu_info *gpu1, · line 844

Quoted 1 line
tests/intel/xe_multi_gpusvm.c +1 -0
+		 gpu2_latency / 1000.0, gpu2_bw);

... But this doesn's seem consistent with what's written here. Also same comment as above WRT the bandwidth.

Quoted 73 lines
tests/intel/xe_multi_gpusvm.c +18 -0
+
+	if (!(flags & MULTIGPU_PERF_REM_COPY))
+		igt_assert_eq(*(uint64_t *)addr, value + 10);
+	else
+		igt_assert_eq(*(uint64_t *)copy_dst, 50);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+	free(copy_dst);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+

 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, struct xe_svm_gpu_info *dst,

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -732,6 +896,18 @@ gpu_coherecy_test_wrapper(struct xe_svm_gpu_info
 *src,
  	coherency_test_multigpu(src, dst, eci, flags);
  }

tests/intel/xe_multi_gpusvm.c +12 -0
+static void
+gpu_latency_test_wrapper(struct xe_svm_gpu_info *src,
+			 struct xe_svm_gpu_info *dst,
+			 struct drm_xe_engine_class_instance *eci,
+			 unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	latency_test_multigpu(src, dst, eci, flags);
+}
+

 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -743,6 +919,8 @@ test_mgpu_exec(int gpu_cnt, struct
 xe_svm_gpu_info *gpus,
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_atomic_inc_wrapper, flags);
  	if (flags & MULTIGPU_COH_OP)
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_coherecy_test_wrapper, flags);
+	if (flags & MULTIGPU_PERF_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_latency_test_wrapper, flags);
 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -770,6 +948,12 @@ igt_main

  { "coherency-prefetch", MULTIGPU_PREFETCH | MULTIGPU_COH_OP },
  { "coherency-fail-prefetch", MULTIGPU_PREFETCH | MULTIGPU_COH_OP | MULTIGPU_COH_FAIL},

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "latency-basic", MULTIGPU_BASIC | MULTIGPU_PERF_OP

},

tests/intel/xe_multi_gpusvm.c +2 -0
+		{ "latency-copy-basic",
+		  MULTIGPU_BASIC | MULTIGPU_PERF_OP |

MULTIGPU_PERF_REM_COPY },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "latency-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_PERF_OP },

tests/intel/xe_multi_gpusvm.c +2 -0
+		{ "latency-copy-prefetch",
+		  MULTIGPU_PREFETCH | MULTIGPU_PERF_OP |

MULTIGPU_PERF_REM_COPY },
  { NULL },
  };

#26 lore raw

PATCH v8 7/10 tests/intel/xe_multi_gpusvm: Add SVM multi-GPU fault handling test

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This test intentionally triggers page faults by accessing regions without prefetch for both GPUs in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 176 ++++++++++++++++++++++++++++++++++
 1 file changed, 176 insertions(+)
tests/intel/xe_multi_gpusvm.c +176 -0
index 9701ba92c..2f3caa8e7 100644
@@ -15,6 +15,7 @@
 
 #include "time.h"
 
+#include "xe/xe_gt.h"
 #include "xe/xe_ioctl.h"
 #include "xe/xe_query.h"
 #include "xe/xe_util.h"
@@ -86,6 +87,17 @@
  *	Measure latency of cross-GPU memory copy operations with prefetch
  *	to evaluate copy performance with memory migration to local VRAM
  *
+ * SUBTEST: mgpu-pagefault-basic
+ * Description:
+ *	Test cross-GPU page fault handling where one GPU writes to memory
+ *	and another GPU reads, triggering page faults without prefetch to
+ *	validate on-demand page migration across GPUs
+ *
+ * SUBTEST: mgpu-pagefault-prefetch
+ * Description:
+ *	Test cross-GPU memory access with prefetch to verify page fault
+ *	suppression when memory is pre-migrated to target GPU's VRAM
+ *
  */
 
 #define MAX_XE_REGIONS	8
@@ -105,6 +117,7 @@
 #define MULTIGPU_COH_FAIL		BIT(5)
 #define MULTIGPU_PERF_OP		BIT(6)
 #define MULTIGPU_PERF_REM_COPY		BIT(7)
+#define MULTIGPU_PFAULT_OP		BIT(8)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -155,6 +168,11 @@ static void gpu_latency_test_wrapper(struct xe_svm_gpu_info *src,
 				     struct drm_xe_engine_class_instance *eci,
 				     unsigned int flags);
 
+static void gpu_fault_test_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
+
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
 		    uint32_t *vm, uint32_t *exec_queue)
@@ -860,6 +878,148 @@ latency_test_multigpu(struct xe_svm_gpu_info *gpu1,
 	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
 }
 
+static void
+pagefault_test_multigpu(struct xe_svm_gpu_info *gpu1,
+			struct xe_svm_gpu_info *gpu2,
+			struct drm_xe_engine_class_instance *eci,
+			unsigned int flags)
+{
+	uint64_t addr;
+	uint64_t addr1;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+	int value = 60;
+	void *data, *verify_result;
+	const char *pf_count_stat = "svm_pagefault_count";
+	int pf_count_gpu1_before, pf_count_gpu1_after;
+	int pf_count_gpu2_before, pf_count_gpu2_after;
+	bool prefetch_req = flags & MULTIGPU_PREFETCH;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	memset(data, 0, SZ_4K);
+	addr = to_user_pointer(data);
+
+	/* Allocate verification buffer for GPU2 to copy into */
+	verify_result = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(verify_result);
+	addr1 = to_user_pointer(verify_result);
+
+	/* === Phase 1: GPU1 writes to addr === */
+	pf_count_gpu1_before = xe_gt_stats_get_count(gpu1->fd, eci->gt_id, pf_count_stat);
+
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0], &batch_addr[0], value);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* GPU1 writes */
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[0],
+			       NSEC_PER_SEC * 10);
+
+	pf_count_gpu1_after = xe_gt_stats_get_count(gpu1->fd, eci->gt_id, pf_count_stat);
+
+	if (prefetch_req) {
+		/* With prefetch: expect NO page faults */
+		igt_assert_eq(pf_count_gpu1_after, pf_count_gpu1_before);
+		igt_info("GPU1 write with prefetch: No page faults (as expected)\n");
+	} else {
+		/* Without prefetch: expect page faults */
+		igt_warn_on_f(pf_count_gpu1_after > pf_count_gpu1_before,
+			      "%d page faults generated on GPU1\n",
+			      pf_count_gpu1_after - pf_count_gpu1_before);
+		igt_info("GPU1 write without prefetch: %d page faults\n",
+			 pf_count_gpu1_after - pf_count_gpu1_before);
+	}
+
+	igt_debug("GPU1 wrote :%#llx\n", (unsigned long long)*(uint64_t *)addr);
+
+	/* === Phase 2: GPU2 reads from addr (cross-GPU access) === */
+	pf_count_gpu2_before = xe_gt_stats_get_count(gpu2->fd, eci->gt_id, pf_count_stat);
+
+	/* Create batch for GPU2 to copy from addr (GPU1's memory) to verify_result */
+	batch_init(gpu2->fd, vm[1], addr, addr1,
+		   SZ_4K, &batch_bo[1], &batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0], exec_queue[1]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* Also prefetch destination buffer */
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr1, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* GPU2 reads from GPU1's memory */
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL,
+			       exec_queue[1], NSEC_PER_SEC * 10);
+
+	pf_count_gpu2_after = xe_gt_stats_get_count(gpu2->fd, eci->gt_id, pf_count_stat);
+
+	if (prefetch_req) {
+		/* With prefetch: expect NO page faults on GPU2 */
+		igt_assert_eq(pf_count_gpu2_after, pf_count_gpu2_before);
+		igt_info("GPU2 cross-GPU read with prefetch: No page faults (as expected)\n");
+	} else {
+		/* Without prefetch: expect cross-GPU page faults */
+		igt_warn_on_f(pf_count_gpu2_after > pf_count_gpu2_before,
+			      "%d page faults generated on GPU2\n",
+			      pf_count_gpu2_after - pf_count_gpu2_before);
+		igt_info("GPU2 cross-GPU read without prefetch: %d page faults\n",
+			 pf_count_gpu2_after - pf_count_gpu2_before);
+	}
+
+	/* NOW CPU can safely read verify_result (not addr!) */
+	igt_assert_eq(*(uint64_t *)verify_result, value);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[0]);
+	free(data);
+	free(verify_result);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst,
@@ -908,6 +1068,18 @@ gpu_latency_test_wrapper(struct xe_svm_gpu_info *src,
 	latency_test_multigpu(src, dst, eci, flags);
 }
 
+static void
+gpu_fault_test_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	pagefault_test_multigpu(src, dst, eci, flags);
+}
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 	       struct drm_xe_engine_class_instance *eci,
@@ -921,6 +1093,8 @@ test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_coherecy_test_wrapper, flags);
 	if (flags & MULTIGPU_PERF_OP)
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_latency_test_wrapper, flags);
+	if (flags & MULTIGPU_PFAULT_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_fault_test_wrapper, flags);
 }
 
 struct section {
@@ -954,6 +1128,8 @@ igt_main
 		{ "latency-prefetch", MULTIGPU_PREFETCH | MULTIGPU_PERF_OP },
 		{ "latency-copy-prefetch",
 		  MULTIGPU_PREFETCH | MULTIGPU_PERF_OP | MULTIGPU_PERF_REM_COPY },
+		{ "pagefault-basic", MULTIGPU_BASIC | MULTIGPU_PFAULT_OP },
+		{ "pagefault-prefetch", MULTIGPU_PREFETCH | MULTIGPU_PFAULT_OP },
 		{ NULL },
 	};
 
Signature · 1 line
2.48.1
#27 lore raw

Re: [PATCH i-g-t v8 07/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU fault handling test

Quoted 168 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test intentionally triggers page faults by accessing regions without
prefetch for both GPUs in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 176
++++++++++++++++++++++++++++++++++

 1 file changed, 176 insertions(+)
tests/intel/xe_multi_gpusvm.c +0 -0
index 9701ba92c..2f3caa8e7 100644
@@ -15,6 +15,7 @@


 #include "time.h"

+#include "xe/xe_gt.h"
 #include "xe/xe_ioctl.h"
 #include "xe/xe_query.h"
 #include "xe/xe_util.h"

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -86,6 +87,17 @@
   *	Measure latency of cross-GPU memory copy operations with

prefetch
  * to evaluate copy performance with memory migration to local
VRAM
  *
+ * SUBTEST: mgpu-pagefault-basic
+ * Description:
+ * Test cross-GPU page fault handling where one GPU writes to
memory
+ * and another GPU reads, triggering page faults without
prefetch to
+ * validate on-demand page migration across GPUs
+ *
+ * SUBTEST: mgpu-pagefault-prefetch
+ * Description:
+ * Test cross-GPU memory access with prefetch to verify page
fault
+ * suppression when memory is pre-migrated to target GPU's VRAM
+ *
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +1 -0
@@ -105,6 +117,7 @@
  #define MULTIGPU_COH_FAIL		BIT(5)
  #define MULTIGPU_PERF_OP		BIT(6)
  #define MULTIGPU_PERF_REM_COPY		BIT(7)
+#define MULTIGPU_PFAULT_OP		BIT(8)


 struct xe_svm_gpu_info {
  bool supports_faults;

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -155,6 +168,11 @@ static void gpu_latency_test_wrapper(struct
 xe_svm_gpu_info *src,

       struct drm_xe_engine_class_instance *eci,
       unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -0
+static void gpu_fault_test_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
+				   unsigned int flags);
+

 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
      uint32_t *vm, uint32_t *exec_queue)

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -860,6 +878,148 @@ latency_test_multigpu(struct xe_svm_gpu_info
 *gpu1,
  	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
  }

tests/intel/xe_multi_gpusvm.c +40 -0
+static void
+pagefault_test_multigpu(struct xe_svm_gpu_info *gpu1,
+			struct xe_svm_gpu_info *gpu2,
+			struct drm_xe_engine_class_instance *eci,
+			unsigned int flags)
+{
+	uint64_t addr;
+	uint64_t addr1;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+	int value = 60;
+	void *data, *verify_result;
+	const char *pf_count_stat = "svm_pagefault_count";
+	int pf_count_gpu1_before, pf_count_gpu1_after;
+	int pf_count_gpu2_before, pf_count_gpu2_after;
+	bool prefetch_req = flags & MULTIGPU_PREFETCH;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	memset(data, 0, SZ_4K);
+	addr = to_user_pointer(data);
+
+	/* Allocate verification buffer for GPU2 to copy into */
+	verify_result = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(verify_result);
+	addr1 = to_user_pointer(verify_result);
+
+	/* === Phase 1: GPU1 writes to addr === */
+	pf_count_gpu1_before = xe_gt_stats_get_count(gpu1->fd, eci-
Quoted 1 line

gt_id, pf_count_stat);

tests/intel/xe_multi_gpusvm.c +2 -0
+
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],

&batch_addr[0], value);

tests/intel/xe_multi_gpusvm.c +4 -0
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +13 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* GPU1 writes */
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync,

1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	pf_count_gpu1_after = xe_gt_stats_get_count(gpu1->fd, eci-
Quoted 1 line

gt_id, pf_count_stat);

tests/intel/xe_multi_gpusvm.c +4 -0
+
+	if (prefetch_req) {
+		/* With prefetch: expect NO page faults */
+		igt_assert_eq(pf_count_gpu1_after,

pf_count_gpu1_before);

tests/intel/xe_multi_gpusvm.c +1 -0
+		igt_info("GPU1 write with prefetch: No page faults

(as expected)\n");

tests/intel/xe_multi_gpusvm.c +3 -0
+	} else {
+		/* Without prefetch: expect page faults */
+		igt_warn_on_f(pf_count_gpu1_after >

pf_count_gpu1_before,

tests/intel/xe_multi_gpusvm.c +2 -0
+			      "%d page faults generated on GPU1\n",
+			      pf_count_gpu1_after -

pf_count_gpu1_before);

tests/intel/xe_multi_gpusvm.c +1 -0
+		igt_info("GPU1 write without prefetch: %d page

faults\n",

tests/intel/xe_multi_gpusvm.c +1 -0
+			 pf_count_gpu1_after -

pf_count_gpu1_before);

tests/intel/xe_multi_gpusvm.c +3 -0
+	}
+
+	igt_debug("GPU1 wrote :%#llx\n", (unsigned long
Quoted 1 line

long)*(uint64_t *)addr);

addr needs READ/WRITE once. Also this read migrates to system and decouples the tests.

Quoted 60 lines
tests/intel/xe_multi_gpusvm.c +2 -0
+
+	/* === Phase 2: GPU2 reads from addr (cross-GPU access) ===

*/

tests/intel/xe_multi_gpusvm.c +1 -0
+	pf_count_gpu2_before = xe_gt_stats_get_count(gpu2->fd, eci-
Quoted 1 line

gt_id, pf_count_stat);

tests/intel/xe_multi_gpusvm.c +2 -0
+
+	/* Create batch for GPU2 to copy from addr (GPU1's memory)

to verify_result */

tests/intel/xe_multi_gpusvm.c +6 -0
+	batch_init(gpu2->fd, vm[1], addr, addr1,
+		   SZ_4K, &batch_bo[1], &batch_addr[1]);
+
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[1]);

tests/intel/xe_multi_gpusvm.c +19 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* Also prefetch destination buffer */
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr1, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	/* GPU2 reads from GPU1's memory */
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync,

1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL,

tests/intel/xe_multi_gpusvm.c +3 -0
+			       exec_queue[1], NSEC_PER_SEC * 10);
+
+	pf_count_gpu2_after = xe_gt_stats_get_count(gpu2->fd, eci-
Quoted 1 line

gt_id, pf_count_stat);

tests/intel/xe_multi_gpusvm.c +4 -0
+
+	if (prefetch_req) {
+		/* With prefetch: expect NO page faults on GPU2 */
+		igt_assert_eq(pf_count_gpu2_after,

pf_count_gpu2_before);

tests/intel/xe_multi_gpusvm.c +1 -0
+		igt_info("GPU2 cross-GPU read with prefetch: No page

faults (as expected)\n");

tests/intel/xe_multi_gpusvm.c +3 -0
+	} else {
+		/* Without prefetch: expect cross-GPU page faults */
+		igt_warn_on_f(pf_count_gpu2_after >

pf_count_gpu2_before,

tests/intel/xe_multi_gpusvm.c +2 -0
+			      "%d page faults generated on GPU2\n",
+			      pf_count_gpu2_after -

pf_count_gpu2_before);

tests/intel/xe_multi_gpusvm.c +1 -0
+		igt_info("GPU2 cross-GPU read without prefetch: %d

page faults\n",

tests/intel/xe_multi_gpusvm.c +1 -0
+			 pf_count_gpu2_after -

pf_count_gpu2_before);

tests/intel/xe_multi_gpusvm.c latency_test_multigpu(struct xe_svm_gpu_info *gpu1, · line 1010

Quoted 4 lines
tests/intel/xe_multi_gpusvm.c +4 -0
+	}
+
+	/* NOW CPU can safely read verify_result (not addr!) */
+	igt_assert_eq(*(uint64_t *)verify_result, value);

READ_ONCE()

Thanks,
Thomas

Quoted 61 lines
tests/intel/xe_multi_gpusvm.c +12 -0
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[0]);
+	free(data);
+	free(verify_result);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+

 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, struct xe_svm_gpu_info *dst,

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -908,6 +1068,18 @@ gpu_latency_test_wrapper(struct xe_svm_gpu_info
 *src,
  	latency_test_multigpu(src, dst, eci, flags);
  }

tests/intel/xe_multi_gpusvm.c +12 -0
+static void
+gpu_fault_test_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	pagefault_test_multigpu(src, dst, eci, flags);
+}
+

 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -921,6 +1093,8 @@ test_mgpu_exec(int gpu_cnt, struct
 xe_svm_gpu_info *gpus,
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_coherecy_test_wrapper, flags);
  	if (flags & MULTIGPU_PERF_OP)
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_latency_test_wrapper, flags);
+	if (flags & MULTIGPU_PFAULT_OP)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_fault_test_wrapper, flags);
 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -954,6 +1128,8 @@ igt_main

  { "latency-prefetch", MULTIGPU_PREFETCH | MULTIGPU_PERF_OP },
  { "latency-copy-prefetch", MULTIGPU_PREFETCH | MULTIGPU_PERF_OP | MULTIGPU_PERF_REM_COPY },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "pagefault-basic", MULTIGPU_BASIC |

MULTIGPU_PFAULT_OP },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "pagefault-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_PFAULT_OP },
  { NULL },
  };

#28 lore raw

PATCH v8 8/10 tests/intel/xe_multi_gpusvm: Add SVM multi-GPU simultaneous access test

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This test launches compute or copy workloads on both GPUs that access the same SVM buffer, using synchronization primitives (fences/semaphores) to coordinate access. It verifies data integrity and checks for the absence of race conditions in a multi-GPU SVM environment.

---
 tests/intel/xe_multi_gpusvm.c | 160 ++++++++++++++++++++++++++++++++++
 1 file changed, 160 insertions(+)
tests/intel/xe_multi_gpusvm.c +160 -0
index 2f3caa8e7..7f3c5e63c 100644
@@ -13,6 +13,7 @@
 #include "intel_mocs.h"
 #include "intel_reg.h"
 
+#include "intel_gpu_commands.h"
 #include "time.h"
 
 #include "xe/xe_gt.h"
@@ -98,6 +99,17 @@
  *	Test cross-GPU memory access with prefetch to verify page fault
  *	suppression when memory is pre-migrated to target GPU's VRAM
  *
+ * SUBTEST: mgpu-concurrent-access-basic
+ * Description:
+ *	Test concurrent atomic memory operations where multiple GPUs
+ *	simultaneously access and modify the same memory location without
+ *	prefetch to validate cross-GPU coherency and synchronization
+ *
+ * SUBTEST: mgpu-concurrent-access-prefetch
+ * Description:
+ *	Test concurrent atomic memory operations with prefetch where
+ *	multiple GPUs simultaneously access shared memory to validate
+ *	coherency with memory migration and local VRAM access
  */
 
 #define MAX_XE_REGIONS	8
@@ -118,6 +130,7 @@
 #define MULTIGPU_PERF_OP		BIT(6)
 #define MULTIGPU_PERF_REM_COPY		BIT(7)
 #define MULTIGPU_PFAULT_OP		BIT(8)
+#define MULTIGPU_CONC_ACCESS		BIT(9)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -173,6 +186,11 @@ static void gpu_fault_test_wrapper(struct xe_svm_gpu_info *src,
 				   struct drm_xe_engine_class_instance *eci,
 				   unsigned int flags);
 
+static void gpu_simult_test_wrapper(struct xe_svm_gpu_info *src,
+				    struct xe_svm_gpu_info *dst,
+				    struct drm_xe_engine_class_instance *eci,
+				    unsigned int flags);
+
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
 		    uint32_t *vm, uint32_t *exec_queue)
@@ -1020,6 +1038,132 @@ pagefault_test_multigpu(struct xe_svm_gpu_info *gpu1,
 	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
 }
 
+static void
+multigpu_access_test(struct xe_svm_gpu_info *gpu1,
+		     struct xe_svm_gpu_info *gpu2,
+		     struct drm_xe_engine_class_instance *eci,
+		     unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync[2] = {};
+	volatile uint64_t *sync_addr[2];
+	uint32_t verify_batch_bo;
+	uint64_t verify_batch_addr;
+	uint64_t *verify_result;
+	uint32_t final_value;
+	const int num_iterations = 100;
+	uint64_t final_timeline;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = 0;
+
+	atomic_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0], &batch_addr[0]);
+	atomic_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1], &batch_addr[1]);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync[0], &sync_addr[0], BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync[0],
+			     sync_addr[0], exec_queue[0], flags);
+	free((void *)sync_addr[0]);
+
+	igt_info("Starting %d concurrent atomic increment iterations\n", num_iterations);
+	for (int i = 0; i < num_iterations; i++) {
+		sync_addr[0] = (void *)((char *)batch_addr[0] + SZ_4K);
+		sync[0].flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync[0].type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync[0].addr = to_user_pointer((uint64_t *)sync_addr[0]);
+		sync[0].timeline_value = EXEC_SYNC_VAL + i;
+		*sync_addr[0] = 0;
+
+		sync_addr[1] = (void *)((char *)batch_addr[1] + SZ_4K);
+		sync[1].flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync[1].type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync[1].addr = to_user_pointer((uint64_t *)sync_addr[1]);
+		sync[1].timeline_value = EXEC_SYNC_VAL + i;
+		*sync_addr[1] = 0;
+
+		/* === CONCURRENT EXECUTION: Launch both GPUs simultaneously === */
+		xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync[0], 1);
+		xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync[1], 1);
+	}
+
+	 /* NOW wait only for the last operations to complete */
+	final_timeline = EXEC_SYNC_VAL + num_iterations - 1;
+        if (*sync_addr[0] != final_timeline)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr[0], final_timeline,
+			       exec_queue[0], NSEC_PER_SEC * 30);
+
+        if (*sync_addr[1] != final_timeline)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr[1], final_timeline,
+			       exec_queue[1], NSEC_PER_SEC * 30);
+
+	igt_info("Both GPUs completed execution %#llx\n", (unsigned long long)*(uint64_t *)addr);
+
+	/* === Verification using GPU read (not CPU) === */
+	verify_result = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(verify_result);
+	memset(verify_result, 0xDE, SZ_4K);
+
+	/* Use GPU1 to read final value */
+	batch_init(gpu1->fd, vm[0], addr, to_user_pointer(verify_result),
+		   SZ_4K, &verify_batch_bo, &verify_batch_addr);
+
+	sync_addr[0] = (void *)((char *)verify_batch_addr + SZ_4K);
+	sync[0].addr = to_user_pointer((uint64_t *)sync_addr[0]);
+	sync[0].timeline_value = EXEC_SYNC_VAL;
+	sync[0].flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync[0].type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	*sync_addr[0] = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], verify_batch_addr, &sync[0], 1);
+	if (*sync_addr[0] != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr[0], EXEC_SYNC_VAL,
+			       exec_queue[0], NSEC_PER_SEC * 10);
+
+	/* NOW CPU can read verify_result */
+	final_value = *(uint32_t *)verify_result;
+
+	igt_info("GPU verification batch copied value: %u\n", final_value);
+	igt_info("CPU direct read shows: %u\n", (unsigned int)*(uint64_t *)addr);
+
+        /* Expected: 0 + (100 iterations * 2 GPUs) = 200 */
+        igt_assert_f((final_value == 200),
+		     "Expected %u value, got %u\n",
+		     200, final_value);
+
+	munmap((void *)verify_batch_addr, BATCH_SIZE(gpu1->fd));
+	batch_fini(gpu1->fd, vm[0], verify_batch_bo, verify_batch_addr);
+	free(verify_result);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst,
@@ -1080,6 +1224,18 @@ gpu_fault_test_wrapper(struct xe_svm_gpu_info *src,
 	pagefault_test_multigpu(src, dst, eci, flags);
 }
 
+static void
+gpu_simult_test_wrapper(struct xe_svm_gpu_info *src,
+			struct xe_svm_gpu_info *dst,
+			struct drm_xe_engine_class_instance *eci,
+			unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	multigpu_access_test(src, dst, eci, flags);
+}
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 	       struct drm_xe_engine_class_instance *eci,
@@ -1095,6 +1251,8 @@ test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_latency_test_wrapper, flags);
 	if (flags & MULTIGPU_PFAULT_OP)
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_fault_test_wrapper, flags);
+	if (flags & MULTIGPU_CONC_ACCESS)
+		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_simult_test_wrapper, flags);
 }
 
 struct section {
@@ -1130,6 +1288,8 @@ igt_main
 		  MULTIGPU_PREFETCH | MULTIGPU_PERF_OP | MULTIGPU_PERF_REM_COPY },
 		{ "pagefault-basic", MULTIGPU_BASIC | MULTIGPU_PFAULT_OP },
 		{ "pagefault-prefetch", MULTIGPU_PREFETCH | MULTIGPU_PFAULT_OP },
+		{ "concurrent-access-basic", MULTIGPU_BASIC | MULTIGPU_CONC_ACCESS },
+		{ "concurrent-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_CONC_ACCESS },
 		{ NULL },
 	};
 
Signature · 1 line
2.48.1
#29 lore raw

Re: [PATCH i-g-t v8 08/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU simultaneous access test

Quoted 83 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test launches compute or copy workloads on both GPUs that access the same
SVM buffer, using synchronization primitives (fences/semaphores) to coordinate
access. It verifies data integrity and checks for the absence of race conditions
in a multi-GPU SVM environment.

---
 tests/intel/xe_multi_gpusvm.c | 160
++++++++++++++++++++++++++++++++++

 1 file changed, 160 insertions(+)
tests/intel/xe_multi_gpusvm.c +0 -0
index 2f3caa8e7..7f3c5e63c 100644
@@ -13,6 +13,7 @@
  #include "intel_mocs.h"
  #include "intel_reg.h"


+#include "intel_gpu_commands.h"
 #include "time.h"

 #include "xe/xe_gt.h"

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -98,6 +99,17 @@
   *	Test cross-GPU memory access with prefetch to verify page

fault
  * suppression when memory is pre-migrated to target GPU's VRAM
  *
+ * SUBTEST: mgpu-concurrent-access-basic
+ * Description:
+ * Test concurrent atomic memory operations where multiple GPUs
+ * simultaneously access and modify the same memory location
without
+ * prefetch to validate cross-GPU coherency and synchronization
+ *
+ * SUBTEST: mgpu-concurrent-access-prefetch
+ * Description:
+ * Test concurrent atomic memory operations with prefetch where
+ * multiple GPUs simultaneously access shared memory to
validate
+ * coherency with memory migration and local VRAM access
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +1 -0
@@ -118,6 +130,7 @@
  #define MULTIGPU_PERF_OP		BIT(6)
  #define MULTIGPU_PERF_REM_COPY		BIT(7)
  #define MULTIGPU_PFAULT_OP		BIT(8)
+#define MULTIGPU_CONC_ACCESS		BIT(9)


 struct xe_svm_gpu_info {
  bool supports_faults;

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -173,6 +186,11 @@ static void gpu_fault_test_wrapper(struct
 xe_svm_gpu_info *src,

     struct drm_xe_engine_class_instance *eci,
     unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -0
+static void gpu_simult_test_wrapper(struct xe_svm_gpu_info *src,
+				    struct xe_svm_gpu_info *dst,
+				    struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
+				    unsigned int flags);
+

 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
      uint32_t *vm, uint32_t *exec_queue)

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1020,6 +1038,132 @@ pagefault_test_multigpu(struct
 xe_svm_gpu_info *gpu1,
  	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
  }

tests/intel/xe_multi_gpusvm.c +4 -0
+static void
+multigpu_access_test(struct xe_svm_gpu_info *gpu1,
+		     struct xe_svm_gpu_info *gpu2,
+		     struct drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c pagefault_test_multigpu(struct xe_svm_gpu_info *gpu1, · line 1054

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c +10 -0
+		     unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	struct test_exec_data *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync[2] = {};
+	volatile uint64_t *sync_addr[2];

Please see previous comment on "volatile", READ_ONCE() and WRITE_ONCE().

tests/intel/xe_multi_gpusvm.c pagefault_test_multigpu(struct xe_svm_gpu_info *gpu1, · line 1059

Quoted 5 lines
tests/intel/xe_multi_gpusvm.c +5 -0
+	uint32_t verify_batch_bo;
+	uint64_t verify_batch_addr;
+	uint64_t *verify_result;
+	uint32_t final_value;
+	const int num_iterations = 100;

Consider adding this as a #define. Also when looking at the KMD behaviour in this test, it is not always the case that 100 is enough to trigger p2p migrations. I think it would be beneficial to bump this to 200.

Quoted 5 lines
tests/intel/xe_multi_gpusvm.c +5 -0
+	uint64_t final_timeline;
+
+	/* Skip if either GPU doesn't support faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;

tests/intel/xe_multi_gpusvm.c pagefault_test_multigpu(struct xe_svm_gpu_info *gpu1, · line 1074

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c +10 -0
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	data[0].vm_sync = 0;
+	addr = to_user_pointer(data);
+
+	*(uint64_t *)addr = 0;

When accessing addr, you should also use READ_ONCE() or WRITE_ONCE() since addr is modified using GPU.

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c +2 -0
+
+	atomic_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],

&batch_addr[0]);

tests/intel/xe_multi_gpusvm.c +1 -0
+	atomic_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1],

&batch_addr[1]);

tests/intel/xe_multi_gpusvm.c +4 -0
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c pagefault_test_multigpu(struct xe_svm_gpu_info *gpu1, · line 1085

Quoted 4 lines
tests/intel/xe_multi_gpusvm.c +4 -0
+
+	setup_sync(&sync[0], &sync_addr[0], BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync[0],
+			     sync_addr[0], exec_queue[0], flags);

Should you madvise also for gpu2?
Also perhaps to be sure also madvise for GLOBAL atomics

Quoted 20 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+	free((void *)sync_addr[0]);
+
+	igt_info("Starting %d concurrent atomic increment

iterations\n", num_iterations);

tests/intel/xe_multi_gpusvm.c +2 -0
+	for (int i = 0; i < num_iterations; i++) {
+		sync_addr[0] = (void *)((char *)batch_addr[0] +

SZ_4K);

tests/intel/xe_multi_gpusvm.c +3 -0
+		sync[0].flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync[0].type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync[0].addr = to_user_pointer((uint64_t

*)sync_addr[0]);

tests/intel/xe_multi_gpusvm.c +4 -0
+		sync[0].timeline_value = EXEC_SYNC_VAL + i;
+		*sync_addr[0] = 0;
+
+		sync_addr[1] = (void *)((char *)batch_addr[1] +

SZ_4K);

tests/intel/xe_multi_gpusvm.c +3 -0
+		sync[1].flags = DRM_XE_SYNC_FLAG_SIGNAL;
+		sync[1].type = DRM_XE_SYNC_TYPE_USER_FENCE;
+		sync[1].addr = to_user_pointer((uint64_t

*)sync_addr[1]);

tests/intel/xe_multi_gpusvm.c pagefault_test_multigpu(struct xe_svm_gpu_info *gpu1, · line 1102

Quoted 2 lines
tests/intel/xe_multi_gpusvm.c +2 -0
+		sync[1].timeline_value = EXEC_SYNC_VAL + i;
+		*sync_addr[1] = 0;

You could set up the syncobjs *before* the loop. Since all submissions to an exec_queue are executed in serial, there is no point sending syncobjs other than to the last exec.

Quoted 7 lines
tests/intel/xe_multi_gpusvm.c +2 -0
+
+		/* === CONCURRENT EXECUTION: Launch both GPUs

simultaneously === */

tests/intel/xe_multi_gpusvm.c +1 -0
+		xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0],

&sync[0], 1);

tests/intel/xe_multi_gpusvm.c +1 -0
+		xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1],

&sync[1], 1);

Here, the last two parameters can be NULL, 0 unless it's the last iteration.

Quoted 15 lines
tests/intel/xe_multi_gpusvm.c +6 -0
+	}
+
+	 /* NOW wait only for the last operations to complete */
+	final_timeline = EXEC_SYNC_VAL + num_iterations - 1;
+        if (*sync_addr[0] != final_timeline)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr[0],

final_timeline,

tests/intel/xe_multi_gpusvm.c +4 -0
+			       exec_queue[0], NSEC_PER_SEC * 30);
+
+        if (*sync_addr[1] != final_timeline)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr[1],

final_timeline,

tests/intel/xe_multi_gpusvm.c +3 -0
+			       exec_queue[1], NSEC_PER_SEC * 30);
+
+	igt_info("Both GPUs completed execution %#llx\n", (unsigned
Quoted 1 line

long long)*(uint64_t *)addr);

Please use READ_ONCE() and the output is easier to read if not using
hex: %llu.

Quoted 32 lines
tests/intel/xe_multi_gpusvm.c +8 -0
+
+	/* === Verification using GPU read (not CPU) === */
+	verify_result = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(verify_result);
+	memset(verify_result, 0xDE, SZ_4K);
+
+	/* Use GPU1 to read final value */
+	batch_init(gpu1->fd, vm[0], addr,

to_user_pointer(verify_result),

tests/intel/xe_multi_gpusvm.c +10 -0
+		   SZ_4K, &verify_batch_bo, &verify_batch_addr);
+
+	sync_addr[0] = (void *)((char *)verify_batch_addr + SZ_4K);
+	sync[0].addr = to_user_pointer((uint64_t *)sync_addr[0]);
+	sync[0].timeline_value = EXEC_SYNC_VAL;
+	sync[0].flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync[0].type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	*sync_addr[0] = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], verify_batch_addr,

&sync[0], 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr[0] != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr[0],

EXEC_SYNC_VAL,

tests/intel/xe_multi_gpusvm.c +6 -0
+			       exec_queue[0], NSEC_PER_SEC * 10);
+
+	/* NOW CPU can read verify_result */
+	final_value = *(uint32_t *)verify_result;
+
+	igt_info("GPU verification batch copied value: %u\n",

final_value);

tests/intel/xe_multi_gpusvm.c +1 -0
+	igt_info("CPU direct read shows: %u\n", (unsigned

int)*(uint64_t *)addr);

tests/intel/xe_multi_gpusvm.c pagefault_test_multigpu(struct xe_svm_gpu_info *gpu1, · line 1151

Quoted 5 lines
tests/intel/xe_multi_gpusvm.c +5 -0
+
+        /* Expected: 0 + (100 iterations * 2 GPUs) = 200 */
+        igt_assert_f((final_value == 200),
+		     "Expected %u value, got %u\n",
+		     200, final_value);

Please use num_iterations * 2 instead of hardcoding 200.

Quoted 62 lines
tests/intel/xe_multi_gpusvm.c +3 -0
+
+	munmap((void *)verify_batch_addr, BATCH_SIZE(gpu1->fd));
+	batch_fini(gpu1->fd, vm[0], verify_batch_bo,

verify_batch_addr);

tests/intel/xe_multi_gpusvm.c +12 -0
+	free(verify_result);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+

 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, struct xe_svm_gpu_info *dst,

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1080,6 +1224,18 @@ gpu_fault_test_wrapper(struct xe_svm_gpu_info
 *src,
  	pagefault_test_multigpu(src, dst, eci, flags);
  }

tests/intel/xe_multi_gpusvm.c +12 -0
+static void
+gpu_simult_test_wrapper(struct xe_svm_gpu_info *src,
+			struct xe_svm_gpu_info *dst,
+			struct drm_xe_engine_class_instance *eci,
+			unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	multigpu_access_test(src, dst, eci, flags);
+}
+

 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -1095,6 +1251,8 @@ test_mgpu_exec(int gpu_cnt, struct
 xe_svm_gpu_info *gpus,
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_latency_test_wrapper, flags);
  	if (flags & MULTIGPU_PFAULT_OP)
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_fault_test_wrapper, flags);
+	if (flags & MULTIGPU_CONC_ACCESS)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_simult_test_wrapper, flags);
 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1130,6 +1288,8 @@ igt_main

    MULTIGPU_PREFETCH | MULTIGPU_PERF_OP | MULTIGPU_PERF_REM_COPY },
  { "pagefault-basic", MULTIGPU_BASIC | MULTIGPU_PFAULT_OP },
  { "pagefault-prefetch", MULTIGPU_PREFETCH | MULTIGPU_PFAULT_OP },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "concurrent-access-basic", MULTIGPU_BASIC |

MULTIGPU_CONC_ACCESS },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "concurrent-access-prefetch", MULTIGPU_PREFETCH |
Quoted 1 line

MULTIGPU_CONC_ACCESS },

Same thing here, consider using -conflicting as a follow up.

Thanks,
Thomas

Quoted 3 lines

  { NULL },
  };

#30 lore raw

PATCH v8 9/10 tests/intel/xe_multi_gpusvm: Add SVM multi-GPU conflicting madvise test

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This test calls madvise operations on GPU0 with the preferred location set to GPU1 and vice versa. It reports conflicts when conflicting memory advice is given for shared SVM buffers in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 125 ++++++++++++++++++++++++++++++++++
 1 file changed, 125 insertions(+)
tests/intel/xe_multi_gpusvm.c +125 -0
index 7f3c5e63c..068b9671b 100644
@@ -110,6 +110,15 @@
  *	Test concurrent atomic memory operations with prefetch where
  *	multiple GPUs simultaneously access shared memory to validate
  *	coherency with memory migration and local VRAM access
+ *
+ * SUBTEST: mgpu-conflicting-madvise-basic
+ * Description:
+ *	Test conflicting madvise operations across multiple GPUs
+ *
+ * SUBTEST: mgpu-conflicting-madvise-prefetch
+ * Description:
+ *	Test conflicting madvise operations with prefetch across multiple GPUs
+ *
  */
 
 #define MAX_XE_REGIONS	8
@@ -120,6 +129,8 @@
 #define EXEC_SYNC_VAL 0x676767
 #define COPY_SIZE SZ_64M
 #define	ATOMIC_OP_VAL	56
+#define USER_FENCE_VALUE        0xdeadbeefdeadbeefull
+#define FIVE_SEC                (5LL * NSEC_PER_SEC)
 
 #define MULTIGPU_BASIC			BIT(0)
 #define MULTIGPU_PREFETCH		BIT(1)
@@ -131,6 +142,7 @@
 #define MULTIGPU_PERF_REM_COPY		BIT(7)
 #define MULTIGPU_PFAULT_OP		BIT(8)
 #define MULTIGPU_CONC_ACCESS		BIT(9)
+#define MULTIGPU_CONFLICT		BIT(10)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -191,6 +203,11 @@ static void gpu_simult_test_wrapper(struct xe_svm_gpu_info *src,
 				    struct drm_xe_engine_class_instance *eci,
 				    unsigned int flags);
 
+static void gpu_conflict_test_wrapper(struct xe_svm_gpu_info *src,
+				      struct xe_svm_gpu_info *dst,
+				      struct drm_xe_engine_class_instance *eci,
+				      unsigned int flags);
+
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
 		    uint32_t *vm, uint32_t *exec_queue)
@@ -1164,6 +1181,98 @@ multigpu_access_test(struct xe_svm_gpu_info *gpu1,
 	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
 }
 
+static void
+conflicting_madvise(struct xe_svm_gpu_info *gpu1,
+		    struct xe_svm_gpu_info *gpu2,
+		    struct drm_xe_engine_class_instance *eci,
+		    unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	void *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync[2] = {};
+	volatile uint64_t *sync_addr[2];
+
+	/* Skip if either GPU doesn't support faults */
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("Both GPUs must support page faults for this test\n");
+		return;
+	}
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	addr = to_user_pointer(data);
+
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0], &batch_addr[0], 10);
+	store_dword_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1], &batch_addr[1], 20);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, 0, 0, exec_queue[0]);
+
+	igt_info("Testing GPU1 VM trying to prefer GPU2's VRAM (should fail)\n");
+
+	/* This SHOULD fail - GPU1's VM cannot prefer GPU2's VRAM */
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0], exec_queue[0]);
+
+	/* This SHOULD also fail - GPU2's VM cannot prefer GPU1's VRAM */
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync[0], &sync_addr[0], BIND_SYNC_VAL);
+	setup_sync(&sync[1], &sync_addr[1], BIND_SYNC_VAL);
+
+	/* For simultaneous access need to call xe_wait_ufence for both gpus after prefetch */
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync[0],
+			     sync_addr[0], exec_queue[0], flags);
+	free((void *)sync_addr[0]);
+
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync[1],
+			     sync_addr[1], exec_queue[1], flags);
+	free((void *)sync_addr[1]);
+
+	for (int i = 0; i < 100; i++) {
+		sync_addr[0] = (void *)((char *)batch_addr[0] + SZ_4K);
+		sync[0].addr = to_user_pointer((uint64_t *)sync_addr[0]);
+		sync[0].timeline_value = EXEC_SYNC_VAL;
+
+		sync_addr[1] = (void *)((char *)batch_addr[1] + SZ_4K);
+		sync[1].addr = to_user_pointer((uint64_t *)sync_addr[1]);
+		sync[1].timeline_value = EXEC_SYNC_VAL;
+		*sync_addr[0] = 0;
+		*sync_addr[1] = 0;
+
+		xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0], &sync[0], 1);
+		if (*sync_addr[0] != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr[0], EXEC_SYNC_VAL,
+				       exec_queue[0], NSEC_PER_SEC * 10);
+		xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1], &sync[1], 1);
+		if (*sync_addr[1] != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr[1], EXEC_SYNC_VAL,
+				       exec_queue[1], NSEC_PER_SEC * 10);
+	}
+
+	igt_assert_eq(*(uint64_t *)addr, 20);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst,
@@ -1236,6 +1345,18 @@ gpu_simult_test_wrapper(struct xe_svm_gpu_info *src,
 	multigpu_access_test(src, dst, eci, flags);
 }
 
+static void
+gpu_conflict_test_wrapper(struct xe_svm_gpu_info *src,
+			  struct xe_svm_gpu_info *dst,
+			  struct drm_xe_engine_class_instance *eci,
+			  unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	conflicting_madvise(src, dst, eci, flags);
+}
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 	       struct drm_xe_engine_class_instance *eci,
@@ -1253,6 +1374,8 @@ test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_fault_test_wrapper, flags);
 	if (flags & MULTIGPU_CONC_ACCESS)
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_simult_test_wrapper, flags);
+	if (flags & MULTIGPU_CONFLICT)
+		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_conflict_test_wrapper, flags);
 }
 
 struct section {
@@ -1290,6 +1413,8 @@ igt_main
 		{ "pagefault-prefetch", MULTIGPU_PREFETCH | MULTIGPU_PFAULT_OP },
 		{ "concurrent-access-basic", MULTIGPU_BASIC | MULTIGPU_CONC_ACCESS },
 		{ "concurrent-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_CONC_ACCESS },
+		{ "conflicting-madvise-basic", MULTIGPU_BASIC | MULTIGPU_CONFLICT },
+		{ "conflicting-madvise-prefetch", MULTIGPU_PREFETCH | MULTIGPU_CONFLICT },
 		{ NULL },
 	};
 
Signature · 1 line
2.48.1
#31 lore raw

Re: [PATCH i-g-t v8 09/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU conflicting madvise test

Hi, Nishit,

Quoted 218 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test calls madvise operations on GPU0 with the preferred location set
to GPU1 and vice versa. It reports conflicts when conflicting memory advice
is given for shared SVM buffers in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 125
++++++++++++++++++++++++++++++++++

 1 file changed, 125 insertions(+)
tests/intel/xe_multi_gpusvm.c +0 -0
index 7f3c5e63c..068b9671b 100644
@@ -110,6 +110,15 @@
   *	Test concurrent atomic memory operations with prefetch where
   *	multiple GPUs simultaneously access shared memory to

validate
  * coherency with memory migration and local VRAM access
+ *
+ * SUBTEST: mgpu-conflicting-madvise-basic
+ * Description:
+ * Test conflicting madvise operations across multiple GPUs
+ *
+ * SUBTEST: mgpu-conflicting-madvise-prefetch
+ * Description:
+ * Test conflicting madvise operations with prefetch across
multiple GPUs
+ *
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -120,6 +129,8 @@
  #define EXEC_SYNC_VAL 0x676767
  #define COPY_SIZE SZ_64M
  #define	ATOMIC_OP_VAL	56
+#define USER_FENCE_VALUE        0xdeadbeefdeadbeefull
+#define FIVE_SEC                (5LL * NSEC_PER_SEC)


 #define MULTIGPU_BASIC BIT(0)
 #define MULTIGPU_PREFETCH BIT(1)

tests/intel/xe_multi_gpusvm.c +1 -0
@@ -131,6 +142,7 @@
  #define MULTIGPU_PERF_REM_COPY		BIT(7)
  #define MULTIGPU_PFAULT_OP		BIT(8)
  #define MULTIGPU_CONC_ACCESS		BIT(9)
+#define MULTIGPU_CONFLICT		BIT(10)


 struct xe_svm_gpu_info {
  bool supports_faults;

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -191,6 +203,11 @@ static void gpu_simult_test_wrapper(struct
 xe_svm_gpu_info *src,

      struct drm_xe_engine_class_instance *eci,
      unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -0
+static void gpu_conflict_test_wrapper(struct xe_svm_gpu_info *src,
+				      struct xe_svm_gpu_info *dst,
+				      struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
+				      unsigned int flags);
+

 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
      uint32_t *vm, uint32_t *exec_queue)

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1164,6 +1181,98 @@ multigpu_access_test(struct xe_svm_gpu_info
 *gpu1,
  	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
  }

tests/intel/xe_multi_gpusvm.c +18 -0
+static void
+conflicting_madvise(struct xe_svm_gpu_info *gpu1,
+		    struct xe_svm_gpu_info *gpu2,
+		    struct drm_xe_engine_class_instance *eci,
+		    unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	void *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync[2] = {};
+	volatile uint64_t *sync_addr[2];
+
+	/* Skip if either GPU doesn't support faults */
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("Both GPUs must support page faults for

this test\n");

tests/intel/xe_multi_gpusvm.c +11 -0
+		return;
+	}
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	addr = to_user_pointer(data);
+
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],

&batch_addr[0], 10);

tests/intel/xe_multi_gpusvm.c +1 -0
+	store_dword_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1],

&batch_addr[1], 20);

tests/intel/xe_multi_gpusvm.c +4 -0
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, 0,

0, exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +2 -0
+
+	igt_info("Testing GPU1 VM trying to prefer GPU2's VRAM

(should fail)\n");

tests/intel/xe_multi_gpusvm.c +5 -0
+
+	/* This SHOULD fail - GPU1's VM cannot prefer GPU2's VRAM */
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +2 -0
+
+	/* This SHOULD also fail - GPU2's VM cannot prefer GPU1's

VRAM */

tests/intel/xe_multi_gpusvm.c +3 -0
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +5 -0
+
+	setup_sync(&sync[0], &sync_addr[0], BIND_SYNC_VAL);
+	setup_sync(&sync[1], &sync_addr[1], BIND_SYNC_VAL);
+
+	/* For simultaneous access need to call xe_wait_ufence for

both gpus after prefetch */

tests/intel/xe_multi_gpusvm.c +10 -0
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync[0],
+			     sync_addr[0], exec_queue[0], flags);
+	free((void *)sync_addr[0]);
+
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync[1],
+			     sync_addr[1], exec_queue[1], flags);
+	free((void *)sync_addr[1]);
+
+	for (int i = 0; i < 100; i++) {
+		sync_addr[0] = (void *)((char *)batch_addr[0] +

SZ_4K);

tests/intel/xe_multi_gpusvm.c +1 -0
+		sync[0].addr = to_user_pointer((uint64_t

*)sync_addr[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+		sync[0].timeline_value = EXEC_SYNC_VAL;
+
+		sync_addr[1] = (void *)((char *)batch_addr[1] +

SZ_4K);

tests/intel/xe_multi_gpusvm.c +1 -0
+		sync[1].addr = to_user_pointer((uint64_t

*)sync_addr[1]);

tests/intel/xe_multi_gpusvm.c +5 -0
+		sync[1].timeline_value = EXEC_SYNC_VAL;
+		*sync_addr[0] = 0;
+		*sync_addr[1] = 0;
+
+		xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0],

&sync[0], 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+		if (*sync_addr[0] != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu1->fd, (uint64_t

*)sync_addr[0], EXEC_SYNC_VAL,

tests/intel/xe_multi_gpusvm.c +1 -0
+				       exec_queue[0], NSEC_PER_SEC *

10);

tests/intel/xe_multi_gpusvm.c +1 -0
+		xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1],

&sync[1], 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+		if (*sync_addr[1] != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu2->fd, (uint64_t

*)sync_addr[1], EXEC_SYNC_VAL,

tests/intel/xe_multi_gpusvm.c +1 -0
+				       exec_queue[1], NSEC_PER_SEC *

10);

tests/intel/xe_multi_gpusvm.c +14 -0
+	}
+
+	igt_assert_eq(*(uint64_t *)addr, 20);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+

 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, struct xe_svm_gpu_info *dst,

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1236,6 +1345,18 @@ gpu_simult_test_wrapper(struct xe_svm_gpu_info
 *src,
  	multigpu_access_test(src, dst, eci, flags);
  }

tests/intel/xe_multi_gpusvm.c +12 -0
+static void
+gpu_conflict_test_wrapper(struct xe_svm_gpu_info *src,
+			  struct xe_svm_gpu_info *dst,
+			  struct drm_xe_engine_class_instance *eci,
+			  unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	conflicting_madvise(src, dst, eci, flags);
+}
+

 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -1253,6 +1374,8 @@ test_mgpu_exec(int gpu_cnt, struct
 xe_svm_gpu_info *gpus,
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_fault_test_wrapper, flags);
  	if (flags & MULTIGPU_CONC_ACCESS)
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_simult_test_wrapper, flags);
+	if (flags & MULTIGPU_CONFLICT)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,
Quoted 1 line

gpu_conflict_test_wrapper, flags);

Here, rather than adding a specific test for this, Since you already introduce a MULTIGPU_CONFLICT flag, I think it makes sense to just have this flag swap the madvise regions in the other tests so that all other tests are run with a CONFLICT variant.

Thanks,
Thomas

Quoted 17 lines

 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1290,6 +1413,8 @@ igt_main

  { "pagefault-prefetch", MULTIGPU_PREFETCH | MULTIGPU_PFAULT_OP },
  { "concurrent-access-basic", MULTIGPU_BASIC | MULTIGPU_CONC_ACCESS },
  { "concurrent-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_CONC_ACCESS },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "conflicting-madvise-basic", MULTIGPU_BASIC |

MULTIGPU_CONFLICT },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "conflicting-madvise-prefetch", MULTIGPU_PREFETCH

| MULTIGPU_CONFLICT },
  { NULL },
  };

#32 lore raw

RE: [PATCH i-g-t v8 09/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU conflicting madvise test

Quoted 235 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of Hellstrom, Thomas
Sent: Wednesday, November 26, 2025 3:27 PM
To: [email protected]; Sharma, Nishit <[email protected]>
Subject: Re: [PATCH i-g-t v8 09/10] tests/intel/xe_multi_gpusvm: Add SVM multi-GPU conflicting madvise test

Hi, Nishit,

Quoted 64 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test calls madvise operations on GPU0 with the preferred location set to GPU1 and vice versa. It reports conflicts when conflicting memory advice is given for shared SVM buffers in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 125
++++++++++++++++++++++++++++++++++

 1 file changed, 125 insertions(+)
(quoted diff) +0 -0

b/tests/intel/xe_multi_gpusvm.c index 7f3c5e63c..068b9671b 100644

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -110,6 +110,15 @@
   *	Test concurrent atomic memory operations with prefetch where
   *	multiple GPUs simultaneously access shared memory to

validate
  * coherency with memory migration and local VRAM access
+ *
+ * SUBTEST: mgpu-conflicting-madvise-basic
+ * Description:
+ * Test conflicting madvise operations across multiple GPUs
+ *
+ * SUBTEST: mgpu-conflicting-madvise-prefetch
+ * Description:
+ * Test conflicting madvise operations with prefetch across
multiple GPUs
+ *
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +3 -0
@@ -120,6 +129,8 @@
  #define EXEC_SYNC_VAL 0x676767
  #define COPY_SIZE SZ_64M
  #define	ATOMIC_OP_VAL	56
+#define USER_FENCE_VALUE        0xdeadbeefdeadbeefull #define
+FIVE_SEC                (5LL * NSEC_PER_SEC)
 
  #define MULTIGPU_BASIC			BIT(0)
  #define MULTIGPU_PREFETCH		BIT(1)
@@ -131,6 +142,7 @@
  #define MULTIGPU_PERF_REM_COPY		BIT(7)
  #define MULTIGPU_PFAULT_OP		BIT(8)
  #define MULTIGPU_CONC_ACCESS		BIT(9)
+#define MULTIGPU_CONFLICT		BIT(10)
 
  struct xe_svm_gpu_info {
  	bool supports_faults;
@@ -191,6 +203,11 @@ static void gpu_simult_test_wrapper(struct
 xe_svm_gpu_info *src,

      struct drm_xe_engine_class_instance *eci,
      unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -0
+static void gpu_conflict_test_wrapper(struct xe_svm_gpu_info *src,
+				      struct xe_svm_gpu_info *dst,
+				      struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
+				      unsigned int flags);
+
Quoted 4 lines

 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
      uint32_t *vm, uint32_t *exec_queue) @@ -1164,6

+1181,98 @@

Quoted 132 lines

multigpu_access_test(struct xe_svm_gpu_info *gpu1, cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]); }

tests/intel/xe_multi_gpusvm.c +18 -0
+static void
+conflicting_madvise(struct xe_svm_gpu_info *gpu1,
+		    struct xe_svm_gpu_info *gpu2,
+		    struct drm_xe_engine_class_instance *eci,
+		    unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo[2];
+	void *data;
+	uint64_t batch_addr[2];
+	struct drm_xe_sync sync[2] = {};
+	volatile uint64_t *sync_addr[2];
+
+	/* Skip if either GPU doesn't support faults */
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("Both GPUs must support page faults for

this test\n");

tests/intel/xe_multi_gpusvm.c +11 -0
+		return;
+	}
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	addr = to_user_pointer(data);
+
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch_bo[0],

&batch_addr[0], 10);

tests/intel/xe_multi_gpusvm.c +1 -0
+	store_dword_batch_init(gpu2->fd, vm[1], addr, &batch_bo[1],

&batch_addr[1], 20);

tests/intel/xe_multi_gpusvm.c +4 -0
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, 0,

0, exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +2 -0
+
+	igt_info("Testing GPU1 VM trying to prefer GPU2's VRAM

(should fail)\n");

tests/intel/xe_multi_gpusvm.c +5 -0
+
+	/* This SHOULD fail - GPU1's VM cannot prefer GPU2's VRAM */
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +2 -0
+
+	/* This SHOULD also fail - GPU2's VM cannot prefer GPU1's

VRAM */

tests/intel/xe_multi_gpusvm.c +3 -0
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +5 -0
+
+	setup_sync(&sync[0], &sync_addr[0], BIND_SYNC_VAL);
+	setup_sync(&sync[1], &sync_addr[1], BIND_SYNC_VAL);
+
+	/* For simultaneous access need to call xe_wait_ufence for

both gpus after prefetch */

tests/intel/xe_multi_gpusvm.c +10 -0
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync[0],
+			     sync_addr[0], exec_queue[0], flags);
+	free((void *)sync_addr[0]);
+
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync[1],
+			     sync_addr[1], exec_queue[1], flags);
+	free((void *)sync_addr[1]);
+
+	for (int i = 0; i < 100; i++) {
+		sync_addr[0] = (void *)((char *)batch_addr[0] +

SZ_4K);

tests/intel/xe_multi_gpusvm.c +1 -0
+		sync[0].addr = to_user_pointer((uint64_t

*)sync_addr[0]);

tests/intel/xe_multi_gpusvm.c +3 -0
+		sync[0].timeline_value = EXEC_SYNC_VAL;
+
+		sync_addr[1] = (void *)((char *)batch_addr[1] +

SZ_4K);

tests/intel/xe_multi_gpusvm.c +1 -0
+		sync[1].addr = to_user_pointer((uint64_t

*)sync_addr[1]);

tests/intel/xe_multi_gpusvm.c +5 -0
+		sync[1].timeline_value = EXEC_SYNC_VAL;
+		*sync_addr[0] = 0;
+		*sync_addr[1] = 0;
+
+		xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr[0],

&sync[0], 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+		if (*sync_addr[0] != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu1->fd, (uint64_t

*)sync_addr[0], EXEC_SYNC_VAL,

tests/intel/xe_multi_gpusvm.c +1 -0
+				       exec_queue[0], NSEC_PER_SEC *

10);

tests/intel/xe_multi_gpusvm.c +1 -0
+		xe_exec_sync(gpu2->fd, exec_queue[1], batch_addr[1],

&sync[1], 1);

tests/intel/xe_multi_gpusvm.c +2 -0
+		if (*sync_addr[1] != EXEC_SYNC_VAL)
+			xe_wait_ufence(gpu2->fd, (uint64_t

*)sync_addr[1], EXEC_SYNC_VAL,

tests/intel/xe_multi_gpusvm.c +1 -0
+				       exec_queue[1], NSEC_PER_SEC *

10);

tests/intel/xe_multi_gpusvm.c +13 -0
+	}
+
+	igt_assert_eq(*(uint64_t *)addr, 20);
+
+	munmap((void *)batch_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo[0], batch_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch_bo[1], batch_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]); }
+

 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
         struct xe_svm_gpu_info *dst, @@ -1236,6 +1345,18 @@ gpu_simult_test_wrapper(struct xe_svm_gpu_info *src, multigpu_access_test(src, dst, eci, flags);
 }

tests/intel/xe_multi_gpusvm.c +11 -0
+static void
+gpu_conflict_test_wrapper(struct xe_svm_gpu_info *src,
+			  struct xe_svm_gpu_info *dst,
+			  struct drm_xe_engine_class_instance *eci,
+			  unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	conflicting_madvise(src, dst, eci, flags); }
+
Quoted 5 lines

 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci, @@ -1253,6 +1374,8 @@ test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_fault_test_wrapper,

Quoted 3 lines

flags);
  if (flags & MULTIGPU_CONC_ACCESS) for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_simult_test_wrapper,

Quoted 4 lines

flags);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (flags & MULTIGPU_CONFLICT)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_conflict_test_wrapper, flags);

Here, rather than adding a specific test for this, Since you already introduce a MULTIGPU_CONFLICT flag, I think it makes sense to just have this flag swap the madvise regions in the other tests so that all other tests are run with a CONFLICT variant.

Quoted 2 lines

Thanks,
Thomas

Agreed and good idea. Along with this, to look the code more cleaner make it a common helper function to handle the conflict logic. Like When MULTIGPU_CONFLICT flag is set, swaps the target GPU to test cross-GPU VRAM preferences (which should fail and fallback to local VRAM or system memory)

Quoted 21 lines
Quoted 8 lines

 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1290,6 +1413,8 @@ igt_main

  { "pagefault-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_PFAULT_OP },

Quoted 1 line

  { "concurrent-access-basic", MULTIGPU_BASIC |

MULTIGPU_CONC_ACCESS

Quoted 10 lines

},
  { "concurrent-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_CONC_ACCESS },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "conflicting-madvise-basic", MULTIGPU_BASIC |

MULTIGPU_CONFLICT },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "conflicting-madvise-prefetch", MULTIGPU_PREFETCH

| MULTIGPU_CONFLICT },
  { NULL },
  };

#33 lore raw

PATCH v8 10/10 tests/intel/xe_multi-gpusvm: Add SVM multi-GPU migration test

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, accesses it from GPU 1, then GPU 2 and then the CPU. It verifies that the buffer migrates correctly between devices and remains accessible across all agents in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 163 ++++++++++++++++++++++++++++++++++
 1 file changed, 163 insertions(+)
tests/intel/xe_multi_gpusvm.c +163 -0
index 068b9671b..19e977d55 100644
@@ -119,6 +119,18 @@
  * Description:
  *	Test conflicting madvise operations with prefetch across multiple GPUs
  *
+ * SUBTEST: mgpu-migration-basic
+ * Description:
+ *	Test buffer migration across multiple GPUs and memory domains.
+ *	Validates that a shared buffer can migrate between system memory,
+ *	GPU1 VRAM, and GPU2 VRAM while maintaining data coherency.
+ *
+ * SUBTEST: mgpu-migration-prefetch
+ * Description:
+ *	Test buffer migration across multiple GPUs with explicit prefetch operations.
+ *	Similar to mgpu-migration-basic but uses XE_VM_PREFETCH_ASYNC to explicitly
+ *	trigger page migration before GPU access.
+ *
  */
 
 #define MAX_XE_REGIONS	8
@@ -143,6 +155,7 @@
 #define MULTIGPU_PFAULT_OP		BIT(8)
 #define MULTIGPU_CONC_ACCESS		BIT(9)
 #define MULTIGPU_CONFLICT		BIT(10)
+#define MULTIGPU_MIGRATE		BIT(11)
 
 struct xe_svm_gpu_info {
 	bool supports_faults;
@@ -208,6 +221,11 @@ static void gpu_conflict_test_wrapper(struct xe_svm_gpu_info *src,
 				      struct drm_xe_engine_class_instance *eci,
 				      unsigned int flags);
 
+static void gpu_migration_test_wrapper(struct xe_svm_gpu_info *src,
+				       struct xe_svm_gpu_info *dst,
+				       struct drm_xe_engine_class_instance *eci,
+				       unsigned int flags);
+
 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
 		    uint32_t *vm, uint32_t *exec_queue)
@@ -1273,6 +1291,135 @@ conflicting_madvise(struct xe_svm_gpu_info *gpu1,
 	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
 }
 
+static void
+multigpu_migrate_test(struct xe_svm_gpu_info *gpu1,
+		      struct xe_svm_gpu_info *gpu2,
+		      struct drm_xe_engine_class_instance *eci,
+		      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch1_bo[2];
+	uint64_t batch1_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+	uint64_t *data;
+	uint32_t test_pattern_sys;
+	uint32_t test_pattern_gpu1;
+	uint32_t test_pattern_gpu2;
+	uint32_t cpu_pattern;
+
+	test_pattern_sys = 0x12345678;
+	test_pattern_gpu1 = 0xDEADBEEF;
+	test_pattern_gpu2 = 0xCAFEBABE;
+
+	/* Skip if either GPU doesn't support faults */
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("Both GPUs must support page faults for this test\n");
+		return;
+	}
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	memset(data, 0, SZ_4K);
+	addr = to_user_pointer(data);
+
+	igt_info("=== Phase 1: System Memory → GPU1 VRAM ===\n");
+	/* CPU writes initial pattern in system memory */
+	*(uint32_t *)data = test_pattern_sys;
+	igt_info("CPU wrote 0x%x to system memory\n", test_pattern_sys);
+
+	/* Set preferred location to GPU1 VRAM */
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* GPU1 writes new pattern - should happen in GPU1 VRAM */
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch1_bo[0], &batch1_addr[0],
+			       test_pattern_gpu1);
+
+	sync_addr = (void *)((char *)batch1_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	sync.flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync.type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch1_addr[0], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[0],
+			       NSEC_PER_SEC * 10);
+
+	/* Verify GPU1 wrote correctly (may cause migration back to system) */
+	igt_assert_eq_u32(*(uint32_t *)data, test_pattern_gpu1);
+	igt_info("GPU1 successfully wrote 0x%x\n", test_pattern_gpu1);
+
+	igt_info("=== Phase 2: GPU1 VRAM → GPU2 VRAM ===\n");
+
+	/* Change preferred location to GPU2 VRAM */
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0], exec_queue[1]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* GPU2 reads GPU1's value and writes new pattern */
+	store_dword_batch_init(gpu2->fd, vm[1], addr, &batch1_bo[1], &batch1_addr[1],
+			       test_pattern_gpu2);
+
+	sync_addr = (void *)((char *)batch1_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch1_addr[1], &sync, 1);
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[1],
+			       NSEC_PER_SEC * 10);
+
+	/* Verify GPU2 wrote correctly */
+	igt_assert_eq_u32(*(uint32_t *)data, test_pattern_gpu2);
+	igt_info("GPU2 successfully wrote 0x%x\n", test_pattern_gpu2);
+
+	igt_info("=== Phase 3: GPU2 VRAM → System Memory ===\n");
+
+	/* Change back to system memory preference */
+	xe_vm_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+		      DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, 0, 0);
+
+	/* CPU access should migrate back to system memory */
+	cpu_pattern = 0xABCDEF00;
+	*(uint32_t *)data = cpu_pattern;
+	igt_info("CPU wrote 0x%x after migration to system memory\n", cpu_pattern);
+
+	/* Verify CPU write was successful */
+	igt_assert_eq_u32(*(uint32_t *)data, cpu_pattern);
+
+	igt_info("Migration test completed successfully\n");
+
+	munmap((void *)batch1_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch1_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch1_bo[0], batch1_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch1_bo[1], batch1_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
+}
+
 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
 		       struct xe_svm_gpu_info *dst,
@@ -1357,6 +1504,18 @@ gpu_conflict_test_wrapper(struct xe_svm_gpu_info *src,
 	conflicting_madvise(src, dst, eci, flags);
 }
 
+static void
+gpu_migration_test_wrapper(struct xe_svm_gpu_info *src,
+			   struct xe_svm_gpu_info *dst,
+			   struct drm_xe_engine_class_instance *eci,
+			   unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	multigpu_migrate_test(src, dst, eci, flags);
+}
+
 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 	       struct drm_xe_engine_class_instance *eci,
@@ -1376,6 +1535,8 @@ test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_simult_test_wrapper, flags);
 	if (flags & MULTIGPU_CONFLICT)
 		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_conflict_test_wrapper, flags);
+	if (flags & MULTIGPU_MIGRATE)
+		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_migration_test_wrapper, flags);
 }
 
 struct section {
@@ -1415,6 +1576,8 @@ igt_main
 		{ "concurrent-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_CONC_ACCESS },
 		{ "conflicting-madvise-basic", MULTIGPU_BASIC | MULTIGPU_CONFLICT },
 		{ "conflicting-madvise-prefetch", MULTIGPU_PREFETCH | MULTIGPU_CONFLICT },
+		{ "migration-basic", MULTIGPU_BASIC | MULTIGPU_MIGRATE },
+		{ "migration-prefetch", MULTIGPU_PREFETCH | MULTIGPU_MIGRATE },
 		{ NULL },
 	};
 
Signature · 1 line
2.48.1
#34 lore raw

Re: [PATCH i-g-t v8 10/10] tests/intel/xe_multi-gpusvm: Add SVM multi-GPU migration test

Hi, Nishit

Quoted 104 lines · On Fri, 2025-11-21 at 16:25 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, accesses it from GPU 1, then GPU 2
and then the CPU. It verifies that the buffer migrates correctly between
devices and remains accessible across all agents in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 163
++++++++++++++++++++++++++++++++++

 1 file changed, 163 insertions(+)
tests/intel/xe_multi_gpusvm.c +0 -0
index 068b9671b..19e977d55 100644
@@ -119,6 +119,18 @@
   * Description:
   *	Test conflicting madvise operations with prefetch across

multiple GPUs
  *
+ * SUBTEST: mgpu-migration-basic
+ * Description:
+ * Test buffer migration across multiple GPUs and memory
domains.
+ * Validates that a shared buffer can migrate between system
memory,
+ * GPU1 VRAM, and GPU2 VRAM while maintaining data coherency.
+ *
+ * SUBTEST: mgpu-migration-prefetch
+ * Description:
+ * Test buffer migration across multiple GPUs with explicit
prefetch operations.
+ * Similar to mgpu-migration-basic but uses
XE_VM_PREFETCH_ASYNC to explicitly
+ * trigger page migration before GPU access.
+ *
  */

 #define MAX_XE_REGIONS 8

tests/intel/xe_multi_gpusvm.c +1 -0
@@ -143,6 +155,7 @@
  #define MULTIGPU_PFAULT_OP		BIT(8)
  #define MULTIGPU_CONC_ACCESS		BIT(9)
  #define MULTIGPU_CONFLICT		BIT(10)
+#define MULTIGPU_MIGRATE		BIT(11)


 struct xe_svm_gpu_info {
  bool supports_faults;

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -208,6 +221,11 @@ static void gpu_conflict_test_wrapper(struct
 xe_svm_gpu_info *src,

        struct drm_xe_engine_class_instance *eci,
        unsigned int flags);

tests/intel/xe_multi_gpusvm.c +3 -0
+static void gpu_migration_test_wrapper(struct xe_svm_gpu_info *src,
+				       struct xe_svm_gpu_info *dst,
+				       struct

drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
+				       unsigned int flags);
+

 static void
 create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
      uint32_t *vm, uint32_t *exec_queue)

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1273,6 +1291,135 @@ conflicting_madvise(struct xe_svm_gpu_info
 *gpu1,
  	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
  }

tests/intel/xe_multi_gpusvm.c +26 -0
+static void
+multigpu_migrate_test(struct xe_svm_gpu_info *gpu1,
+		      struct xe_svm_gpu_info *gpu2,
+		      struct drm_xe_engine_class_instance *eci,
+		      unsigned int flags)
+{
+	uint64_t addr;
+	uint32_t vm[2];
+	uint32_t exec_queue[2];
+	uint32_t batch1_bo[2];
+	uint64_t batch1_addr[2];
+	struct drm_xe_sync sync = {};
+	volatile uint64_t *sync_addr;
+	uint64_t *data;
+	uint32_t test_pattern_sys;
+	uint32_t test_pattern_gpu1;
+	uint32_t test_pattern_gpu2;
+	uint32_t cpu_pattern;
+
+	test_pattern_sys = 0x12345678;
+	test_pattern_gpu1 = 0xDEADBEEF;
+	test_pattern_gpu2 = 0xCAFEBABE;
+
+	/* Skip if either GPU doesn't support faults */
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("Both GPUs must support page faults for

this test\n");

tests/intel/xe_multi_gpusvm.c +4 -0
+		return;
+	}
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);

tests/intel/xe_multi_gpusvm.c conflicting_madvise(struct xe_svm_gpu_info *gpu1, · line 1333

Quoted 10 lines
tests/intel/xe_multi_gpusvm.c +10 -0
+	create_vm_and_queue(gpu2, eci, &vm[1], &exec_queue[1]);
+
+	data = aligned_alloc(SZ_2M, SZ_4K);
+	igt_assert(data);
+	memset(data, 0, SZ_4K);
+	addr = to_user_pointer(data);
+
+	igt_info("=== Phase 1: System Memory → GPU1 VRAM ===\n");
+	/* CPU writes initial pattern in system memory */
+	*(uint32_t *)data = test_pattern_sys;

"data" should be accessed using READ_ONCE() and WRITE_ONCE()

Quoted 35 lines
tests/intel/xe_multi_gpusvm.c +1 -0
+	igt_info("CPU wrote 0x%x to system memory\n",

test_pattern_sys);

tests/intel/xe_multi_gpusvm.c +5 -0
+
+	/* Set preferred location to GPU1 VRAM */
+	xe_multigpu_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu1->fd, 0, gpu1->vram_regions[0],

exec_queue[0]);

tests/intel/xe_multi_gpusvm.c +8 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free((void *)sync_addr);
+
+	/* GPU1 writes new pattern - should happen in GPU1 VRAM */
+	store_dword_batch_init(gpu1->fd, vm[0], addr, &batch1_bo[0],

&batch1_addr[0],

tests/intel/xe_multi_gpusvm.c +10 -0
+			       test_pattern_gpu1);
+
+	sync_addr = (void *)((char *)batch1_addr[0] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	sync.flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync.type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch1_addr[0], &sync,

1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[0],

tests/intel/xe_multi_gpusvm.c +3 -0
+			       NSEC_PER_SEC * 10);
+
+	/* Verify GPU1 wrote correctly (may cause migration back to

system) */

tests/intel/xe_multi_gpusvm.c conflicting_madvise(struct xe_svm_gpu_info *gpu1, · line 1363

Quoted 1 line
tests/intel/xe_multi_gpusvm.c +1 -0
+	igt_assert_eq_u32(*(uint32_t *)data, test_pattern_gpu1);

Since this causes migration back to system there is no GPU <-> GPU interaction here, so this in essence becomes two single-GPU tests instead of a multi-gpu test, similar to Pravalikas comment on patch 3.

Not sure TBH what would be the best to test this? Perhaps avoid the CPU access and have the 2nd GPU do a copy instead?

/Thomas

Quoted 120 lines
tests/intel/xe_multi_gpusvm.c +1 -0
+	igt_info("GPU1 successfully wrote 0x%x\n",

test_pattern_gpu1);

tests/intel/xe_multi_gpusvm.c +7 -0
+
+	igt_info("=== Phase 2: GPU1 VRAM → GPU2 VRAM ===\n");
+
+	/* Change preferred location to GPU2 VRAM */
+	xe_multigpu_madvise(gpu2->fd, vm[1], addr, SZ_4K, 0,
+			    DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0],

exec_queue[1]);

tests/intel/xe_multi_gpusvm.c +8 -0
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu2->fd, vm[1], addr, SZ_4K, &sync,
+			     sync_addr, exec_queue[1], flags);
+	free((void *)sync_addr);
+
+	/* GPU2 reads GPU1's value and writes new pattern */
+	store_dword_batch_init(gpu2->fd, vm[1], addr, &batch1_bo[1],

&batch1_addr[1],

tests/intel/xe_multi_gpusvm.c +8 -0
+			       test_pattern_gpu2);
+
+	sync_addr = (void *)((char *)batch1_addr[1] + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	*sync_addr = 0;
+
+	xe_exec_sync(gpu2->fd, exec_queue[1], batch1_addr[1], &sync,

1);

tests/intel/xe_multi_gpusvm.c +2 -0
+	if (*sync_addr != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu2->fd, (uint64_t *)sync_addr,

EXEC_SYNC_VAL, exec_queue[1],

tests/intel/xe_multi_gpusvm.c +5 -0
+			       NSEC_PER_SEC * 10);
+
+	/* Verify GPU2 wrote correctly */
+	igt_assert_eq_u32(*(uint32_t *)data, test_pattern_gpu2);
+	igt_info("GPU2 successfully wrote 0x%x\n",

test_pattern_gpu2);

tests/intel/xe_multi_gpusvm.c +12 -0
+
+	igt_info("=== Phase 3: GPU2 VRAM → System Memory ===\n");
+
+	/* Change back to system memory preference */
+	xe_vm_madvise(gpu1->fd, vm[0], addr, SZ_4K, 0,
+		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+		      DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, 0, 0);
+
+	/* CPU access should migrate back to system memory */
+	cpu_pattern = 0xABCDEF00;
+	*(uint32_t *)data = cpu_pattern;
+	igt_info("CPU wrote 0x%x after migration to system

memory\n", cpu_pattern);

tests/intel/xe_multi_gpusvm.c +16 -0
+
+	/* Verify CPU write was successful */
+	igt_assert_eq_u32(*(uint32_t *)data, cpu_pattern);
+
+	igt_info("Migration test completed successfully\n");
+
+	munmap((void *)batch1_addr[0], BATCH_SIZE(gpu1->fd));
+	munmap((void *)batch1_addr[1], BATCH_SIZE(gpu2->fd));
+	batch_fini(gpu1->fd, vm[0], batch1_bo[0], batch1_addr[0]);
+	batch_fini(gpu2->fd, vm[1], batch1_bo[1], batch1_addr[1]);
+	free(data);
+
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+	cleanup_vm_and_queue(gpu2, vm[1], exec_queue[1]);
 
 
 
 
+}
+

 static void
 gpu_mem_access_wrapper(struct xe_svm_gpu_info *src, struct xe_svm_gpu_info *dst,

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1357,6 +1504,18 @@ gpu_conflict_test_wrapper(struct
 xe_svm_gpu_info *src,
  	conflicting_madvise(src, dst, eci, flags);
  }

tests/intel/xe_multi_gpusvm.c +12 -0
+static void
+gpu_migration_test_wrapper(struct xe_svm_gpu_info *src,
+			   struct xe_svm_gpu_info *dst,
+			   struct drm_xe_engine_class_instance *eci,
+			   unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	multigpu_migrate_test(src, dst, eci, flags);
+}
+

 static void
 test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus, struct drm_xe_engine_class_instance *eci,

tests/intel/xe_multi_gpusvm.c +2 -0
@@ -1376,6 +1535,8 @@ test_mgpu_exec(int gpu_cnt, struct
 xe_svm_gpu_info *gpus,
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_simult_test_wrapper, flags);
  	if (flags & MULTIGPU_CONFLICT)
  		for_each_gpu_pair(gpu_cnt, gpus, eci,
 gpu_conflict_test_wrapper, flags);
+	if (flags & MULTIGPU_MIGRATE)
+		for_each_gpu_pair(gpu_cnt, gpus, eci,

gpu_migration_test_wrapper, flags);
 }

 struct section {

tests/intel/xe_multi_gpusvm.c +0 -0
@@ -1415,6 +1576,8 @@ igt_main

  { "concurrent-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_CONC_ACCESS },
  { "conflicting-madvise-basic", MULTIGPU_BASIC | MULTIGPU_CONFLICT },
  { "conflicting-madvise-prefetch", MULTIGPU_PREFETCH | MULTIGPU_CONFLICT },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "migration-basic", MULTIGPU_BASIC |

MULTIGPU_MIGRATE },

tests/intel/xe_multi_gpusvm.c +1 -0
+		{ "migration-prefetch", MULTIGPU_PREFETCH |

MULTIGPU_MIGRATE },
  { NULL },
  };

#35 lore raw

✓ i915.CI.BAT: success for Madvise feature in SVM for Multi-GPU configs

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: Madvise feature in SVM for Multi-GPU configs
URL : https://patchwork.freedesktop.org/series/157925/
State : success

== Summary ==

CI Bug Log - changes from IGT_8637 -> IGTPW_14099
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Participating hosts (44 -> 44)
------------------------------

No changes in participating hosts

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@workarounds:
- bat-adlp-9: [PASS][1] -> [ABORT][2] ([i915#14365]) +1 other test abort
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8637/bat-adlp-9/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/bat-adlp-9/igt@i915_selftest@[email protected]
- bat-dg2-9: [PASS][3] -> [DMESG-FAIL][4] ([i915#12061]) +1 other test dmesg-fail
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8637/bat-dg2-9/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/bat-dg2-9/igt@i915_selftest@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@workarounds:
- bat-mtlp-6: [DMESG-FAIL][5] ([i915#12061]) -> [PASS][6] +1 other test pass
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8637/bat-mtlp-6/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/bat-mtlp-6/igt@i915_selftest@[email protected]

* igt@kms_flip@basic-flip-vs-wf_vblank:
- bat-adlp-9: [FAIL][7] -> [PASS][8] +1 other test pass
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8637/bat-adlp-9/igt@kms_flip@basic-flip-vs-wf_vblank.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/bat-adlp-9/igt@kms_flip@basic-flip-vs-wf_vblank.html

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

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

* CI: CI-20190529 -> None
* IGT: IGT_8637 -> IGTPW_14099

CI-20190529: 20190529
CI_DRM_17580: c701e79730169fab373fba7e759497d755fac592 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_14099: 3bfa6365275833acf01b1d5761bae2f129c2a72c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_8637: 730ee3dfb26f8d7891fc240b0132a08c5bc7b949 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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

#36 lore raw

✓ Xe.CI.BAT: success for Madvise feature in SVM for Multi-GPU configs

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: Madvise feature in SVM for Multi-GPU configs
URL : https://patchwork.freedesktop.org/series/157925/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_8637_BAT -> XEIGTPW_14099_BAT
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (12 -> 11)
------------------------------

Missing (1): bat-pvc-2

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_flip@basic-flip-vs-modeset@d-edp1:
- bat-adlp-7: [PASS][1] -> [DMESG-WARN][2] ([Intel XE#4543]) +1 other test dmesg-warn
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/bat-adlp-7/igt@kms_flip@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/bat-adlp-7/igt@kms_flip@[email protected]

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

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

* IGT: IGT_8637 -> IGTPW_14099

IGTPW_14099: 3bfa6365275833acf01b1d5761bae2f129c2a72c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_8637: 730ee3dfb26f8d7891fc240b0132a08c5bc7b949 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-4141-c701e79730169fab373fba7e759497d755fac592: c701e79730169fab373fba7e759497d755fac592

== Logs ==

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

#37 lore raw

✗ Xe.CI.Full: failure for Madvise feature in SVM for Multi-GPU configs

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: Madvise feature in SVM for Multi-GPU configs
URL : https://patchwork.freedesktop.org/series/157925/
State : failure

== Summary ==

CI Bug Log - changes from XEIGT_8637_FULL -> XEIGTPW_14099_FULL
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in XEIGTPW_14099_FULL, 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 (4 -> 3)
------------------------------

Missing (1): shard-adlp

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_async_flips@async-flip-with-page-flip-events-linear@pipe-b-edp-1:
- shard-lnl: NOTRUN -> [FAIL][1] +5 other tests fail
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@kms_async_flips@[email protected]

* igt@kms_plane_scaling@planes-downscale-factor-0-75-upscale-factor-0-25:
- shard-bmg: NOTRUN -> [DMESG-WARN][2] +1 other test dmesg-warn
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@kms_plane_scaling@planes-downscale-factor-0-75-upscale-factor-0-25.html

* igt@xe_exec_system_allocator@many-stride-new-prefetch:
- shard-bmg: [PASS][3] -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-bmg-3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-7/igt@[email protected]

* {igt@xe_multi_gpusvm@mgpu-latency-copy-prefetch} (NEW):
- shard-lnl: NOTRUN -> [SKIP][5] +10 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* {igt@xe_multi_gpusvm@mgpu-pagefault-basic} (NEW):
- shard-bmg: NOTRUN -> [SKIP][6] +8 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-1/igt@[email protected]

New tests
---------

New tests have been introduced between XEIGT_8637_FULL and XEIGTPW_14099_FULL:

### New IGT tests (38) ###

* igt@kms_content_protection@atomic@pipe-a-dp-2:
- Statuses : 1 fail(s)
- Exec time: [111.90] s

* igt@kms_flip@blocking-wf_vblank@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [4.38] s

* igt@kms_flip@busy-flip@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [0.80] s

* igt@kms_flip@dpms-vs-vblank-race-interruptible@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [1.86] s

* igt@kms_flip@flip-vs-dpms-off-vs-modeset-interruptible@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [0.72] s

* igt@kms_flip@flip-vs-dpms-off-vs-modeset@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [0.73] s

* igt@kms_flip@flip-vs-panning-interruptible@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [3.99] s

* igt@kms_flip@flip-vs-panning-vs-hang@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [0.74] s

* igt@kms_flip@modeset-vs-vblank-race@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [1.93] s

* igt@kms_flip@nonexisting-fb-interruptible@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [0.23] s

* igt@kms_flip@plain-flip-fb-recreate-interruptible@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [4.27] s

* igt@kms_flip@plain-flip-fb-recreate@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [4.28] s

* igt@kms_flip@wf_vblank-ts-check-interruptible@d-dp2:
- Statuses : 1 pass(s)
- Exec time: [4.35] s

* igt@kms_hdr@static-swap@pipe-a-dp-2:
- Statuses : 1 pass(s)
- Exec time: [1.03] s

* igt@kms_plane_lowres@tiling-4@pipe-a-dp-2:
- Statuses : 1 pass(s)
- Exec time: [9.44] s

* igt@kms_plane_lowres@tiling-4@pipe-b-dp-2:
- Statuses : 1 pass(s)
- Exec time: [9.31] s

* igt@kms_plane_lowres@tiling-4@pipe-c-dp-2:
- Statuses : 1 pass(s)
- Exec time: [9.32] s

* igt@kms_plane_lowres@tiling-4@pipe-d-dp-2:
- Statuses : 1 pass(s)
- Exec time: [9.24] s

* igt@xe_multi_gpusvm@mgpu-atomic-op-basic:
- Statuses :
- Exec time: [None] s

* igt@xe_multi_gpusvm@mgpu-atomic-op-prefetch:
- Statuses : 2 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-coherency-basic:
- Statuses : 2 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-coherency-fail-basic:
- Statuses :
- Exec time: [None] s

* igt@xe_multi_gpusvm@mgpu-coherency-fail-prefetch:
- Statuses : 1 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-coherency-prefetch:
- Statuses :
- Exec time: [None] s

* igt@xe_multi_gpusvm@mgpu-concurrent-access-basic:
- Statuses :
- Exec time: [None] s

* igt@xe_multi_gpusvm@mgpu-concurrent-access-prefetch:
- Statuses : 1 pass(s) 1 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-conflicting-madvise-basic:
- Statuses : 1 pass(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-conflicting-madvise-prefetch:
- Statuses : 1 pass(s) 2 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-latency-basic:
- Statuses :
- Exec time: [None] s

* igt@xe_multi_gpusvm@mgpu-latency-copy-basic:
- Statuses : 1 pass(s) 2 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-latency-copy-prefetch:
- Statuses : 1 pass(s) 1 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-latency-prefetch:
- Statuses : 1 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-migration-basic:
- Statuses :
- Exec time: [None] s

* igt@xe_multi_gpusvm@mgpu-migration-prefetch:
- Statuses : 1 pass(s) 2 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-pagefault-basic:
- Statuses : 1 pass(s) 2 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-pagefault-prefetch:
- Statuses : 1 skip(s)
- Exec time: [0.0] s

* igt@xe_multi_gpusvm@mgpu-xgpu-access-basic:
- Statuses :
- Exec time: [None] s

* igt@xe_multi_gpusvm@mgpu-xgpu-access-prefetch:
- Statuses : 1 pass(s) 2 skip(s)
- Exec time: [0.0] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@intel_hwmon@hwmon-write:
- shard-lnl: NOTRUN -> [SKIP][7] ([Intel XE#1125])
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_async_flips@basic-modeset-with-all-modifiers-formats@pipe-a-edp-1-linear-rgb565:
- shard-lnl: NOTRUN -> [FAIL][8] ([Intel XE#6676]) +41 other tests fail
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@kms_async_flips@basic-modeset-with-all-modifiers-formats@pipe-a-edp-1-linear-rgb565.html

* igt@kms_atomic_transition@plane-all-modeset-transition:
- shard-lnl: NOTRUN -> [SKIP][9] ([Intel XE#3279])
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_big_fb@4-tiled-16bpp-rotate-270:
- shard-lnl: NOTRUN -> [SKIP][10] ([Intel XE#1407]) +3 other tests skip
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* igt@kms_big_fb@4-tiled-64bpp-rotate-270:
- shard-bmg: NOTRUN -> [SKIP][11] ([Intel XE#2327]) +1 other test skip
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-7/igt@[email protected]

* igt@kms_big_fb@x-tiled-8bpp-rotate-90:
- shard-dg2-set2: NOTRUN -> [SKIP][12] ([Intel XE#316]) +1 other test skip
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-464/igt@[email protected]

* igt@kms_big_fb@y-tiled-addfb-size-overflow:
- shard-bmg: NOTRUN -> [SKIP][13] ([Intel XE#610])
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180:
- shard-lnl: NOTRUN -> [SKIP][14] ([Intel XE#1124]) +5 other tests skip
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_big_fb@yf-tiled-32bpp-rotate-0:
- shard-bmg: NOTRUN -> [SKIP][15] ([Intel XE#1124]) +12 other tests skip
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@[email protected]

* igt@kms_big_fb@yf-tiled-64bpp-rotate-180:
- shard-dg2-set2: NOTRUN -> [SKIP][16] ([Intel XE#1124]) +6 other tests skip
[16]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]

* igt@kms_big_fb@yf-tiled-addfb:
- shard-bmg: NOTRUN -> [SKIP][17] ([Intel XE#2328])
[17]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_bw@connected-linear-tiling-3-displays-2160x1440p:
- shard-bmg: NOTRUN -> [SKIP][18] ([Intel XE#2314] / [Intel XE#2894]) +2 other tests skip
[18]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-8/igt@[email protected]

* igt@kms_bw@connected-linear-tiling-4-displays-3840x2160p:
- shard-dg2-set2: NOTRUN -> [SKIP][19] ([Intel XE#2191]) +1 other test skip
[19]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][20] ([Intel XE#1512])
[20]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* igt@kms_bw@linear-tiling-2-displays-2160x1440p:
- shard-lnl: NOTRUN -> [SKIP][21] ([Intel XE#367])
[21]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_bw@linear-tiling-2-displays-2560x1440p:
- shard-bmg: NOTRUN -> [SKIP][22] ([Intel XE#367]) +2 other tests skip
[22]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-7/igt@[email protected]

* igt@kms_bw@linear-tiling-2-displays-3840x2160p:
- shard-dg2-set2: NOTRUN -> [SKIP][23] ([Intel XE#367]) +2 other tests skip
[23]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-463/igt@[email protected]

* igt@kms_ccs@bad-aux-stride-y-tiled-gen12-mc-ccs@pipe-c-hdmi-a-6:
- shard-dg2-set2: NOTRUN -> [SKIP][24] ([Intel XE#787]) +111 other tests skip
[24]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-basic-4-tiled-bmg-ccs@pipe-c-edp-1:
- shard-lnl: NOTRUN -> [SKIP][25] ([Intel XE#2669]) +11 other tests skip
[25]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-rotation-180-4-tiled-mtl-mc-ccs:
- shard-lnl: NOTRUN -> [SKIP][26] ([Intel XE#2887]) +11 other tests skip
[26]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_ccs@crc-primary-suspend-4-tiled-dg2-rc-ccs-cc:
- shard-lnl: NOTRUN -> [SKIP][27] ([Intel XE#3432]) +1 other test skip
[27]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@[email protected]

* igt@kms_ccs@crc-primary-suspend-4-tiled-dg2-rc-ccs-cc@pipe-a-dp-4:
- shard-dg2-set2: NOTRUN -> [INCOMPLETE][28] ([Intel XE#3862])
[28]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-suspend-4-tiled-mtl-mc-ccs:
- shard-bmg: NOTRUN -> [SKIP][29] ([Intel XE#3432]) +2 other tests skip
[29]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_ccs@crc-sprite-planes-basic-4-tiled-dg2-rc-ccs-cc:
- shard-bmg: NOTRUN -> [SKIP][30] ([Intel XE#2887]) +17 other tests skip
[30]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_ccs@crc-sprite-planes-basic-4-tiled-lnl-ccs:
- shard-dg2-set2: NOTRUN -> [SKIP][31] ([Intel XE#2907]) +2 other tests skip
[31]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]

* igt@kms_ccs@crc-sprite-planes-basic-4-tiled-lnl-ccs@pipe-d-hdmi-a-3:
- shard-bmg: NOTRUN -> [SKIP][32] ([Intel XE#2652] / [Intel XE#787]) +13 other tests skip
[32]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@kms_ccs@[email protected]

* igt@kms_ccs@random-ccs-data-yf-tiled-ccs@pipe-d-dp-4:
- shard-dg2-set2: NOTRUN -> [SKIP][33] ([Intel XE#455] / [Intel XE#787]) +31 other tests skip
[33]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@kms_ccs@[email protected]

* igt@kms_cdclk@mode-transition:
- shard-bmg: NOTRUN -> [SKIP][34] ([Intel XE#2724])
[34]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_chamelium_color@ctm-0-25:
- shard-bmg: NOTRUN -> [SKIP][35] ([Intel XE#2325]) +1 other test skip
[35]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_chamelium_color@ctm-negative:
- shard-lnl: NOTRUN -> [SKIP][36] ([Intel XE#306]) +1 other test skip
[36]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@[email protected]

* igt@kms_chamelium_color@ctm-red-to-blue:
- shard-dg2-set2: NOTRUN -> [SKIP][37] ([Intel XE#306]) +2 other tests skip
[37]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]

* igt@kms_chamelium_edid@dp-edid-change-during-hibernate:
- shard-bmg: NOTRUN -> [SKIP][38] ([Intel XE#2252]) +13 other tests skip
[38]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_chamelium_edid@dp-edid-resolution-list:
- shard-lnl: NOTRUN -> [SKIP][39] ([Intel XE#373]) +5 other tests skip
[39]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* igt@kms_chamelium_frames@hdmi-crc-nonplanar-formats:
- shard-dg2-set2: NOTRUN -> [SKIP][40] ([Intel XE#373]) +9 other tests skip
[40]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]

* igt@kms_chamelium_sharpness_filter@filter-basic:
- shard-bmg: NOTRUN -> [SKIP][41] ([Intel XE#6507])
[41]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][42] ([Intel XE#6507])
[42]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][43] ([Intel XE#6507])
[43]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]

* igt@kms_content_protection@atomic:
- shard-bmg: NOTRUN -> [FAIL][44] ([Intel XE#1178]) +1 other test fail
[44]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [FAIL][45] ([Intel XE#1178]) +1 other test fail
[45]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-436/igt@[email protected]

* igt@kms_content_protection@content-type-change:
- shard-bmg: NOTRUN -> [SKIP][46] ([Intel XE#2341])
[46]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][47] ([Intel XE#3278])
[47]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]

* igt@kms_content_protection@dp-mst-type-0:
- shard-bmg: NOTRUN -> [SKIP][48] ([Intel XE#2390]) +1 other test skip
[48]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][49] ([Intel XE#307])
[49]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]

* igt@kms_content_protection@dp-mst-type-1:
- shard-lnl: NOTRUN -> [SKIP][50] ([Intel XE#307]) +1 other test skip
[50]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@[email protected]

* igt@kms_cursor_crc@cursor-offscreen-32x32:
- shard-bmg: NOTRUN -> [SKIP][51] ([Intel XE#2320]) +6 other tests skip
[51]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@[email protected]

* igt@kms_cursor_crc@cursor-random-512x512:
- shard-lnl: NOTRUN -> [SKIP][52] ([Intel XE#2321])
[52]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* igt@kms_cursor_crc@cursor-sliding-max-size:
- shard-lnl: NOTRUN -> [SKIP][53] ([Intel XE#1424]) +4 other tests skip
[53]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
- shard-lnl: NOTRUN -> [SKIP][54] ([Intel XE#309]) +2 other tests skip
[54]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size:
- shard-bmg: [PASS][55] -> [DMESG-WARN][56] ([Intel XE#3428]) +4 other tests dmesg-warn
[55]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-bmg-8/igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size.html
[56]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size.html

* igt@kms_cursor_legacy@cursora-vs-flipb-legacy:
- shard-bmg: NOTRUN -> [SKIP][57] ([Intel XE#2291])
[57]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_cursor_legacy@cursorb-vs-flipb-atomic-transitions:
- shard-bmg: [PASS][58] -> [SKIP][59] ([Intel XE#2291]) +1 other test skip
[58]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-bmg-1/igt@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions:
- shard-dg2-set2: NOTRUN -> [SKIP][60] ([Intel XE#323])
[60]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions.html
- shard-lnl: NOTRUN -> [SKIP][61] ([Intel XE#323])
[61]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions.html
- shard-bmg: NOTRUN -> [SKIP][62] ([Intel XE#2286])
[62]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions.html

* igt@kms_dither@fb-8bpc-vs-panel-6bpc:
- shard-bmg: NOTRUN -> [SKIP][63] ([Intel XE#1340]) +1 other test skip
[63]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-6:
- shard-dg2-set2: NOTRUN -> [SKIP][64] ([Intel XE#4494] / [i915#3804])
[64]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-464/igt@kms_dither@[email protected]

* igt@kms_dp_link_training@non-uhbr-sst:
- shard-lnl: NOTRUN -> [SKIP][65] ([Intel XE#4354])
[65]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]

* igt@kms_dp_link_training@uhbr-mst:
- shard-bmg: NOTRUN -> [SKIP][66] ([Intel XE#4354])
[66]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@[email protected]

* igt@kms_dp_linktrain_fallback@dsc-fallback:
- shard-lnl: NOTRUN -> [SKIP][67] ([Intel XE#4331])
[67]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@[email protected]

* igt@kms_fbc_dirty_rect@fbc-dirty-rectangle-different-formats:
- shard-dg2-set2: NOTRUN -> [SKIP][68] ([Intel XE#4422])
[68]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-464/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][69] ([Intel XE#4422])
[69]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@[email protected]
- shard-bmg: NOTRUN -> [SKIP][70] ([Intel XE#4422])
[70]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@[email protected]

* igt@kms_flip@2x-flip-vs-absolute-wf_vblank:
- shard-lnl: NOTRUN -> [SKIP][71] ([Intel XE#1421]) +6 other tests skip
[71]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@kms_flip@2x-flip-vs-absolute-wf_vblank.html

* igt@kms_flip@2x-flip-vs-dpms-on-nop-interruptible:
- shard-bmg: NOTRUN -> [SKIP][72] ([Intel XE#2316])
[72]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-upscaling@pipe-a-default-mode:
- shard-lnl: NOTRUN -> [SKIP][73] ([Intel XE#1401]) +3 other tests skip
[73]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-upscaling@pipe-a-default-mode.html

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-upscaling:
- shard-bmg: NOTRUN -> [SKIP][74] ([Intel XE#2293] / [Intel XE#2380]) +11 other tests skip
[74]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-upscaling.html

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-downscaling@pipe-a-valid-mode:
- shard-bmg: NOTRUN -> [SKIP][75] ([Intel XE#2293]) +11 other tests skip
[75]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-downscaling@pipe-a-valid-mode.html

* igt@kms_flip_scaled_crc@flip-64bpp-linear-to-32bpp-linear-downscaling:
- shard-lnl: NOTRUN -> [SKIP][76] ([Intel XE#1397] / [Intel XE#1745]) +1 other test skip
[76]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@kms_flip_scaled_crc@flip-64bpp-linear-to-32bpp-linear-downscaling.html

* igt@kms_flip_scaled_crc@flip-64bpp-linear-to-32bpp-linear-downscaling@pipe-a-default-mode:
- shard-lnl: NOTRUN -> [SKIP][77] ([Intel XE#1397]) +1 other test skip
[77]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@kms_flip_scaled_crc@flip-64bpp-linear-to-32bpp-linear-downscaling@pipe-a-default-mode.html

* igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-32bpp-xtile-upscaling:
- shard-lnl: NOTRUN -> [FAIL][78] ([Intel XE#4683]) +1 other test fail
[78]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-32bpp-xtile-upscaling.html

* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile-downscaling:
- shard-lnl: NOTRUN -> [SKIP][79] ([Intel XE#1401] / [Intel XE#1745]) +3 other tests skip
[79]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile-downscaling.html

* igt@kms_force_connector_basic@prune-stale-modes:
- shard-lnl: NOTRUN -> [SKIP][80] ([Intel XE#352])
[80]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_frontbuffer_tracking@drrs-1p-offscreen-pri-shrfb-draw-mmap-wc:
- shard-lnl: NOTRUN -> [SKIP][81] ([Intel XE#6312]) +2 other tests skip
[81]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@kms_frontbuffer_tracking@drrs-1p-offscreen-pri-shrfb-draw-mmap-wc.html

* igt@kms_frontbuffer_tracking@drrs-1p-primscrn-pri-shrfb-draw-render:
- shard-lnl: NOTRUN -> [SKIP][82] ([Intel XE#651]) +9 other tests skip
[82]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@kms_frontbuffer_tracking@drrs-1p-primscrn-pri-shrfb-draw-render.html

* igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-pri-indfb-draw-mmap-wc:
- shard-bmg: NOTRUN -> [SKIP][83] ([Intel XE#2311]) +43 other tests skip
[83]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-8/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-pri-indfb-draw-mmap-wc.html

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-pgflip-blt:
- shard-bmg: NOTRUN -> [SKIP][84] ([Intel XE#4141]) +19 other tests skip
[84]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc:
- shard-lnl: NOTRUN -> [SKIP][85] ([Intel XE#656]) +47 other tests skip
[85]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc.html

* igt@kms_frontbuffer_tracking@fbcdrrs-2p-primscrn-pri-indfb-draw-mmap-wc:
- shard-dg2-set2: NOTRUN -> [SKIP][86] ([Intel XE#651]) +34 other tests skip
[86]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@kms_frontbuffer_tracking@fbcdrrs-2p-primscrn-pri-indfb-draw-mmap-wc.html

* igt@kms_frontbuffer_tracking@fbcdrrs-tiling-y:
- shard-bmg: NOTRUN -> [SKIP][87] ([Intel XE#2352])
[87]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-offscreen-pri-shrfb-draw-mmap-wc:
- shard-dg2-set2: NOTRUN -> [SKIP][88] ([Intel XE#6312]) +5 other tests skip
[88]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-466/igt@kms_frontbuffer_tracking@fbcpsr-1p-offscreen-pri-shrfb-draw-mmap-wc.html

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-blt:
- shard-bmg: NOTRUN -> [SKIP][89] ([Intel XE#2313]) +33 other tests skip
[89]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-2p-primscrn-indfb-plflip-blt:
- shard-bmg: NOTRUN -> [SKIP][90] ([Intel XE#2312]) +12 other tests skip
[90]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-shrfb-scaledprimary:
- shard-dg2-set2: NOTRUN -> [SKIP][91] ([Intel XE#653]) +31 other tests skip
[91]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]

* igt@kms_hdmi_inject@inject-audio:
- shard-lnl: NOTRUN -> [SKIP][92] ([Intel XE#1470] / [Intel XE#2853])
[92]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@[email protected]

* igt@kms_hdr@bpc-switch-suspend:
- shard-dg2-set2: NOTRUN -> [ABORT][93] ([Intel XE#6675]) +16 other tests abort
[93]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-463/igt@[email protected]
- shard-lnl: NOTRUN -> [ABORT][94] ([Intel XE#6675]) +12 other tests abort
[94]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]

* igt@kms_joiner@basic-max-non-joiner:
- shard-dg2-set2: NOTRUN -> [SKIP][95] ([Intel XE#2925]) +2 other tests skip
[95]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]
- shard-bmg: NOTRUN -> [SKIP][96] ([Intel XE#6590])
[96]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_joiner@basic-ultra-joiner:
- shard-bmg: NOTRUN -> [SKIP][97] ([Intel XE#2927]) +1 other test skip
[97]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][98] ([Intel XE#2925] / [Intel XE#2927])
[98]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-464/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][99] ([Intel XE#2925] / [Intel XE#2927])
[99]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]

* igt@kms_joiner@invalid-modeset-force-ultra-joiner:
- shard-bmg: NOTRUN -> [SKIP][100] ([Intel XE#2934])
[100]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-7/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][101] ([Intel XE#2925])
[101]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@[email protected]

* igt@kms_pipe_stress@stress-xrgb8888-ytiled:
- shard-bmg: NOTRUN -> [SKIP][102] ([Intel XE#4329])
[102]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-7/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][103] ([Intel XE#4359])
[103]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-466/igt@[email protected]

* igt@kms_plane_multiple@2x-tiling-y:
- shard-bmg: NOTRUN -> [SKIP][104] ([Intel XE#5021])
[104]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_plane_multiple@2x-tiling-yf:
- shard-dg2-set2: NOTRUN -> [SKIP][105] ([Intel XE#5021]) +1 other test skip
[105]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][106] ([Intel XE#4596]) +2 other tests skip
[106]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* igt@kms_plane_scaling@intel-max-src-size:
- shard-lnl: NOTRUN -> [SKIP][107] ([Intel XE#3307])
[107]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_plane_scaling@plane-downscale-factor-0-5-with-modifiers:
- shard-lnl: NOTRUN -> [SKIP][108] ([Intel XE#2763]) +7 other tests skip
[108]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_pm_backlight@fade:
- shard-bmg: NOTRUN -> [SKIP][109] ([Intel XE#870])
[109]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-8/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][110] ([Intel XE#870])
[110]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]

* igt@kms_pm_dc@dc5-psr:
- shard-bmg: NOTRUN -> [SKIP][111] ([Intel XE#2392])
[111]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][112] ([Intel XE#1129])
[112]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-436/igt@[email protected]

* igt@kms_pm_dc@dc5-retention-flops:
- shard-dg2-set2: NOTRUN -> [SKIP][113] ([Intel XE#3309])
[113]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][114] ([Intel XE#3309])
[114]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]
- shard-bmg: NOTRUN -> [SKIP][115] ([Intel XE#3309])
[115]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-8/igt@[email protected]

* igt@kms_pm_dc@dc6-dpms:
- shard-lnl: NOTRUN -> [FAIL][116] ([Intel XE#718])
[116]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@[email protected]

* igt@kms_pm_dc@deep-pkgc:
- shard-bmg: NOTRUN -> [SKIP][117] ([Intel XE#2505])
[117]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_pm_rpm@dpms-non-lpsp:
- shard-lnl: NOTRUN -> [SKIP][118] ([Intel XE#1439] / [Intel XE#3141])
[118]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_pm_rpm@modeset-lpsp-stress-no-wait:
- shard-bmg: NOTRUN -> [SKIP][119] ([Intel XE#1439] / [Intel XE#3141] / [Intel XE#836])
[119]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-7/igt@[email protected]

* igt@kms_psr2_sf@fbc-pr-cursor-plane-update-sf:
- shard-lnl: NOTRUN -> [SKIP][120] ([Intel XE#1406] / [Intel XE#2893]) +4 other tests skip
[120]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]

* igt@kms_psr2_sf@fbc-pr-plane-move-sf-dmg-area:
- shard-dg2-set2: NOTRUN -> [SKIP][121] ([Intel XE#1406] / [Intel XE#1489]) +11 other tests skip
[121]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-463/igt@[email protected]

* igt@kms_psr2_sf@fbc-psr2-plane-move-sf-dmg-area:
- shard-lnl: NOTRUN -> [SKIP][122] ([Intel XE#1406] / [Intel XE#2893] / [Intel XE#4608])
[122]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* igt@kms_psr2_sf@fbc-psr2-plane-move-sf-dmg-area@pipe-b-edp-1:
- shard-lnl: NOTRUN -> [SKIP][123] ([Intel XE#1406] / [Intel XE#4608]) +1 other test skip
[123]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@kms_psr2_sf@[email protected]

* igt@kms_psr2_sf@psr2-overlay-plane-move-continuous-exceed-fully-sf:
- shard-bmg: NOTRUN -> [SKIP][124] ([Intel XE#1406] / [Intel XE#1489]) +12 other tests skip
[124]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@kms_psr2_sf@psr2-overlay-plane-move-continuous-exceed-fully-sf.html

* igt@kms_psr2_su@frontbuffer-xrgb8888:
- shard-lnl: NOTRUN -> [SKIP][125] ([Intel XE#1128] / [Intel XE#1406])
[125]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_psr@fbc-psr2-sprite-blt@edp-1:
- shard-lnl: NOTRUN -> [SKIP][126] ([Intel XE#1406] / [Intel XE#4609]) +2 other tests skip
[126]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@kms_psr@[email protected]

* igt@kms_psr@pr-sprite-blt:
- shard-lnl: NOTRUN -> [SKIP][127] ([Intel XE#1406]) +6 other tests skip
[127]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]

* igt@kms_psr@psr-dpms:
- shard-dg2-set2: NOTRUN -> [SKIP][128] ([Intel XE#1406] / [Intel XE#2850] / [Intel XE#929]) +22 other tests skip
[128]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]

* igt@kms_psr@psr-suspend@edp-1:
- shard-lnl: NOTRUN -> [ABORT][129] ([Intel XE#2625] / [Intel XE#6675]) +1 other test abort
[129]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@kms_psr@[email protected]

* igt@kms_psr@psr2-sprite-blt:
- shard-bmg: NOTRUN -> [SKIP][130] ([Intel XE#1406] / [Intel XE#2234] / [Intel XE#2850]) +25 other tests skip
[130]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@kms_psr_stress_test@flip-primary-invalidate-overlay:
- shard-bmg: NOTRUN -> [SKIP][131] ([Intel XE#1406] / [Intel XE#2414])
[131]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-1/igt@[email protected]

* igt@kms_rotation_crc@primary-rotation-90:
- shard-bmg: NOTRUN -> [SKIP][132] ([Intel XE#3414] / [Intel XE#3904]) +3 other tests skip
[132]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@[email protected]

* igt@kms_rotation_crc@primary-x-tiled-reflect-x-0:
- shard-lnl: NOTRUN -> [FAIL][133] ([Intel XE#4689])
[133]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]

* igt@kms_rotation_crc@primary-y-tiled-reflect-x-90:
- shard-dg2-set2: NOTRUN -> [SKIP][134] ([Intel XE#3414]) +3 other tests skip
[134]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][135] ([Intel XE#3414] / [Intel XE#3904]) +4 other tests skip
[135]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180:
- shard-bmg: NOTRUN -> [SKIP][136] ([Intel XE#2330]) +1 other test skip
[136]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][137] ([Intel XE#1127])
[137]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-464/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][138] ([Intel XE#1127])
[138]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]

* igt@kms_scaling_modes@scaling-mode-full-aspect:
- shard-bmg: NOTRUN -> [SKIP][139] ([Intel XE#2413])
[139]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@[email protected]

* igt@kms_sharpness_filter@invalid-plane-with-filter:
- shard-bmg: NOTRUN -> [SKIP][140] ([Intel XE#6503]) +2 other tests skip
[140]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@[email protected]
- shard-lnl: [PASS][141] -> [DMESG-WARN][142] ([Intel XE#4537])
[141]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-8/igt@[email protected]
[142]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@[email protected]

* igt@kms_vrr@cmrr:
- shard-bmg: NOTRUN -> [SKIP][143] ([Intel XE#2168])
[143]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@[email protected]

* igt@kms_vrr@flipline:
- shard-dg2-set2: NOTRUN -> [SKIP][144] ([Intel XE#455]) +21 other tests skip
[144]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-464/igt@[email protected]
- shard-bmg: NOTRUN -> [SKIP][145] ([Intel XE#1499])
[145]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@xe_ccs@suspend-resume@linear-compressed-compfmt0-system-vram01:
- shard-bmg: NOTRUN -> [ABORT][146] ([Intel XE#6675]) +13 other tests abort
[146]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-1/igt@xe_ccs@[email protected]

* igt@xe_compute@eu-busy-10s:
- shard-bmg: NOTRUN -> [SKIP][147] ([Intel XE#6599])
[147]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@[email protected]

* igt@xe_compute_preempt@compute-preempt:
- shard-dg2-set2: NOTRUN -> [SKIP][148] ([Intel XE#6360])
[148]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]

* igt@xe_copy_basic@mem-copy-linear-0x3fff:
- shard-dg2-set2: NOTRUN -> [SKIP][149] ([Intel XE#1123]) +1 other test skip
[149]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]

* igt@xe_copy_basic@mem-matrix-copy-2x2:
- shard-dg2-set2: NOTRUN -> [SKIP][150] ([Intel XE#5300])
[150]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]

* igt@xe_copy_basic@mem-set-linear-0xfffe:
- shard-dg2-set2: NOTRUN -> [SKIP][151] ([Intel XE#1126]) +1 other test skip
[151]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]

* igt@xe_eudebug@basic-vm-access-parameters:
- shard-lnl: NOTRUN -> [SKIP][152] ([Intel XE#4837]) +12 other tests skip
[152]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]

* igt@xe_eudebug@discovery-empty:
- shard-bmg: NOTRUN -> [SKIP][153] ([Intel XE#4837]) +15 other tests skip
[153]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@[email protected]

* igt@xe_eudebug@vma-ufence-faultable:
- shard-dg2-set2: NOTRUN -> [SKIP][154] ([Intel XE#4837]) +17 other tests skip
[154]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]

* igt@xe_eudebug_sriov@deny-sriov:
- shard-bmg: NOTRUN -> [SKIP][155] ([Intel XE#5793])
[155]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@xe_evict@evict-beng-mixed-many-threads-small:
- shard-bmg: [PASS][156] -> [INCOMPLETE][157] ([Intel XE#6321] / [Intel XE#6606])
[156]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-bmg-7/igt@[email protected]
[157]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@xe_evict@evict-beng-threads-large-multi-vm:
- shard-lnl: NOTRUN -> [SKIP][158] ([Intel XE#688]) +11 other tests skip
[158]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue-userptr:
- shard-bmg: NOTRUN -> [SKIP][159] ([Intel XE#2322]) +10 other tests skip
[159]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue-userptr.html

* igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue-userptr-invalidate-race:
- shard-lnl: NOTRUN -> [SKIP][160] ([Intel XE#1392]) +4 other tests skip
[160]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue-userptr-invalidate-race.html

* igt@xe_exec_fault_mode@once-rebind-imm:
- shard-dg2-set2: NOTRUN -> [SKIP][161] ([Intel XE#288]) +29 other tests skip
[161]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-463/igt@[email protected]

* igt@xe_exec_mix_modes@exec-simple-batch-store-lr:
- shard-dg2-set2: NOTRUN -> [SKIP][162] ([Intel XE#2360]) +1 other test skip
[162]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]

* igt@xe_exec_system_allocator@many-64k-mmap-huge:
- shard-bmg: NOTRUN -> [SKIP][163] ([Intel XE#5007])
[163]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][164] ([Intel XE#5007])
[164]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]

* igt@xe_exec_system_allocator@many-64k-mmap-mlock-nomemset:
- shard-dg2-set2: NOTRUN -> [SKIP][165] ([Intel XE#4915]) +384 other tests skip
[165]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]

* igt@xe_exec_system_allocator@many-large-execqueues-mmap-huge-nomemset:
- shard-lnl: NOTRUN -> [SKIP][166] ([Intel XE#4943]) +19 other tests skip
[166]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@xe_exec_system_allocator@many-large-execqueues-mmap-huge-nomemset.html

* igt@xe_exec_system_allocator@many-large-malloc-prefetch-madvise:
- shard-lnl: NOTRUN -> [WARN][167] ([Intel XE#5786]) +1 other test warn
[167]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@xe_exec_system_allocator@once-mmap-remap-ro-dontunmap-eocheck:
- shard-bmg: NOTRUN -> [DMESG-WARN][168] ([Intel XE#3428]) +2 other tests dmesg-warn
[168]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@xe_exec_system_allocator@once-mmap-remap-ro-dontunmap-eocheck.html

* igt@xe_exec_system_allocator@threads-shared-vm-many-execqueues-mmap-new-huge:
- shard-bmg: NOTRUN -> [SKIP][169] ([Intel XE#4943]) +24 other tests skip
[169]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@xe_exec_system_allocator@threads-shared-vm-many-execqueues-mmap-new-huge.html

* igt@xe_fault_injection@exec-queue-create-fail-xe_pxp_exec_queue_add:
- shard-bmg: NOTRUN -> [SKIP][170] ([Intel XE#6281])
[170]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@xe_fault_injection@exec-queue-create-fail-xe_pxp_exec_queue_add.html
- shard-dg2-set2: NOTRUN -> [SKIP][171] ([Intel XE#6281])
[171]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@xe_fault_injection@exec-queue-create-fail-xe_pxp_exec_queue_add.html

* igt@xe_fault_injection@probe-fail-guc-xe_guc_mmio_send_recv:
- shard-dg2-set2: [PASS][172] -> [DMESG-WARN][173] ([Intel XE#5893])
[172]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-464/igt@xe_fault_injection@probe-fail-guc-xe_guc_mmio_send_recv.html
[173]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@xe_fault_injection@probe-fail-guc-xe_guc_mmio_send_recv.html

* igt@xe_live_ktest@xe_eudebug:
- shard-bmg: NOTRUN -> [SKIP][174] ([Intel XE#2833])
[174]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@xe_live_ktest@xe_eudebug.html
- shard-lnl: NOTRUN -> [SKIP][175] ([Intel XE#2833])
[175]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@xe_live_ktest@xe_eudebug.html

* igt@xe_mmap@pci-membarrier:
- shard-lnl: NOTRUN -> [SKIP][176] ([Intel XE#5100])
[176]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@[email protected]

* igt@xe_mmap@small-bar:
- shard-bmg: NOTRUN -> [SKIP][177] ([Intel XE#586])
[177]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-5/igt@[email protected]

* igt@xe_oa@non-zero-reason-all:
- shard-dg2-set2: NOTRUN -> [SKIP][178] ([Intel XE#6377])
[178]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]

* igt@xe_oa@whitelisted-registers-userspace-config:
- shard-dg2-set2: NOTRUN -> [SKIP][179] ([Intel XE#3573]) +8 other tests skip
[179]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]

* igt@xe_pat@pat-index-xehpc:
- shard-bmg: NOTRUN -> [SKIP][180] ([Intel XE#1420])
[180]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-3/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][181] ([Intel XE#2838] / [Intel XE#979])
[181]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][182] ([Intel XE#1420] / [Intel XE#2838])
[182]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]

* igt@xe_pm@d3cold-basic-exec:
- shard-dg2-set2: NOTRUN -> [SKIP][183] ([Intel XE#2284] / [Intel XE#366])
[183]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]

* igt@xe_pm@d3cold-mmap-system:
- shard-bmg: NOTRUN -> [SKIP][184] ([Intel XE#2284]) +1 other test skip
[184]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@xe_pm@d3hot-mmap-vram:
- shard-lnl: NOTRUN -> [SKIP][185] ([Intel XE#1948])
[185]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* igt@xe_pm@s3-multiple-execs:
- shard-lnl: NOTRUN -> [SKIP][186] ([Intel XE#584]) +1 other test skip
[186]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]

* igt@xe_pmu@fn-engine-activity-sched-if-idle:
- shard-lnl: NOTRUN -> [SKIP][187] ([Intel XE#4650])
[187]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][188] ([Intel XE#4650])
[188]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]

* igt@xe_pmu@gt-c6-idle:
- shard-dg2-set2: [PASS][189] -> [FAIL][190] ([Intel XE#6366])
[189]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-432/igt@[email protected]
[190]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]

* igt@xe_pxp@pxp-stale-queue-post-suspend:
- shard-lnl: [PASS][191] -> [ABORT][192] ([Intel XE#6675]) +1 other test abort
[191]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-1/igt@[email protected]
[192]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@[email protected]

* igt@xe_pxp@pxp-termination-key-update-post-suspend:
- shard-bmg: NOTRUN -> [SKIP][193] ([Intel XE#4733]) +2 other tests skip
[193]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-7/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][194] ([Intel XE#4733]) +3 other tests skip
[194]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-466/igt@[email protected]

* igt@xe_query@multigpu-query-uc-fw-version-huc:
- shard-bmg: NOTRUN -> [SKIP][195] ([Intel XE#944]) +3 other tests skip
[195]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-8/igt@[email protected]
- shard-dg2-set2: NOTRUN -> [SKIP][196] ([Intel XE#944]) +2 other tests skip
[196]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][197] ([Intel XE#944]) +1 other test skip
[197]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]

* igt@xe_render_copy@render-stress-4-copies:
- shard-dg2-set2: NOTRUN -> [SKIP][198] ([Intel XE#4814])
[198]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]

* igt@xe_sriov_auto_provisioning@selfconfig-basic:
- shard-dg2-set2: NOTRUN -> [SKIP][199] ([Intel XE#4130])
[199]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]

* igt@xe_sriov_flr@flr-each-isolation:
- shard-dg2-set2: NOTRUN -> [SKIP][200] ([Intel XE#3342])
[200]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][201] ([Intel XE#3342])
[201]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@[email protected]

* igt@xe_sriov_flr@flr-vfs-parallel:
- shard-lnl: NOTRUN -> [SKIP][202] ([Intel XE#4273])
[202]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]

* igt@xe_sriov_vram@vf-access-after-resize-up:
- shard-dg2-set2: NOTRUN -> [SKIP][203] ([Intel XE#6318])
[203]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-466/igt@[email protected]
- shard-lnl: NOTRUN -> [SKIP][204] ([Intel XE#6376])
[204]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]

* igt@xe_survivability@runtime-survivability:
- shard-dg2-set2: NOTRUN -> [SKIP][205] ([Intel XE#6529])
[205]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]

#### Possible fixes ####

* igt@xe_module_load@load:
- shard-lnl: ([PASS][206], [PASS][207], [PASS][208], [PASS][209], [PASS][210], [PASS][211], [PASS][212], [PASS][213], [PASS][214], [PASS][215], [PASS][216], [PASS][217], [PASS][218], [PASS][219], [PASS][220], [PASS][221], [PASS][222], [PASS][223], [PASS][224], [PASS][225], [SKIP][226], [PASS][227], [PASS][228], [PASS][229], [PASS][230], [PASS][231]) ([Intel XE#378]) -> ([PASS][232], [PASS][233], [PASS][234], [PASS][235], [PASS][236], [PASS][237], [PASS][238], [PASS][239], [PASS][240], [PASS][241], [PASS][242], [PASS][243], [PASS][244], [PASS][245], [PASS][246], [PASS][247], [PASS][248], [PASS][249], [PASS][250], [PASS][251], [PASS][252], [PASS][253], [PASS][254], [PASS][255], [PASS][256])
[206]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-2/igt@[email protected]
[207]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-2/igt@[email protected]
[208]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-2/igt@[email protected]
[209]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-4/igt@[email protected]
[210]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-4/igt@[email protected]
[211]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-4/igt@[email protected]
[212]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-3/igt@[email protected]
[213]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-4/igt@[email protected]
[214]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-3/igt@[email protected]
[215]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-3/igt@[email protected]
[216]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-8/igt@[email protected]
[217]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-7/igt@[email protected]
[218]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-7/igt@[email protected]
[219]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-8/igt@[email protected]
[220]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-7/igt@[email protected]
[221]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-8/igt@[email protected]
[222]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-8/igt@[email protected]
[223]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-5/igt@[email protected]
[224]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-5/igt@[email protected]
[225]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-5/igt@[email protected]
[226]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-5/igt@[email protected]
[227]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-5/igt@[email protected]
[228]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-5/igt@[email protected]
[229]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-1/igt@[email protected]
[230]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-1/igt@[email protected]
[231]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-1/igt@[email protected]
[232]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]
[233]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]
[234]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]
[235]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]
[236]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]
[237]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@[email protected]
[238]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@[email protected]
[239]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@[email protected]
[240]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-3/igt@[email protected]
[241]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]
[242]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-5/igt@[email protected]
[243]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]
[244]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@[email protected]
[245]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]
[246]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@[email protected]
[247]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-4/igt@[email protected]
[248]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@[email protected]
[249]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@[email protected]
[250]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@[email protected]
[251]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]
[252]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]
[253]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-2/igt@[email protected]
[254]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@[email protected]
[255]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-8/igt@[email protected]
[256]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-1/igt@[email protected]
- shard-dg2-set2: ([PASS][257], [SKIP][258], [PASS][259], [PASS][260], [PASS][261], [PASS][262], [PASS][263], [PASS][264], [PASS][265], [PASS][266], [PASS][267], [PASS][268], [PASS][269], [PASS][270], [PASS][271], [PASS][272], [PASS][273], [PASS][274], [PASS][275], [PASS][276], [PASS][277], [PASS][278], [PASS][279], [PASS][280], [PASS][281]) ([Intel XE#378]) -> ([PASS][282], [PASS][283], [PASS][284], [PASS][285], [PASS][286], [PASS][287], [PASS][288], [PASS][289], [PASS][290], [PASS][291], [PASS][292], [PASS][293], [PASS][294], [PASS][295], [PASS][296], [PASS][297], [PASS][298], [PASS][299], [PASS][300], [PASS][301], [PASS][302], [PASS][303], [PASS][304], [PASS][305])
[257]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-466/igt@[email protected]
[258]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-466/igt@[email protected]
[259]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-466/igt@[email protected]
[260]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-466/igt@[email protected]
[261]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-435/igt@[email protected]
[262]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-435/igt@[email protected]
[263]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-435/igt@[email protected]
[264]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-463/igt@[email protected]
[265]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-463/igt@[email protected]
[266]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-463/igt@[email protected]
[267]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-434/igt@[email protected]
[268]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-434/igt@[email protected]
[269]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-464/igt@[email protected]
[270]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-464/igt@[email protected]
[271]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-464/igt@[email protected]
[272]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-432/igt@[email protected]
[273]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-432/igt@[email protected]
[274]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-432/igt@[email protected]
[275]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-433/igt@[email protected]
[276]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-433/igt@[email protected]
[277]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-433/igt@[email protected]
[278]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-436/igt@[email protected]
[279]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-436/igt@[email protected]
[280]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-436/igt@[email protected]
[281]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-dg2-436/igt@[email protected]
[282]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-466/igt@[email protected]
[283]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-466/igt@[email protected]
[284]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-466/igt@[email protected]
[285]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-463/igt@[email protected]
[286]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-463/igt@[email protected]
[287]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-463/igt@[email protected]
[288]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]
[289]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-464/igt@[email protected]
[290]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]
[291]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]
[292]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]
[293]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-436/igt@[email protected]
[294]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-436/igt@[email protected]
[295]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]
[296]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]
[297]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-435/igt@[email protected]
[298]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-434/igt@[email protected]
[299]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]
[300]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-433/igt@[email protected]
[301]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]
[302]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-432/igt@[email protected]
[303]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-464/igt@[email protected]
[304]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-464/igt@[email protected]
[305]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-dg2-436/igt@[email protected]

* igt@xe_pm_residency@gt-c6-freeze@gt0:
- shard-lnl: [ABORT][306] ([Intel XE#6675]) -> [PASS][307]
[306]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-lnl-8/igt@xe_pm_residency@[email protected]
[307]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-lnl-7/igt@xe_pm_residency@[email protected]

#### Warnings ####

* igt@kms_frontbuffer_tracking@drrs-2p-primscrn-spr-indfb-fullscreen:
- shard-bmg: [SKIP][308] ([Intel XE#2311]) -> [SKIP][309] ([Intel XE#2312]) +2 other tests skip
[308]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-bmg-1/igt@kms_frontbuffer_tracking@drrs-2p-primscrn-spr-indfb-fullscreen.html
[309]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@kms_frontbuffer_tracking@drrs-2p-primscrn-spr-indfb-fullscreen.html

* igt@kms_frontbuffer_tracking@drrs-2p-rte:
- shard-bmg: [SKIP][310] ([Intel XE#2312]) -> [SKIP][311] ([Intel XE#2311])
[310]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-bmg-2/igt@[email protected]
[311]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-msflip-blt:
- shard-bmg: [SKIP][312] ([Intel XE#4141]) -> [SKIP][313] ([Intel XE#2312])
[312]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-bmg-7/igt@[email protected]
[313]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-2p-pri-indfb-multidraw:
- shard-bmg: [SKIP][314] ([Intel XE#2313]) -> [SKIP][315] ([Intel XE#2312]) +2 other tests skip
[314]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-bmg-6/igt@[email protected]
[315]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-2/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-2p-primscrn-cur-indfb-onoff:
- shard-bmg: [SKIP][316] ([Intel XE#2312]) -> [SKIP][317] ([Intel XE#2313]) +4 other tests skip
[316]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8637/shard-bmg-2/igt@[email protected]
[317]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14099/shard-bmg-8/igt@[email protected]

219 lines not shown · raw message

Part of this message is not shown here. View the raw message.

#38 lore raw

✗ i915.CI.Full: failure for Madvise feature in SVM for Multi-GPU configs

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: Madvise feature in SVM for Multi-GPU configs
URL : https://patchwork.freedesktop.org/series/157925/
State : failure

== Summary ==

CI Bug Log - changes from IGT_8637_full -> IGTPW_14099_full
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in IGTPW_14099_full, 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_14099/index.html

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_async_flips@invalid-async-flip-atomic:
- shard-mtlp: NOTRUN -> [FAIL][1] +2 other tests fail
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-2/igt@[email protected]

* igt@kms_content_protection@dp-mst-suspend-resume:
- shard-mtlp: NOTRUN -> [SKIP][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-6/igt@[email protected]

New tests
---------

New tests have been introduced between IGT_8637_full and IGTPW_14099_full:

### New IGT tests (1) ###

* igt@kms_dirtyfb@fbc-dirtyfb-ioctl@a-hdmi-a-2:
- Statuses : 1 pass(s)
- Exec time: [1.34] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@api_intel_bb@crc32:
- shard-rkl: NOTRUN -> [SKIP][3] ([i915#6230])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-7/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][4] ([i915#6230])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-16/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][5] ([i915#6230])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-4/igt@[email protected]

* igt@device_reset@cold-reset-bound:
- shard-rkl: NOTRUN -> [SKIP][6] ([i915#11078] / [i915#14544])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@device_reset@unbind-reset-rebind:
- shard-dg1: NOTRUN -> [ABORT][7] ([i915#11814] / [i915#11815])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@[email protected]

* igt@drm_buddy@drm_buddy:
- shard-dg1: NOTRUN -> [DMESG-WARN][8] ([i915#15095]) +1 other test dmesg-warn
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@drm_buddy@drm_buddy.html
- shard-snb: NOTRUN -> [DMESG-WARN][9] ([i915#15095]) +1 other test dmesg-warn
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-snb6/igt@drm_buddy@drm_buddy.html
- shard-dg2: NOTRUN -> [DMESG-WARN][10] ([i915#15095]) +1 other test dmesg-warn
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@drm_buddy@drm_buddy.html

* igt@gem_busy@semaphore:
- shard-dg2: NOTRUN -> [SKIP][11] ([i915#3936])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-11/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][12] ([i915#3936])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-17/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][13] ([i915#3936])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-4/igt@[email protected]

* igt@gem_ccs@block-copy-compressed:
- shard-dg1: NOTRUN -> [SKIP][14] ([i915#3555] / [i915#9323]) +1 other test skip
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-16/igt@[email protected]

* igt@gem_ccs@ctrl-surf-copy:
- shard-mtlp: NOTRUN -> [SKIP][15] ([i915#3555] / [i915#9323]) +1 other test skip
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-6/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][16] ([i915#3555] / [i915#9323])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-5/igt@[email protected]
- shard-tglu-1: NOTRUN -> [SKIP][17] ([i915#3555] / [i915#9323])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@[email protected]

* igt@gem_ccs@suspend-resume:
- shard-tglu: NOTRUN -> [SKIP][18] ([i915#9323])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-4/igt@[email protected]

* igt@gem_close_race@multigpu-basic-threads:
- shard-dg2: NOTRUN -> [SKIP][19] ([i915#7697])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-4/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][20] ([i915#14544] / [i915#7697])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][21] ([i915#7697])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][22] ([i915#7697])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-7/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][23] ([i915#7697])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-7/igt@[email protected]

* igt@gem_create@create-ext-cpu-access-big:
- shard-tglu: NOTRUN -> [SKIP][24] ([i915#6335])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][25] ([i915#6335])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-5/igt@[email protected]
- shard-dg2: NOTRUN -> [ABORT][26] ([i915#13427])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-1/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][27] ([i915#6335])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-5/igt@[email protected]

* igt@gem_ctx_persistence@engines-queued:
- shard-snb: NOTRUN -> [SKIP][28] ([i915#1099]) +6 other tests skip
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-snb4/igt@[email protected]

* igt@gem_ctx_persistence@heartbeat-hostile:
- shard-dg2: NOTRUN -> [SKIP][29] ([i915#8555]) +1 other test skip
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-4/igt@[email protected]

* igt@gem_ctx_persistence@heartbeat-stop:
- shard-dg1: NOTRUN -> [SKIP][30] ([i915#8555]) +1 other test skip
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-18/igt@[email protected]

* igt@gem_ctx_sseu@invalid-args:
- shard-rkl: NOTRUN -> [SKIP][31] ([i915#14544] / [i915#280])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@gem_ctx_sseu@invalid-sseu:
- shard-dg2: NOTRUN -> [SKIP][32] ([i915#280]) +1 other test skip
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-7/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][33] ([i915#280]) +1 other test skip
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-16/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][34] ([i915#280]) +1 other test skip
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-5/igt@[email protected]

* igt@gem_eio@in-flight-suspend:
- shard-glk: NOTRUN -> [INCOMPLETE][35] ([i915#13390])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk6/igt@[email protected]

* igt@gem_eio@reset-stress:
- shard-snb: NOTRUN -> [FAIL][36] ([i915#8898])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-snb6/igt@[email protected]

* igt@gem_exec_balancer@bonded-pair:
- shard-mtlp: NOTRUN -> [SKIP][37] ([i915#4771])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-3/igt@[email protected]
- shard-dg2: NOTRUN -> [SKIP][38] ([i915#4771])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-8/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][39] ([i915#4771])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]

* igt@gem_exec_balancer@parallel:
- shard-tglu: NOTRUN -> [SKIP][40] ([i915#4525]) +3 other tests skip
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-9/igt@[email protected]

* igt@gem_exec_balancer@parallel-balancer:
- shard-rkl: NOTRUN -> [SKIP][41] ([i915#4525]) +3 other tests skip
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-5/igt@[email protected]

* igt@gem_exec_big@single:
- shard-tglu: NOTRUN -> [ABORT][42] ([i915#11713])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-2/igt@[email protected]

* igt@gem_exec_capture@capture-recoverable:
- shard-rkl: NOTRUN -> [SKIP][43] ([i915#14544] / [i915#6344])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@gem_exec_fence@submit:
- shard-dg1: NOTRUN -> [SKIP][44] ([i915#4812]) +2 other tests skip
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][45] ([i915#4812])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-3/igt@[email protected]
- shard-dg2: NOTRUN -> [SKIP][46] ([i915#4812])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-8/igt@[email protected]

* igt@gem_exec_flush@basic-batch-kernel-default-uc:
- shard-dg2: NOTRUN -> [SKIP][47] ([i915#3539] / [i915#4852]) +3 other tests skip
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-7/igt@[email protected]

* igt@gem_exec_flush@basic-uc-prw-default:
- shard-dg1: NOTRUN -> [SKIP][48] ([i915#3539])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@[email protected]
- shard-dg2: NOTRUN -> [SKIP][49] ([i915#3539])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-7/igt@[email protected]

* igt@gem_exec_flush@basic-wb-rw-before-default:
- shard-dg1: NOTRUN -> [SKIP][50] ([i915#3539] / [i915#4852]) +2 other tests skip
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@[email protected]

* igt@gem_exec_reloc@basic-concurrent0:
- shard-dg1: NOTRUN -> [SKIP][51] ([i915#3281]) +20 other tests skip
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-17/igt@[email protected]

* igt@gem_exec_reloc@basic-cpu-read:
- shard-dg2: NOTRUN -> [SKIP][52] ([i915#3281]) +22 other tests skip
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@[email protected]

* igt@gem_exec_reloc@basic-cpu-read-noreloc:
- shard-rkl: NOTRUN -> [SKIP][53] ([i915#14544] / [i915#3281])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@gem_exec_reloc@basic-gtt-noreloc:
- shard-mtlp: NOTRUN -> [SKIP][54] ([i915#3281]) +18 other tests skip
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@[email protected]

* igt@gem_exec_reloc@basic-write-read-noreloc:
- shard-rkl: NOTRUN -> [SKIP][55] ([i915#3281]) +16 other tests skip
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-7/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-contexts-chain:
- shard-dg2: NOTRUN -> [SKIP][56] ([i915#4537] / [i915#4812])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@[email protected]

* igt@gem_exec_schedule@semaphore-power:
- shard-rkl: NOTRUN -> [SKIP][57] ([i915#7276])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-5/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][58] ([i915#4537] / [i915#4812])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-5/igt@[email protected]

* igt@gem_exec_suspend@basic-s4-devices:
- shard-glk: NOTRUN -> [ABORT][59] ([i915#15317]) +7 other tests abort
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk1/igt@[email protected]

* igt@gem_exec_suspend@basic-s4-devices@smem:
- shard-dg1: [PASS][60] -> [ABORT][61] ([i915#15317] / [i915#7975])
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8637/shard-dg1-15/igt@gem_exec_suspend@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@gem_exec_suspend@[email protected]

* igt@gem_fence_thrash@bo-write-verify-none:
- shard-mtlp: NOTRUN -> [SKIP][62] ([i915#4860])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-4/igt@[email protected]

* igt@gem_fenced_exec_thrash@no-spare-fences-busy:
- shard-dg1: NOTRUN -> [SKIP][63] ([i915#4860]) +2 other tests skip
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@[email protected]

* igt@gem_fenced_exec_thrash@no-spare-fences-interruptible:
- shard-dg2: NOTRUN -> [SKIP][64] ([i915#4860]) +2 other tests skip
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@[email protected]

* igt@gem_lmem_evict@dontneed-evict-race:
- shard-rkl: NOTRUN -> [SKIP][65] ([i915#4613] / [i915#7582])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-4/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][66] ([i915#4613] / [i915#7582])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@[email protected]

* igt@gem_lmem_swapping@heavy-verify-multi-ccs:
- shard-tglu: NOTRUN -> [SKIP][67] ([i915#4613]) +7 other tests skip
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-6/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][68] ([i915#4613]) +7 other tests skip
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-6/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random:
- shard-rkl: NOTRUN -> [SKIP][69] ([i915#14544] / [i915#4613])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-verify-ccs:
- shard-rkl: NOTRUN -> [SKIP][70] ([i915#4613]) +4 other tests skip
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-2/igt@[email protected]
- shard-glk: NOTRUN -> [SKIP][71] ([i915#4613]) +4 other tests skip
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk5/igt@[email protected]

* igt@gem_lmem_swapping@verify-random-ccs:
- shard-dg1: NOTRUN -> [SKIP][72] ([i915#12193]) +3 other tests skip
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-18/igt@[email protected]

* igt@gem_lmem_swapping@verify-random-ccs@lmem0:
- shard-dg1: NOTRUN -> [SKIP][73] ([i915#4565]) +3 other tests skip
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-18/igt@gem_lmem_swapping@[email protected]

* igt@gem_media_fill@media-fill:
- shard-mtlp: NOTRUN -> [SKIP][74] ([i915#8289])
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-7/igt@[email protected]
- shard-dg2: NOTRUN -> [SKIP][75] ([i915#8289])
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-4/igt@[email protected]

* igt@gem_mmap@bad-object:
- shard-dg1: NOTRUN -> [SKIP][76] ([i915#4083]) +4 other tests skip
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][77] ([i915#4083]) +3 other tests skip
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-3/igt@[email protected]

* igt@gem_mmap_wc@write-prefaulted:
- shard-dg2: NOTRUN -> [SKIP][78] ([i915#4083]) +6 other tests skip
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-1/igt@[email protected]

* igt@gem_partial_pwrite_pread@reads-display:
- shard-mtlp: NOTRUN -> [SKIP][79] ([i915#3282]) +6 other tests skip
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@[email protected]

* igt@gem_pread@exhaustion:
- shard-dg1: NOTRUN -> [SKIP][80] ([i915#3282]) +10 other tests skip
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-13/igt@[email protected]
- shard-snb: NOTRUN -> [WARN][81] ([i915#2658])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-snb5/igt@[email protected]
- shard-tglu: NOTRUN -> [WARN][82] ([i915#2658]) +1 other test warn
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-10/igt@[email protected]

* igt@gem_pread@snoop:
- shard-dg2: NOTRUN -> [SKIP][83] ([i915#3282]) +13 other tests skip
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-1/igt@[email protected]

* igt@gem_pwrite@basic-exhaustion:
- shard-glk: NOTRUN -> [WARN][84] ([i915#14702] / [i915#2658])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk6/igt@[email protected]

* igt@gem_pxp@verify-pxp-execution-after-suspend-resume:
- shard-dg2: NOTRUN -> [SKIP][85] ([i915#4270]) +6 other tests skip
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-7/igt@[email protected]
- shard-tglu-1: NOTRUN -> [ABORT][86] ([i915#15317])
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@[email protected]

* igt@gem_pxp@verify-pxp-key-change-after-suspend-resume:
- shard-dg1: NOTRUN -> [SKIP][87] ([i915#4270]) +6 other tests skip
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@[email protected]

* igt@gem_render_copy@linear-to-vebox-yf-tiled:
- shard-dg2: NOTRUN -> [SKIP][88] ([i915#5190] / [i915#8428]) +9 other tests skip
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@[email protected]

* igt@gem_render_copy@y-tiled-mc-ccs-to-vebox-yf-tiled:
- shard-mtlp: NOTRUN -> [SKIP][89] ([i915#8428]) +8 other tests skip
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-6/igt@[email protected]

* igt@gem_set_tiling_vs_blt@untiled-to-tiled:
- shard-dg2: NOTRUN -> [SKIP][90] ([i915#4079]) +1 other test skip
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-7/igt@[email protected]

* igt@gem_softpin@evict-snoop:
- shard-dg2: NOTRUN -> [SKIP][91] ([i915#4885])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-6/igt@[email protected]

* igt@gem_tiled_partial_pwrite_pread@writes:
- shard-dg2: NOTRUN -> [SKIP][92] ([i915#4077]) +14 other tests skip
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-6/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][93] ([i915#3282]) +9 other tests skip
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-2/igt@[email protected]

* igt@gem_tiled_pread_pwrite:
- shard-dg1: NOTRUN -> [SKIP][94] ([i915#4079]) +1 other test skip
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-17/igt@gem_tiled_pread_pwrite.html
- shard-mtlp: NOTRUN -> [SKIP][95] ([i915#4079]) +1 other test skip
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-5/igt@gem_tiled_pread_pwrite.html

* igt@gem_tiling_max_stride:
- shard-mtlp: NOTRUN -> [SKIP][96] ([i915#4077]) +13 other tests skip
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@gem_tiling_max_stride.html

* igt@gem_userptr_blits@dmabuf-sync:
- shard-tglu: NOTRUN -> [SKIP][97] ([i915#3297] / [i915#3323])
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-8/igt@[email protected]
- shard-glk: NOTRUN -> [SKIP][98] ([i915#3323])
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk1/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][99] ([i915#3297]) +1 other test skip
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-4/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][100] ([i915#3297] / [i915#3323])
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-2/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][101] ([i915#3297])
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-19/igt@[email protected]

* igt@gem_userptr_blits@forbidden-operations:
- shard-rkl: NOTRUN -> [SKIP][102] ([i915#3282] / [i915#3297])
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-3/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][103] ([i915#3282] / [i915#3297])
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-18/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][104] ([i915#3282] / [i915#3297])
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@[email protected]
- shard-dg2: NOTRUN -> [SKIP][105] ([i915#3282] / [i915#3297])
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-1/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-dg2: NOTRUN -> [SKIP][106] ([i915#3297] / [i915#4880])
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][107] ([i915#3297] / [i915#4880])
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@[email protected]

* igt@gem_userptr_blits@readonly-unsync:
- shard-dg2: NOTRUN -> [SKIP][108] ([i915#3297]) +1 other test skip
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-1/igt@[email protected]

* igt@gem_userptr_blits@relocations:
- shard-dg2: NOTRUN -> [SKIP][109] ([i915#3281] / [i915#3297])
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-7/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][110] ([i915#3281] / [i915#3297])
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@[email protected]

* igt@gem_userptr_blits@sd-probe:
- shard-dg2: NOTRUN -> [SKIP][111] ([i915#3297] / [i915#4958])
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-11/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][112] ([i915#3297] / [i915#4958])
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-17/igt@[email protected]

* igt@gem_userptr_blits@unsync-unmap-cycles:
- shard-tglu: NOTRUN -> [SKIP][113] ([i915#3297])
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-9/igt@[email protected]

* igt@gen3_render_tiledx_blits:
- shard-dg2: NOTRUN -> [SKIP][114] +19 other tests skip
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-1/igt@gen3_render_tiledx_blits.html

* igt@gen9_exec_parse@allowed-single:
- shard-mtlp: NOTRUN -> [SKIP][115] ([i915#2856]) +4 other tests skip
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-2/igt@[email protected]

* igt@gen9_exec_parse@bb-large:
- shard-tglu: NOTRUN -> [SKIP][116] ([i915#2527] / [i915#2856]) +3 other tests skip
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-4/igt@[email protected]

* igt@gen9_exec_parse@bb-start-out:
- shard-rkl: NOTRUN -> [SKIP][117] ([i915#2527]) +4 other tests skip
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-3/igt@[email protected]
- shard-tglu-1: NOTRUN -> [SKIP][118] ([i915#2527] / [i915#2856]) +1 other test skip
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][119] ([i915#2527]) +3 other tests skip
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-16/igt@[email protected]

* igt@gen9_exec_parse@valid-registers:
- shard-dg2: NOTRUN -> [SKIP][120] ([i915#2856]) +4 other tests skip
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@[email protected]

* igt@i915_drm_fdinfo@all-busy-check-all:
- shard-mtlp: NOTRUN -> [SKIP][121] ([i915#14123])
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@[email protected]

* igt@i915_drm_fdinfo@all-busy-idle-check-all:
- shard-dg2: NOTRUN -> [SKIP][122] ([i915#14123]) +1 other test skip
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-3/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][123] ([i915#14123]) +1 other test skip
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-13/igt@[email protected]

* igt@i915_drm_fdinfo@busy-idle@vcs0:
- shard-dg2: NOTRUN -> [SKIP][124] ([i915#14073]) +7 other tests skip
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@i915_drm_fdinfo@[email protected]

* igt@i915_drm_fdinfo@virtual-busy:
- shard-dg1: NOTRUN -> [SKIP][125] ([i915#14118])
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][126] ([i915#14118])
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-7/igt@[email protected]

* igt@i915_drm_fdinfo@virtual-busy-hang-all:
- shard-dg2: NOTRUN -> [SKIP][127] ([i915#14118]) +1 other test skip
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-4/igt@[email protected]

* igt@i915_module_load@resize-bar:
- shard-dg2: [PASS][128] -> [DMESG-WARN][129] ([i915#14545])
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8637/shard-dg2-8/igt@[email protected]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-4/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][130] ([i915#14544] / [i915#6412])
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-fence:
- shard-tglu: NOTRUN -> [WARN][131] ([i915#13790] / [i915#2681]) +1 other test warn
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@[email protected]

* igt@i915_pm_rpm@system-suspend:
- shard-glk: NOTRUN -> [INCOMPLETE][132] ([i915#13356]) +1 other test incomplete
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk5/igt@[email protected]

* igt@i915_pm_rps@min-max-config-loaded:
- shard-dg2: NOTRUN -> [SKIP][133] ([i915#11681] / [i915#6621])
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-8/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][134] ([i915#11681] / [i915#6621])
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][135] ([i915#11681] / [i915#6621])
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-3/igt@[email protected]

* igt@i915_pm_rps@thresholds:
- shard-mtlp: NOTRUN -> [SKIP][136] ([i915#11681])
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-5/igt@[email protected]
- shard-dg2: NOTRUN -> [SKIP][137] ([i915#11681])
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-7/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][138] ([i915#11681])
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-16/igt@[email protected]

* igt@i915_pm_sseu@full-enable:
- shard-dg2: NOTRUN -> [SKIP][139] ([i915#4387])
[139]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-3/igt@[email protected]

* igt@i915_suspend@basic-s3-without-i915:
- shard-glk10: NOTRUN -> [ABORT][140] ([i915#15317]) +4 other tests abort
[140]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk10/igt@[email protected]
- shard-tglu-1: NOTRUN -> [INCOMPLETE][141] ([i915#4817] / [i915#7443])
[141]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][142] ([i915#6645])
[142]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-6/igt@[email protected]

* igt@i915_suspend@sysfs-reader:
- shard-dg1: NOTRUN -> [ABORT][143] ([i915#15317]) +12 other tests abort
[143]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@[email protected]

* igt@kms_addfb_basic@addfb25-framebuffer-vs-set-tiling:
- shard-mtlp: NOTRUN -> [SKIP][144] ([i915#4212]) +2 other tests skip
[144]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-7/igt@[email protected]

* igt@kms_addfb_basic@clobberred-modifier:
- shard-dg2: NOTRUN -> [SKIP][145] ([i915#4212]) +1 other test skip
[145]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-8/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][146] ([i915#4212])
[146]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]

* igt@kms_async_flips@async-flip-hang@pipe-a-edp-1:
- shard-mtlp: NOTRUN -> [FAIL][147] ([i915#15313]) +8 other tests fail
[147]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-5/igt@kms_async_flips@[email protected]

* igt@kms_atomic_transition@plane-all-modeset-transition-fencing-internal-panels:
- shard-snb: NOTRUN -> [SKIP][148] ([i915#1769]) +1 other test skip
[148]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-snb7/igt@kms_atomic_transition@plane-all-modeset-transition-fencing-internal-panels.html
- shard-tglu: NOTRUN -> [SKIP][149] ([i915#1769] / [i915#3555]) +1 other test skip
[149]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-6/igt@kms_atomic_transition@plane-all-modeset-transition-fencing-internal-panels.html
- shard-glk: NOTRUN -> [SKIP][150] ([i915#1769])
[150]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk5/igt@kms_atomic_transition@plane-all-modeset-transition-fencing-internal-panels.html

* igt@kms_atomic_transition@plane-all-modeset-transition-internal-panels:
- shard-dg2: NOTRUN -> [SKIP][151] ([i915#1769] / [i915#3555]) +1 other test skip
[151]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@kms_atomic_transition@plane-all-modeset-transition-internal-panels.html
- shard-rkl: NOTRUN -> [SKIP][152] ([i915#1769] / [i915#3555]) +1 other test skip
[152]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-8/igt@kms_atomic_transition@plane-all-modeset-transition-internal-panels.html
- shard-dg1: NOTRUN -> [SKIP][153] ([i915#1769] / [i915#3555]) +1 other test skip
[153]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@kms_atomic_transition@plane-all-modeset-transition-internal-panels.html

* igt@kms_big_fb@4-tiled-32bpp-rotate-90:
- shard-rkl: NOTRUN -> [SKIP][154] ([i915#14544] / [i915#5286])
[154]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@kms_big_fb@4-tiled-addfb:
- shard-rkl: NOTRUN -> [SKIP][155] ([i915#5286]) +7 other tests skip
[155]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-4/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][156] ([i915#5286])
[156]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]

* igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-async-flip:
- shard-tglu: NOTRUN -> [SKIP][157] ([i915#5286]) +7 other tests skip
[157]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-6/igt@[email protected]

* igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:
- shard-tglu-1: NOTRUN -> [SKIP][158] ([i915#5286])
[158]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html

* igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:
- shard-dg1: NOTRUN -> [SKIP][159] ([i915#4538] / [i915#5286]) +8 other tests skip
[159]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html

* igt@kms_big_fb@linear-64bpp-rotate-270:
- shard-mtlp: NOTRUN -> [SKIP][160] +36 other tests skip
[160]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-7/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][161] ([i915#14544] / [i915#3638])
[161]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@kms_big_fb@y-tiled-8bpp-rotate-270:
- shard-glk10: NOTRUN -> [SKIP][162] +112 other tests skip
[162]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk10/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][163] ([i915#3638]) +5 other tests skip
[163]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-7/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][164] ([i915#3638]) +6 other tests skip
[164]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-17/igt@[email protected]

* igt@kms_big_fb@yf-tiled-16bpp-rotate-270:
- shard-rkl: NOTRUN -> [SKIP][165] +24 other tests skip
[165]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-8/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][166] ([i915#4538]) +7 other tests skip
[166]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@[email protected]

* igt@kms_big_fb@yf-tiled-32bpp-rotate-270:
- shard-rkl: NOTRUN -> [SKIP][167] ([i915#14544]) +3 other tests skip
[167]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@kms_big_fb@yf-tiled-64bpp-rotate-0:
- shard-dg2: NOTRUN -> [SKIP][168] ([i915#4538] / [i915#5190]) +20 other tests skip
[168]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@[email protected]

* igt@kms_big_fb@yf-tiled-8bpp-rotate-180:
- shard-dg1: NOTRUN -> [SKIP][169] ([i915#4423] / [i915#4538])
[169]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-18/igt@[email protected]

* igt@kms_big_fb@yf-tiled-addfb-size-overflow:
- shard-dg2: NOTRUN -> [SKIP][170] ([i915#5190]) +1 other test skip
[170]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-7/igt@[email protected]

* igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip:
- shard-tglu-1: NOTRUN -> [SKIP][171] +3 other tests skip
[171]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html

* igt@kms_ccs@bad-rotation-90-4-tiled-dg2-mc-ccs@pipe-b-hdmi-a-4:
- shard-dg1: NOTRUN -> [SKIP][172] ([i915#6095]) +128 other tests skip
[172]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@kms_ccs@[email protected]

* igt@kms_ccs@bad-rotation-90-4-tiled-lnl-ccs:
- shard-dg2: NOTRUN -> [SKIP][173] ([i915#12313]) +2 other tests skip
[173]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][174] ([i915#12313]) +3 other tests skip
[174]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-2/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][175] ([i915#12313]) +2 other tests skip
[175]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@[email protected]

* igt@kms_ccs@bad-rotation-90-4-tiled-mtl-rc-ccs@pipe-b-hdmi-a-2:
- shard-rkl: NOTRUN -> [SKIP][176] ([i915#6095]) +41 other tests skip
[176]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-7/igt@kms_ccs@[email protected]

* igt@kms_ccs@ccs-on-another-bo-yf-tiled-ccs@pipe-a-hdmi-a-3:
- shard-dg2: NOTRUN -> [SKIP][177] ([i915#10307] / [i915#6095]) +113 other tests skip
[177]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-basic-4-tiled-bmg-ccs:
- shard-mtlp: NOTRUN -> [SKIP][178] ([i915#12313])
[178]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@[email protected]

* igt@kms_ccs@crc-primary-rotation-180-4-tiled-mtl-mc-ccs@pipe-c-hdmi-a-2:
- shard-glk: NOTRUN -> [SKIP][179] +288 other tests skip
[179]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk1/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-suspend-4-tiled-dg2-rc-ccs@pipe-a-hdmi-a-3:
- shard-dg2: NOTRUN -> [ABORT][180] ([i915#15317]) +9 other tests abort
[180]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-suspend-4-tiled-lnl-ccs:
- shard-dg2: NOTRUN -> [SKIP][181] ([i915#12805])
[181]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-11/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][182] ([i915#12805])
[182]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-7/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][183] ([i915#12805])
[183]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-17/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][184] ([i915#12805])
[184]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-9/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][185] ([i915#12805])
[185]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-4/igt@[email protected]

* igt@kms_ccs@crc-primary-suspend-y-tiled-ccs@pipe-a-hdmi-a-2:
- shard-glk: NOTRUN -> [INCOMPLETE][186] ([i915#12796])
[186]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk9/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-suspend-y-tiled-gen12-rc-ccs:
- shard-tglu: NOTRUN -> [ABORT][187] ([i915#15317]) +9 other tests abort
[187]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-7/igt@[email protected]

* igt@kms_ccs@crc-primary-suspend-y-tiled-gen12-rc-ccs-cc@pipe-b-hdmi-a-1:
- shard-rkl: NOTRUN -> [INCOMPLETE][188] ([i915#12796])
[188]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-8/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-suspend-y-tiled-gen12-rc-ccs-cc@pipe-b-hdmi-a-3:
- shard-dg2: NOTRUN -> [SKIP][189] ([i915#6095]) +13 other tests skip
[189]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-3/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-primary-suspend-y-tiled-gen12-rc-ccs@pipe-a-hdmi-a-2:
- shard-rkl: NOTRUN -> [ABORT][190] ([i915#15317]) +16 other tests abort
[190]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-sprite-planes-basic-4-tiled-bmg-ccs:
- shard-tglu: NOTRUN -> [SKIP][191] ([i915#12313]) +3 other tests skip
[191]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@[email protected]

* igt@kms_ccs@crc-sprite-planes-basic-4-tiled-dg2-mc-ccs@pipe-a-hdmi-a-1:
- shard-tglu: NOTRUN -> [SKIP][192] ([i915#6095]) +94 other tests skip
[192]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-3/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-sprite-planes-basic-4-tiled-dg2-mc-ccs@pipe-a-hdmi-a-2:
- shard-rkl: NOTRUN -> [SKIP][193] ([i915#14544] / [i915#6095]) +1 other test skip
[193]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@kms_ccs@[email protected]

* igt@kms_ccs@crc-sprite-planes-basic-4-tiled-dg2-mc-ccs@pipe-c-hdmi-a-2:
- shard-rkl: NOTRUN -> [SKIP][194] ([i915#14098] / [i915#14544] / [i915#6095]) +1 other test skip
[194]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@kms_ccs@[email protected]

* igt@kms_ccs@missing-ccs-buffer-4-tiled-mtl-mc-ccs:
- shard-tglu-1: NOTRUN -> [SKIP][195] ([i915#6095]) +4 other tests skip
[195]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@[email protected]

* igt@kms_ccs@missing-ccs-buffer-y-tiled-ccs:
- shard-rkl: NOTRUN -> [SKIP][196] ([i915#14098] / [i915#6095]) +36 other tests skip
[196]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-4/igt@[email protected]

* igt@kms_ccs@random-ccs-data-4-tiled-dg2-rc-ccs-cc@pipe-b-edp-1:
- shard-mtlp: NOTRUN -> [SKIP][197] ([i915#6095]) +79 other tests skip
[197]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@kms_ccs@[email protected]

* igt@kms_ccs@random-ccs-data-y-tiled-gen12-mc-ccs@pipe-d-hdmi-a-1:
- shard-dg2: NOTRUN -> [SKIP][198] ([i915#10307] / [i915#10434] / [i915#6095]) +2 other tests skip
[198]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-4/igt@kms_ccs@[email protected]

* igt@kms_cdclk@mode-transition-all-outputs:
- shard-dg1: NOTRUN -> [SKIP][199] ([i915#3742])
[199]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-17/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][200] ([i915#3742])
[200]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][201] ([i915#13784])
[201]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-5/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][202] ([i915#3742])
[202]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-5/igt@[email protected]

* igt@kms_chamelium_audio@dp-audio:
- shard-tglu: NOTRUN -> [SKIP][203] ([i915#11151] / [i915#7828]) +12 other tests skip
[203]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-6/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][204] ([i915#11151] / [i915#7828]) +12 other tests skip
[204]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-6/igt@[email protected]

* igt@kms_chamelium_audio@hdmi-audio:
- shard-dg2: NOTRUN -> [SKIP][205] ([i915#11151] / [i915#7828]) +17 other tests skip
[205]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-3/igt@[email protected]

* igt@kms_chamelium_color@ctm-0-50:
- shard-dg1: NOTRUN -> [SKIP][206] +59 other tests skip
[206]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-16/igt@[email protected]

* igt@kms_chamelium_frames@dp-crc-single:
- shard-dg1: NOTRUN -> [SKIP][207] ([i915#11151] / [i915#7828]) +14 other tests skip
[207]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@[email protected]

* igt@kms_chamelium_frames@vga-frame-dump:
- shard-rkl: NOTRUN -> [SKIP][208] ([i915#11151] / [i915#7828]) +10 other tests skip
[208]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-8/igt@[email protected]

* igt@kms_chamelium_hpd@dp-hpd-storm:
- shard-rkl: NOTRUN -> [SKIP][209] ([i915#11151] / [i915#14544] / [i915#7828]) +2 other tests skip
[209]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@kms_chamelium_hpd@vga-hpd-with-enabled-mode:
- shard-tglu-1: NOTRUN -> [SKIP][210] ([i915#11151] / [i915#7828])
[210]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@[email protected]

* igt@kms_chamelium_sharpness_filter@filter-basic:
- shard-dg2: NOTRUN -> [SKIP][211] ([i915#15238])
[211]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-8/igt@[email protected]

* igt@kms_color@deep-color:
- shard-dg2: NOTRUN -> [SKIP][212] ([i915#12655] / [i915#3555])
[212]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-8/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][213] ([i915#12655] / [i915#3555])
[213]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][214] ([i915#3555] / [i915#9979])
[214]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@[email protected]

* igt@kms_content_protection@atomic-dpms:
- shard-tglu: NOTRUN -> [SKIP][215] ([i915#6944] / [i915#7116] / [i915#7118] / [i915#9424]) +1 other test skip
[215]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-4/igt@[email protected]

* igt@kms_content_protection@dp-mst-type-1:
- shard-rkl: NOTRUN -> [SKIP][216] ([i915#3116])
[216]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-4/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][217] ([i915#3299])
[217]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][218] ([i915#3116] / [i915#3299])
[218]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-7/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][219] ([i915#3299])
[219]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-3/igt@[email protected]
- shard-dg2: NOTRUN -> [SKIP][220] ([i915#3299]) +1 other test skip
[220]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-11/igt@[email protected]

* igt@kms_content_protection@lic-type-0:
- shard-dg1: NOTRUN -> [SKIP][221] ([i915#9424])
[221]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@[email protected]

* igt@kms_content_protection@mei-interface:
- shard-dg2: NOTRUN -> [SKIP][222] ([i915#9424]) +1 other test skip
[222]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-7/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][223] ([i915#14544] / [i915#9424])
[223]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][224] ([i915#9433])
[224]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][225] ([i915#6944] / [i915#9424])
[225]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-3/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][226] ([i915#8063] / [i915#9433])
[226]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-7/igt@[email protected]

* igt@kms_content_protection@type1:
- shard-dg2: NOTRUN -> [SKIP][227] ([i915#7118] / [i915#9424])
[227]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-8/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][228] ([i915#7118] / [i915#9424])
[228]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-4/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][229] ([i915#7116] / [i915#9424])
[229]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-18/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][230] ([i915#3555] / [i915#6944] / [i915#9424])
[230]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@[email protected]

* igt@kms_cursor_crc@cursor-onscreen-256x85:
- shard-tglu: NOTRUN -> [FAIL][231] ([i915#13566]) +3 other tests fail
[231]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@[email protected]

* igt@kms_cursor_crc@cursor-onscreen-256x85@pipe-a-hdmi-a-1:
- shard-rkl: NOTRUN -> [FAIL][232] ([i915#13566]) +3 other tests fail
[232]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-5/igt@kms_cursor_crc@[email protected]

* igt@kms_cursor_crc@cursor-onscreen-512x512:
- shard-tglu: NOTRUN -> [SKIP][233] ([i915#13049]) +2 other tests skip
[233]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-2/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][234] ([i915#13049]) +1 other test skip
[234]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-3/igt@[email protected]

* igt@kms_cursor_crc@cursor-random-512x170:
- shard-dg2: NOTRUN -> [SKIP][235] ([i915#13049]) +1 other test skip
[235]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-11/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][236] ([i915#13049]) +2 other tests skip
[236]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-4/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][237] ([i915#13049]) +1 other test skip
[237]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]

* igt@kms_cursor_crc@cursor-random-max-size:
- shard-mtlp: NOTRUN -> [SKIP][238] ([i915#3555] / [i915#8814])
[238]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-6/igt@[email protected]

* igt@kms_cursor_crc@cursor-rapid-movement-128x42:
- shard-mtlp: NOTRUN -> [SKIP][239] ([i915#8814]) +3 other tests skip
[239]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@[email protected]

* igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic:
- shard-dg2: NOTRUN -> [SKIP][240] ([i915#13046] / [i915#5354]) +4 other tests skip
[240]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-1/igt@[email protected]

* igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
- shard-mtlp: NOTRUN -> [SKIP][241] ([i915#9809]) +5 other tests skip
[241]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-8/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- shard-rkl: NOTRUN -> [SKIP][242] ([i915#4103])
[242]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-5/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][243] ([i915#4103] / [i915#4213]) +1 other test skip
[243]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-13/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][244] ([i915#4103]) +1 other test skip
[244]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-3/igt@[email protected]

* igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size:
- shard-tglu: NOTRUN -> [SKIP][245] +97 other tests skip
[245]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@[email protected]

* igt@kms_cursor_legacy@modeset-atomic-cursor-hotspot:
- shard-rkl: NOTRUN -> [SKIP][246] ([i915#9067])
[246]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-2/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][247] ([i915#9067])
[247]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-19/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][248] ([i915#9067])
[248]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-8/igt@[email protected]

* igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size:
- shard-dg2: NOTRUN -> [SKIP][249] ([i915#4103] / [i915#4213]) +2 other tests skip
[249]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-3/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions-varying-size.html

* igt@kms_cursor_legacy@short-busy-flip-before-cursor-toggle:
- shard-mtlp: NOTRUN -> [SKIP][250] ([i915#4213]) +2 other tests skip
[250]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-5/igt@[email protected]

* igt@kms_dirtyfb@drrs-dirtyfb-ioctl:
- shard-dg2: NOTRUN -> [SKIP][251] ([i915#9833])
[251]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-11/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][252] ([i915#9723])
[252]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-7/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][253] ([i915#9723])
[253]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-17/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][254] ([i915#9723])
[254]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-9/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][255] ([i915#9833])
[255]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-4/igt@[email protected]

* igt@kms_dither@fb-8bpc-vs-panel-6bpc:
- shard-rkl: NOTRUN -> [SKIP][256] ([i915#3555] / [i915#3804])
[256]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-5/igt@[email protected]

* igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-1:
- shard-rkl: NOTRUN -> [SKIP][257] ([i915#3804])
[257]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-5/igt@kms_dither@[email protected]

* igt@kms_dp_link_training@non-uhbr-sst:
- shard-rkl: NOTRUN -> [SKIP][258] ([i915#13749])
[258]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-3/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][259] ([i915#13749])
[259]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-9/igt@[email protected]

* igt@kms_dp_link_training@uhbr-mst:
- shard-dg2: NOTRUN -> [SKIP][260] ([i915#13748])
[260]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-8/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][261] ([i915#13748])
[261]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-18/igt@[email protected]

* igt@kms_dsc@dsc-fractional-bpp:
- shard-dg2: NOTRUN -> [SKIP][262] ([i915#3840] / [i915#9688])
[262]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-4/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][263] ([i915#14544] / [i915#3840])
[263]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][264] ([i915#3840])
[264]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][265] ([i915#3840])
[265]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-7/igt@[email protected]

* igt@kms_dsc@dsc-with-bpc:
- shard-tglu: NOTRUN -> [SKIP][266] ([i915#3555] / [i915#3840])
[266]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@[email protected]

* igt@kms_dsc@dsc-with-output-formats-with-bpc:
- shard-mtlp: NOTRUN -> [SKIP][267] ([i915#3555] / [i915#3840] / [i915#9053])
[267]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-3/igt@[email protected]
- shard-dg2: NOTRUN -> [SKIP][268] ([i915#3840] / [i915#9053])
[268]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-11/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][269] ([i915#3840] / [i915#9053])
[269]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-4/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][270] ([i915#3840] / [i915#9053])
[270]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][271] ([i915#3840] / [i915#9053])
[271]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-7/igt@[email protected]

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-glk: NOTRUN -> [INCOMPLETE][272] ([i915#9878])
[272]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk1/igt@[email protected]

* igt@kms_fbcon_fbt@psr:
- shard-dg2: NOTRUN -> [SKIP][273] ([i915#3469])
[273]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-11/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][274] ([i915#3469])
[274]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-15/igt@[email protected]
- shard-tglu: NOTRUN -> [SKIP][275] ([i915#3469])
[275]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-7/igt@[email protected]

* igt@kms_feature_discovery@display-3x:
- shard-mtlp: NOTRUN -> [SKIP][276] ([i915#1839])
[276]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-5/igt@[email protected]

* igt@kms_feature_discovery@dp-mst:
- shard-tglu: NOTRUN -> [SKIP][277] ([i915#9337])
[277]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-2/igt@[email protected]

* igt@kms_feature_discovery@psr1:
- shard-tglu: NOTRUN -> [SKIP][278] ([i915#658]) +1 other test skip
[278]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-4/igt@[email protected]
- shard-rkl: NOTRUN -> [SKIP][279] ([i915#658]) +1 other test skip
[279]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-7/igt@[email protected]

* igt@kms_feature_discovery@psr2:
- shard-dg1: NOTRUN -> [SKIP][280] ([i915#658]) +1 other test skip
[280]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-17/igt@[email protected]
- shard-dg2: NOTRUN -> [SKIP][281] ([i915#658])
[281]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-1/igt@[email protected]

* igt@kms_fence_pin_leak:
- shard-dg1: NOTRUN -> [SKIP][282] ([i915#4881])
[282]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-12/igt@kms_fence_pin_leak.html
- shard-mtlp: NOTRUN -> [SKIP][283] ([i915#4881])
[283]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-6/igt@kms_fence_pin_leak.html
- shard-dg2: NOTRUN -> [SKIP][284] ([i915#4881])
[284]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@kms_fence_pin_leak.html

* igt@kms_flip@2x-blocking-absolute-wf_vblank:
- shard-tglu: NOTRUN -> [SKIP][285] ([i915#3637] / [i915#9934]) +16 other tests skip
[285]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-4/igt@kms_flip@2x-blocking-absolute-wf_vblank.html

* igt@kms_flip@2x-busy-flip:
- shard-rkl: NOTRUN -> [SKIP][286] ([i915#14544] / [i915#9934]) +3 other tests skip
[286]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-6/igt@[email protected]

* igt@kms_flip@2x-dpms-vs-vblank-race:
- shard-mtlp: NOTRUN -> [SKIP][287] ([i915#3637] / [i915#9934]) +18 other tests skip
[287]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-6/igt@[email protected]

* igt@kms_flip@2x-flip-vs-panning:
- shard-tglu-1: NOTRUN -> [SKIP][288] ([i915#3637] / [i915#9934]) +1 other test skip
[288]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@[email protected]

* igt@kms_flip@2x-flip-vs-suspend:
- shard-glk: NOTRUN -> [INCOMPLETE][289] ([i915#12745] / [i915#4839] / [i915#6113])
[289]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk1/igt@[email protected]

* igt@kms_flip@2x-flip-vs-suspend@ab-hdmi-a1-hdmi-a2:
- shard-glk: NOTRUN -> [INCOMPLETE][290] ([i915#4839] / [i915#6113])
[290]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-glk1/igt@kms_flip@[email protected]

* igt@kms_flip@2x-modeset-vs-vblank-race:
- shard-dg2: NOTRUN -> [SKIP][291] ([i915#9934]) +17 other tests skip
[291]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-11/igt@[email protected]

* igt@kms_flip@2x-plain-flip:
- shard-rkl: NOTRUN -> [SKIP][292] ([i915#9934]) +12 other tests skip
[292]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-2/igt@[email protected]

* igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
- shard-dg1: NOTRUN -> [SKIP][293] ([i915#9934]) +16 other tests skip
[293]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-14/igt@[email protected]

* igt@kms_flip@flip-vs-fences-interruptible:
- shard-dg2: NOTRUN -> [SKIP][294] ([i915#8381])
[294]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-3/igt@[email protected]
- shard-dg1: NOTRUN -> [SKIP][295] ([i915#8381])
[295]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-13/igt@[email protected]
- shard-mtlp: NOTRUN -> [SKIP][296] ([i915#8381])
[296]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-2/igt@[email protected]

* igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling:
- shard-rkl: NOTRUN -> [SKIP][297] ([i915#2672] / [i915#3555]) +7 other tests skip
[297]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-4/igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling.html

* igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-valid-mode:
- shard-rkl: NOTRUN -> [SKIP][298] ([i915#2672]) +7 other tests skip
[298]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-rkl-4/igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-valid-mode.html

* igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-downscaling@pipe-a-default-mode:
- shard-mtlp: NOTRUN -> [SKIP][299] ([i915#2672] / [i915#8813]) +5 other tests skip
[299]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-mtlp-2/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-downscaling@pipe-a-default-mode.html

* igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-downscaling@pipe-a-valid-mode:
- shard-tglu: NOTRUN -> [SKIP][300] ([i915#2587] / [i915#2672]) +7 other tests skip
[300]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-4/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-downscaling@pipe-a-valid-mode.html

* igt@kms_flip_scaled_crc@flip-32bpp-yftileccs-to-64bpp-yftile-downscaling:
- shard-dg2: NOTRUN -> [SKIP][301] ([i915#2672] / [i915#3555]) +6 other tests skip
[301]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-3/igt@kms_flip_scaled_crc@flip-32bpp-yftileccs-to-64bpp-yftile-downscaling.html

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-upscaling:
- shard-tglu-1: NOTRUN -> [SKIP][302] ([i915#2587] / [i915#2672] / [i915#3555])
[302]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-upscaling.html
- shard-dg1: NOTRUN -> [SKIP][303] ([i915#2587] / [i915#2672] / [i915#3555]) +2 other tests skip
[303]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg1-19/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-upscaling.html

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-upscaling@pipe-a-valid-mode:
- shard-tglu-1: NOTRUN -> [SKIP][304] ([i915#2587] / [i915#2672])
[304]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-1/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-upscaling@pipe-a-valid-mode.html

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-downscaling:
- shard-dg2: NOTRUN -> [SKIP][305] ([i915#2672] / [i915#3555] / [i915#5190]) +3 other tests skip
[305]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-downscaling.html

* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-downscaling@pipe-a-valid-mode:
- shard-dg2: NOTRUN -> [SKIP][306] ([i915#2672]) +8 other tests skip
[306]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-dg2-5/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-downscaling@pipe-a-valid-mode.html

* igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-upscaling:
- shard-tglu: NOTRUN -> [SKIP][307] ([i915#2587] / [i915#2672] / [i915#3555]) +1 other test skip
[307]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14099/shard-tglu-5/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-upscaling.html

890 lines not shown · raw message

Part of this message is not shown here. View the raw message.

#39 lore raw

v9 cover Madvise feature in SVM for Multi-GPU configs

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This patch series adds comprehensive SVM multi-GPU IGT test coverage for madvise and prefetch functionality.

ver2:
- Test name changed in commits
- In patchwork v1 patch is missing due to last patch was not sent

ver3:
- In patch-7 tags were added and it was not sent on patchwork

ver4:
- In patch file was added which is not available in source which caused CI build failure.

ver5:
- Added subtest function wrappers
- Subtests executing for all GPUs enumerated

ver7:
- Optimized function calling which are frequenctly called
- Incorporated review comments (Thomas Hellstrom)

ver8:
- Incorporated review comments (Thomas Hellstrom)
- Seperated madvise and lr_sync patches
- merged added 0 as instance parameter in xe_vm_madvise() call in xe_exec_system_allocator with xe_vm_madvise lib changes
- Subtests declared in const struct section[] and optimized
- All subtests executed with and without prefetch

ver9:
- Incorporated review comments (Pravalika, Thomas)
- Optimized code. Multiple same function called put in single function
- Added READ_ONCE/WRITE_once instead dereferecing.

Nishit Sharma (10):
lib/xe: Add instance parameter to xe_vm_madvise
lib/xe: Add synchronous helpers for VM bind/unbind operations tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test tests/intel/xe_multi_gpusvm: Add SVM multi-GPU atomic operations tests/intel/xe_multi_gpusvm: Add SVM multi-GPU coherency test tests/intel/xe_multi_gpusvm: Add SVM multi-GPU performance test tests/intel/xe_multi_gpusvm: Add SVM multi-GPU fault handling test tests/intel/xe_multi_gpusvm: Add SVM multi-GPU simultaneous access
test
tests/intel/xe_multi_gpusvm: Add SVM multi-GPU conflicting madvise
test
tests/intel/xe_multi-gpusvm: Add SVM multi-GPU migration test

 include/drm-uapi/xe_drm.h              |    4 +-
 lib/xe/xe_ioctl.c                      |   52 +-
 lib/xe/xe_ioctl.h                      |    9 +-
 tests/intel/xe_exec_system_allocator.c |    8 +-
 tests/intel/xe_multi_gpusvm.c          | 1664 ++++++++++++++++++++++++
 tests/meson.build                      |    1 +
 6 files changed, 1726 insertions(+), 12 deletions(-)
 create mode 100644 tests/intel/xe_multi_gpusvm.c
Signature · 1 line
2.48.1
#40 lore raw

PATCH v9 1/10 lib/xe: Add instance parameter to xe_vm_madvise

From: Nishit Sharma <[email protected]>

tests/intel/xe_exec_system_allocator: Add parameter in madvise call

Add an 'instance' parameter to __xe_vm_madvise() and xe_vm_madvise() to specify which VRAM instance should be targeted for memory advise operations.
Getting compilation issues in xe_exec_system_allocator test after adding 'instance' parameters in xe_vm_madvise(). As a fix 0 as instance parameter passed in xe_vm_madvise() calls available in xe_exec_system_allocator test.

---
 include/drm-uapi/xe_drm.h              |  4 ++--
 lib/xe/xe_ioctl.c                      | 13 +++++++++----
 lib/xe/xe_ioctl.h                      |  9 +++++++--
 tests/intel/xe_exec_system_allocator.c |  8 ++++----
 4 files changed, 22 insertions(+), 12 deletions(-)
include/drm-uapi/xe_drm.h +2 -2
index 89ab54935..3472efa58 100644
@@ -2060,8 +2060,8 @@ struct drm_xe_madvise {
 			/** @preferred_mem_loc.migration_policy: Page migration policy */
 			__u16 migration_policy;
 
-			/** @preferred_mem_loc.pad : MBZ */
-			__u16 pad;
+			/** @preferred_mem_loc.region_instance: Region instance */
+			__u16 region_instance;
 
 			/** @preferred_mem_loc.reserved : Reserved */
 			__u64 reserved;
lib/xe/xe_ioctl.c +9 -4
index 39c4667a1..221fd7c62 100644
@@ -687,7 +687,8 @@ int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 }
 
 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
-		    uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy)
+		    uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy,
+		    uint16_t instance)
 {
 	struct drm_xe_madvise madvise = {
 		.type = type,
@@ -704,6 +705,7 @@ int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 	case DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC:
 		madvise.preferred_mem_loc.devmem_fd = op_val;
 		madvise.preferred_mem_loc.migration_policy = policy;
+		madvise.preferred_mem_loc.region_instance = instance;
 		igt_debug("madvise.preferred_mem_loc.devmem_fd = %d\n",
 			  madvise.preferred_mem_loc.devmem_fd);
 		break;
@@ -731,14 +733,17 @@ int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
  * @type: type of attribute
  * @op_val: fd/atomic value/pat index, depending upon type of operation
  * @policy: Page migration policy
+ * @instance: vram instance
  *
  * Function initializes different members of struct drm_xe_madvise and calls
  * MADVISE IOCTL .
  *
- * Asserts in case of error returned by DRM_IOCTL_XE_MADVISE.
+ * Asserts in case of error returned by DRM_IOCTL_XE_MADVISE
  */
 void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
-		   uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy)
+		   uint64_t ext, uint32_t type, uint32_t op_val, uint16_t policy,
+		   uint16_t instance)
 {
-	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext, type, op_val, policy), 0);
+	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext, type, op_val, policy,
+				      instance), 0);
 }
lib/xe/xe_ioctl.h +7 -2
index ae8a23a54..bbee06a9d 100644
@@ -100,13 +100,18 @@ int __xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 		       uint32_t exec_queue, int64_t timeout);
 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,
-		    uint32_t type, uint32_t op_val, uint16_t policy);
+		    uint32_t type, uint32_t op_val, uint16_t policy, uint16_t instance);
 void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,
-		   uint32_t type, uint32_t op_val, uint16_t policy);
+		   uint32_t type, uint32_t op_val, uint16_t policy, uint16_t instance);
 int xe_vm_number_vmas_in_range(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr);
 int xe_vm_vma_attrs(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr,
 		    struct drm_xe_mem_range_attr *mem_attr);
 struct drm_xe_mem_range_attr
 *xe_vm_get_mem_attr_values_in_range(int fd, uint32_t vm, uint64_t start,
 				    uint64_t range, uint32_t *num_ranges);
+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo,
+			uint64_t offset, uint64_t addr,
+			uint64_t size, uint32_t flags);
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size);
 #endif /* XE_IOCTL_H */
tests/intel/xe_exec_system_allocator.c +4 -4
index b88967e58..1e7175061 100644
@@ -1164,7 +1164,7 @@ madvise_swizzle_op_exec(int fd, uint32_t vm, struct test_exec_data *data,
 	xe_vm_madvise(fd, vm, to_user_pointer(data), bo_size, 0,
 		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
 		      preferred_loc,
-		      0);
+		      0, 0);
 }
 
 static void
@@ -1172,7 +1172,7 @@ xe_vm_madvixe_pat_attr(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 		       int pat_index)
 {
 	xe_vm_madvise(fd, vm, addr, range, 0,
-		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0);
+		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0, 0);
 }
 
 static void
@@ -1181,7 +1181,7 @@ xe_vm_madvise_atomic_attr(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 {
 	xe_vm_madvise(fd, vm, addr, range, 0,
 		      DRM_XE_MEM_RANGE_ATTR_ATOMIC,
-		      mem_attr, 0);
+		      mem_attr, 0, 0);
 }
 
 static void
@@ -1190,7 +1190,7 @@ xe_vm_madvise_migrate_pages(int fd, uint32_t vm, uint64_t addr, uint64_t range)
 	xe_vm_madvise(fd, vm, addr, range, 0,
 		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
 		      DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM,
-		      DRM_XE_MIGRATE_ALL_PAGES);
+		      DRM_XE_MIGRATE_ALL_PAGES, 0);
 }
 
 static void
Signature · 1 line
2.48.1
Reviewed-by Thomas Hellström on v9 1/10
#41 lore raw

Re: [PATCH i-g-t v9 01/10] lib/xe: Add instance parameter to xe_vm_madvise

Quoted 15 lines · On Mon, 2025-12-01 at 09:01 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

tests/intel/xe_exec_system_allocator: Add parameter in madvise call

Add an 'instance' parameter to __xe_vm_madvise() and xe_vm_madvise() to
specify which VRAM instance should be targeted for memory advise operations.
Getting compilation issues in xe_exec_system_allocator test after adding
'instance' parameters in xe_vm_madvise(). As a fix 0 as instance parameter
passed in xe_vm_madvise() calls available in xe_exec_system_allocator test.

Quoted 1 line
Quoted 163 lines

---
 include/drm-uapi/xe_drm.h              |  4 ++-- lib/xe/xe_ioctl.c                      | 13 +++++++++---- lib/xe/xe_ioctl.h                      |  9 +++++++-- tests/intel/xe_exec_system_allocator.c |  8 ++++----

 4 files changed, 22 insertions(+), 12 deletions(-)
include/drm-uapi/xe_drm.h +0 -0
index 89ab54935..3472efa58 100644
@@ -2060,8 +2060,8 @@ struct drm_xe_madvise {
  			/** @preferred_mem_loc.migration_policy:

Page migration policy */
  __u16 migration_policy;

include/drm-uapi/xe_drm.h +1 -2
-			/** @preferred_mem_loc.pad : MBZ */
-			__u16 pad;
+			/** @preferred_mem_loc.region_instance:

Region instance */

include/drm-uapi/xe_drm.h +1 -0
+			__u16 region_instance;


  /** @preferred_mem_loc.reserved : Reserved */
  __u64 reserved;

lib/xe/xe_ioctl.c +0 -0
index 39c4667a1..221fd7c62 100644
@@ -687,7 +687,8 @@ int64_t xe_wait_ufence(int fd, uint64_t *addr,
 uint64_t value,
  }


 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,

lib/xe/xe_ioctl.c +0 -1
-		    uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy)

lib/xe/xe_ioctl.c +1 -0
+		    uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy,

lib/xe/xe_ioctl.c +1 -0
+		    uint16_t instance)

 {
  struct drm_xe_madvise madvise = {
  .type = type,

lib/xe/xe_ioctl.c +0 -0
@@ -704,6 +705,7 @@ int __xe_vm_madvise(int fd, uint32_t vm, uint64_t
 addr, uint64_t range,

  case DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC:
  madvise.preferred_mem_loc.devmem_fd = op_val; madvise.preferred_mem_loc.migration_policy = policy;

lib/xe/xe_ioctl.c +1 -0
+		madvise.preferred_mem_loc.region_instance =

instance; igt_debug("madvise.preferred_mem_loc.devmem_fd = %d\n",
    madvise.preferred_mem_loc.devmem_fd); break;

lib/xe/xe_ioctl.c +0 -0
@@ -731,14 +733,17 @@ int __xe_vm_madvise(int fd, uint32_t vm,
 uint64_t addr, uint64_t range,
   * @type: type of attribute
   * @op_val: fd/atomic value/pat index, depending upon type of

operation
  * @policy: Page migration policy
+ * @instance: vram instance
  *
  * Function initializes different members of struct drm_xe_madvise and calls
  * MADVISE IOCTL .
  *
- * Asserts in case of error returned by DRM_IOCTL_XE_MADVISE.
+ * Asserts in case of error returned by DRM_IOCTL_XE_MADVISE */
 void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,

lib/xe/xe_ioctl.c +0 -1
-		   uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy)

lib/xe/xe_ioctl.c +1 -0
+		   uint64_t ext, uint32_t type, uint32_t op_val,

uint16_t policy,

lib/xe/xe_ioctl.c +1 -0
+		   uint16_t instance)

 {

lib/xe/xe_ioctl.c +0 -1
-	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext,

type, op_val, policy), 0);

lib/xe/xe_ioctl.c +1 -0
+	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext,

type, op_val, policy,

lib/xe/xe_ioctl.c +1 -0
+				      instance), 0);

 }

lib/xe/xe_ioctl.h +0 -0
index ae8a23a54..bbee06a9d 100644
@@ -100,13 +100,18 @@ int __xe_wait_ufence(int fd, uint64_t *addr,
 uint64_t value,
  int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
  		       uint32_t exec_queue, int64_t timeout);

 int __xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,

lib/xe/xe_ioctl.h +0 -1
-		    uint32_t type, uint32_t op_val, uint16_t

policy);

lib/xe/xe_ioctl.h +1 -0
+		    uint32_t type, uint32_t op_val, uint16_t policy,

uint16_t instance);
 void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, uint64_t ext,

lib/xe/xe_ioctl.h +1 -1
-		   uint32_t type, uint32_t op_val, uint16_t policy);
+		   uint32_t type, uint32_t op_val, uint16_t policy,

uint16_t instance);
 int xe_vm_number_vmas_in_range(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr);
 int xe_vm_vma_attrs(int fd, struct drm_xe_vm_query_mem_range_attr *vmas_attr,
      struct drm_xe_mem_range_attr *mem_attr); struct drm_xe_mem_range_attr *xe_vm_get_mem_attr_values_in_range(int fd, uint32_t vm, uint64_t start,
      uint64_t range, uint32_t *num_ranges);

lib/xe/xe_ioctl.h +5 -0
+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo,
+			uint64_t offset, uint64_t addr,
+			uint64_t size, uint32_t flags);
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size);

 #endif /* XE_IOCTL_H */

tests/intel/xe_exec_system_allocator.c +1 -1
index b88967e58..1e7175061 100644
@@ -1164,7 +1164,7 @@ madvise_swizzle_op_exec(int fd, uint32_t vm,
 struct test_exec_data *data,
  	xe_vm_madvise(fd, vm, to_user_pointer(data), bo_size, 0,
  		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
  		      preferred_loc,
-		      0);
+		      0, 0);
  }


 static void

tests/intel/xe_exec_system_allocator.c +1 -1
@@ -1172,7 +1172,7 @@ xe_vm_madvixe_pat_attr(int fd, uint32_t vm,
 uint64_t addr, uint64_t range,
  		       int pat_index)
  {
  	xe_vm_madvise(fd, vm, addr, range, 0,
-		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0);
+		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0, 0);
  }


 static void

tests/intel/xe_exec_system_allocator.c +1 -1
@@ -1181,7 +1181,7 @@ xe_vm_madvise_atomic_attr(int fd, uint32_t vm,
 uint64_t addr, uint64_t range,
  {
  	xe_vm_madvise(fd, vm, addr, range, 0,
  		      DRM_XE_MEM_RANGE_ATTR_ATOMIC,
-		      mem_attr, 0);
+		      mem_attr, 0, 0);
  }


 static void

tests/intel/xe_exec_system_allocator.c +1 -1
@@ -1190,7 +1190,7 @@ xe_vm_madvise_migrate_pages(int fd, uint32_t
 vm, uint64_t addr, uint64_t range)
  	xe_vm_madvise(fd, vm, addr, range, 0,
  		      DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
  		      DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM,
-		      DRM_XE_MIGRATE_ALL_PAGES);
+		      DRM_XE_MIGRATE_ALL_PAGES, 0);
  }


 static void

#42 lore raw

PATCH v9 2/10 lib/xe: Add synchronous helpers for VM bind/unbind operations

In reply to [email protected]

From: Nishit Sharma <[email protected]>

Introduce synchronous wrappers for VM bind/unbind operations that handle user fence allocation, waiting, and cleanup internally. This simplifies test code by eliminating repetitive synchronization boilerplate.

---
 lib/xe/xe_ioctl.c | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
lib/xe/xe_ioctl.c +39 -0
index 221fd7c62..369c5887d 100644
@@ -747,3 +747,42 @@ void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext, type, op_val, policy,
 				      instance), 0);
 }
+
+#define        BIND_SYNC_VAL   0x686868
+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo, uint64_t offset,
+			uint64_t addr, uint64_t size, uint32_t flags)
+{
+	volatile uint64_t *sync_addr = malloc(sizeof(*sync_addr));
+	struct drm_xe_sync sync = {
+		.flags = DRM_XE_SYNC_FLAG_SIGNAL,
+		.type = DRM_XE_SYNC_TYPE_USER_FENCE,
+		.addr = to_user_pointer((uint64_t *)sync_addr),
+		.timeline_value = BIND_SYNC_VAL,
+	};
+
+	igt_assert(!!sync_addr);
+	xe_vm_bind_async_flags(fd, vm, 0, bo, 0, addr, size, &sync, 1, flags);
+	if (*sync_addr != BIND_SYNC_VAL)
+		xe_wait_ufence(fd, (uint64_t *)sync_addr, BIND_SYNC_VAL, 0, NSEC_PER_SEC * 10);
+	/* Only free if the wait succeeds */
+	free((void *)sync_addr);
+}
+
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size)
+{
+	volatile uint64_t *sync_addr = malloc(sizeof(*sync_addr));
+	struct drm_xe_sync sync = {
+		.flags = DRM_XE_SYNC_FLAG_SIGNAL,
+		.type = DRM_XE_SYNC_TYPE_USER_FENCE,
+		.addr = to_user_pointer((uint64_t *)sync_addr),
+		.timeline_value = BIND_SYNC_VAL,
+	};
+
+	igt_assert(!!sync_addr);
+	*sync_addr = 0;
+	xe_vm_unbind_async(fd, vm, 0, 0, addr, size, &sync, 1);
+	if (*sync_addr != BIND_SYNC_VAL)
+		xe_wait_ufence(fd, (uint64_t *)sync_addr, BIND_SYNC_VAL, 0, NSEC_PER_SEC * 10);
+	free((void *)sync_addr);
+}
Signature · 1 line
2.48.1
#43 lore raw

Re: [PATCH i-g-t v9 02/10] lib/xe: Add synchronous helpers for VM bind/unbind operations

Quoted 24 lines · On Mon, 2025-12-01 at 09:01 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

Introduce synchronous wrappers for VM bind/unbind operations that handle
user fence allocation, waiting, and cleanup internally. This simplifies
test code by eliminating repetitive synchronization boilerplate.

---
 lib/xe/xe_ioctl.c | 39 +++++++++++++++++++++++++++++++++++++++

 1 file changed, 39 insertions(+)
lib/xe/xe_ioctl.c +0 -0
index 221fd7c62..369c5887d 100644
@@ -747,3 +747,42 @@ void xe_vm_madvise(int fd, uint32_t vm, uint64_t
 addr, uint64_t range,
  	igt_assert_eq(__xe_vm_madvise(fd, vm, addr, range, ext,
 type, op_val, policy,

        instance), 0); }

lib/xe/xe_ioctl.c void xe_vm_madvise(int fd, uint32_t vm, uint64_t addr, uint64_t range, · line 751

Quoted 2 lines
lib/xe/xe_ioctl.c +2 -0
+
+#define        BIND_SYNC_VAL   0x686868

The spaces above look a bit weird, perhaps fix before committing.

Quoted 42 lines

+void xe_vm_bind_lr_sync(int fd, uint32_t vm, uint32_t bo, uint64_t offset,

lib/xe/xe_ioctl.c +1 -0
+			uint64_t addr, uint64_t size, uint32_t

flags)

lib/xe/xe_ioctl.c +11 -0
+{
+	volatile uint64_t *sync_addr = malloc(sizeof(*sync_addr));
+	struct drm_xe_sync sync = {
+		.flags = DRM_XE_SYNC_FLAG_SIGNAL,
+		.type = DRM_XE_SYNC_TYPE_USER_FENCE,
+		.addr = to_user_pointer((uint64_t *)sync_addr),
+		.timeline_value = BIND_SYNC_VAL,
+	};
+
+	igt_assert(!!sync_addr);
+	xe_vm_bind_async_flags(fd, vm, 0, bo, 0, addr, size, &sync,

1, flags);

lib/xe/xe_ioctl.c +2 -0
+	if (*sync_addr != BIND_SYNC_VAL)
+		xe_wait_ufence(fd, (uint64_t *)sync_addr,

BIND_SYNC_VAL, 0, NSEC_PER_SEC * 10);

lib/xe/xe_ioctl.c +20 -0
+	/* Only free if the wait succeeds */
+	free((void *)sync_addr);
+}
+
+void xe_vm_unbind_lr_sync(int fd, uint32_t vm, uint64_t offset,
+			  uint64_t addr, uint64_t size)
+{
+	volatile uint64_t *sync_addr = malloc(sizeof(*sync_addr));
+	struct drm_xe_sync sync = {
+		.flags = DRM_XE_SYNC_FLAG_SIGNAL,
+		.type = DRM_XE_SYNC_TYPE_USER_FENCE,
+		.addr = to_user_pointer((uint64_t *)sync_addr),
+		.timeline_value = BIND_SYNC_VAL,
+	};
+
+	igt_assert(!!sync_addr);
+	*sync_addr = 0;
+	xe_vm_unbind_async(fd, vm, 0, 0, addr, size, &sync, 1);
+	if (*sync_addr != BIND_SYNC_VAL)
+		xe_wait_ufence(fd, (uint64_t *)sync_addr,

BIND_SYNC_VAL, 0, NSEC_PER_SEC * 10);

lib/xe/xe_ioctl.c +2 -0
+	free((void *)sync_addr);
+}
#44 lore raw

PATCH v9 3/10 tests/intel/xe_multi_gpusvm: Add SVM multi-GPU xGPU memory access test

In reply to [email protected]

From: Nishit Sharma <[email protected]>

This test allocates a buffer in SVM, writes data to it from src GPU, and reads/verifies the data from dst GPU. Optionally, the CPU also reads or modifies the buffer and both GPUs verify the results, ensuring correct cross-GPU and CPU memory access in a multi-GPU environment.

---
 tests/intel/xe_multi_gpusvm.c | 392 ++++++++++++++++++++++++++++++++++
 tests/meson.build             |   1 +
 2 files changed, 393 insertions(+)
 create mode 100644 tests/intel/xe_multi_gpusvm.c
tests/intel/xe_multi_gpusvm.c new file +392 -0
new file mode 100644
index 000000000..a80193b9a
@@ -0,0 +1,392 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include <unistd.h>
+
+#include "drmtest.h"
+#include "igt.h"
+#include "igt_multigpu.h"
+
+#include "intel_blt.h"
+#include "intel_mocs.h"
+#include "intel_reg.h"
+
+#include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
+#include "xe/xe_util.h"
+
+/**
+ * TEST: Basic multi-gpu SVM testing
+ * Category: SVM
+ * Mega feature: Compute
+ * Sub-category: Compute tests
+ * Functionality: SVM p2p access, madvise and prefetch.
+ * Test category: functionality test
+ *
+ * SUBTEST: mgpu-xgpu-access-basic
+ * Description:
+ *	Test basic cross-GPU memory access in multi-GPU SVM configuration
+ *
+ * SUBTEST: mgpu-xgpu-access-prefetch
+ * Description:
+ *	Test cross-GPU memory access with prefetch in multi-GPU SVM configuration
+ *
+ */
+
+#define MAX_XE_REGIONS	8
+#define MAX_XE_GPUS 8
+#define NUM_LOOPS 1
+#define BATCH_SIZE(_fd) ALIGN(SZ_8K, xe_get_default_alignment(_fd))
+#define BIND_SYNC_VAL 0x686868
+#define EXEC_SYNC_VAL 0x676767
+#define COPY_SIZE SZ_64M
+
+#define MULTIGPU_PREFETCH		BIT(1)
+#define MULTIGPU_XGPU_ACCESS		BIT(2)
+
+struct xe_svm_gpu_info {
+	bool supports_faults;
+	int vram_regions[MAX_XE_REGIONS];
+	unsigned int num_regions;
+	unsigned int va_bits;
+	int fd;
+};
+
+typedef void (*gpu_pair_fn)(struct xe_svm_gpu_info *src,
+			    struct xe_svm_gpu_info *dst,
+			    struct drm_xe_engine_class_instance *eci,
+			    unsigned int flags);
+
+static void for_each_gpu_pair(int num_gpus,
+			      struct xe_svm_gpu_info *gpus,
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn,
+			      unsigned int flags);
+
+static void gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+				   struct xe_svm_gpu_info *dst,
+				   struct drm_xe_engine_class_instance *eci,
+				   unsigned int flags);
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info);
+
+static void
+create_vm_and_queue(struct xe_svm_gpu_info *gpu, struct drm_xe_engine_class_instance *eci,
+		    uint32_t *vm, uint32_t *exec_queue)
+{
+	*vm = xe_vm_create(gpu->fd,
+			   DRM_XE_VM_CREATE_FLAG_LR_MODE | DRM_XE_VM_CREATE_FLAG_FAULT_MODE, 0);
+	*exec_queue = xe_exec_queue_create(gpu->fd, *vm, eci, 0);
+	xe_vm_bind_lr_sync(gpu->fd, *vm, 0, 0, 0, 1ull << gpu->va_bits,
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+}
+
+static void
+setup_sync(struct drm_xe_sync *sync, uint64_t **sync_addr, uint64_t timeline_value)
+{
+	*sync_addr = malloc(sizeof(**sync_addr));
+	igt_assert(*sync_addr);
+	sync->flags = DRM_XE_SYNC_FLAG_SIGNAL;
+	sync->type = DRM_XE_SYNC_TYPE_USER_FENCE;
+	sync->addr = to_user_pointer((uint64_t *)*sync_addr);
+	sync->timeline_value = timeline_value;
+	**sync_addr = 0;
+}
+
+static void
+cleanup_vm_and_queue(struct xe_svm_gpu_info *gpu, uint32_t vm, uint32_t exec_queue)
+{
+	xe_vm_unbind_lr_sync(gpu->fd, vm, 0, 0, 1ull << gpu->va_bits);
+	xe_exec_queue_destroy(gpu->fd, exec_queue);
+	xe_vm_destroy(gpu->fd, vm);
+}
+
+static void xe_multigpu_madvise(int src_fd, uint32_t vm, uint64_t addr, uint64_t size,
+				uint64_t ext, uint32_t type, int dst_fd, uint16_t policy,
+				uint32_t instance, uint32_t exec_queue)
+{
+	int ret;
+
+	if (src_fd != dst_fd) {
+		ret = __xe_vm_madvise(src_fd, vm, addr, size, ext, type, dst_fd, policy, instance);
+		if (ret == -ENOLINK) {
+			igt_info("No fast interconnect between GPU0 and GPU1, falling back to local VRAM\n");
+			ret = __xe_vm_madvise(src_fd, vm, addr, size, ext, type,
+					      DRM_XE_PREFERRED_LOC_DEFAULT_DEVICE,
+					      policy, 0);
+			if (ret) {
+				igt_info("Local VRAM madvise failed, falling back to system memory\n");
+				xe_vm_madvise(src_fd, vm, addr, size, ext, type,
+					      DRM_XE_PREFERRED_LOC_DEFAULT_SYSTEM, policy,
+					      0);
+			}
+		} else {
+			igt_assert_eq(ret, 0);
+		}
+	} else {
+		xe_vm_madvise(src_fd, vm, addr, size, ext, type, dst_fd, policy, instance);
+	}
+}
+
+static void xe_multigpu_prefetch(int src_fd, uint32_t vm, uint64_t addr, uint64_t size,
+				 struct drm_xe_sync *sync, uint64_t *sync_addr,
+				 uint32_t exec_queue, unsigned int flags)
+{
+	if (flags & MULTIGPU_PREFETCH) {
+		xe_vm_prefetch_async(src_fd, vm, 0, 0, addr, size, sync, 1,
+				     DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC);
+		if (*sync_addr != sync->timeline_value)
+			xe_wait_ufence(src_fd, (uint64_t *)sync_addr, sync->timeline_value,
+				       exec_queue, NSEC_PER_SEC * 10);
+	}
+}
+
+static void for_each_gpu_pair(int num_gpus, struct xe_svm_gpu_info *gpus,
+			      struct drm_xe_engine_class_instance *eci,
+			      gpu_pair_fn fn, unsigned int flags)
+{
+	for (int src = 0; src < num_gpus; src++) {
+		if (!gpus[src].supports_faults)
+			continue;
+
+		for (int dst = 0; dst < num_gpus; dst++) {
+			if (src == dst)
+				continue;
+			fn(&gpus[src], &gpus[dst], eci, flags);
+		}
+	}
+}
+
+static void batch_init(int fd, uint32_t vm, uint64_t src_addr,
+		       uint64_t dst_addr, uint64_t copy_size,
+		       uint32_t *bo, uint64_t *addr)
+{
+	uint32_t width = copy_size / 256;
+	uint32_t height = 1;
+	uint32_t batch_bo_size = BATCH_SIZE(fd);
+	uint32_t batch_bo;
+	uint64_t batch_addr;
+	void *batch;
+	uint32_t *cmd;
+	uint32_t mocs_index = intel_get_uc_mocs_index(fd);
+	int i = 0;
+
+	batch_bo = xe_bo_create(fd, vm, batch_bo_size, vram_if_possible(fd, 0), 0);
+	batch = xe_bo_map(fd, batch_bo, batch_bo_size);
+	cmd = (uint32_t *)batch;
+	cmd[i++] = MEM_COPY_CMD | (1 << 19);
+	cmd[i++] = width - 1;
+	cmd[i++] = height - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = width - 1;
+	cmd[i++] = src_addr & ((1UL << 32) - 1);
+	cmd[i++] = src_addr >> 32;
+	cmd[i++] = dst_addr & ((1UL << 32) - 1);
+	cmd[i++] = dst_addr >> 32;
+	cmd[i++] = mocs_index << XE2_MEM_COPY_MOCS_SHIFT | mocs_index;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+	cmd[i++] = MI_BATCH_BUFFER_END;
+
+	batch_addr = to_user_pointer(batch);
+	/* Punch a gap in the SVM map where we map the batch_bo */
+	xe_vm_bind_lr_sync(fd, vm, batch_bo, 0, batch_addr, batch_bo_size, 0);
+	*bo = batch_bo;
+	*addr = batch_addr;
+}
+
+static void batch_fini(int fd, uint32_t vm, uint32_t bo, uint64_t addr)
+{
+	/* Unmap the batch bo by re-instating the SVM binding. */
+	xe_vm_bind_lr_sync(fd, vm, 0, 0, addr, BATCH_SIZE(fd),
+			   DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR);
+	gem_close(fd, bo);
+}
+
+static void open_pagemaps(int fd, struct xe_svm_gpu_info *info)
+{
+	unsigned int count = 0;
+	uint64_t regions = all_memory_regions(fd);
+	uint32_t region;
+
+	xe_for_each_mem_region(fd, regions, region) {
+		if (XE_IS_VRAM_MEMORY_REGION(fd, region)) {
+			struct drm_xe_mem_region *mem_region =
+				xe_mem_region(fd, 1ull << (region - 1));
+			igt_assert(count < MAX_XE_REGIONS);
+			info->vram_regions[count++] = mem_region->instance;
+		}
+	}
+
+	info->num_regions = count;
+}
+
+static int get_device_info(struct xe_svm_gpu_info gpus[], int num_gpus)
+{
+	int cnt;
+	int xe;
+	int i;
+
+	for (i = 0, cnt = 0 && i < 128; cnt < num_gpus; i++) {
+		xe = __drm_open_driver_another(i, DRIVER_XE);
+		if (xe < 0)
+			break;
+
+		gpus[cnt].fd = xe;
+		cnt++;
+	}
+
+	return cnt;
+}
+
+static int
+mgpu_check_fault_support(struct xe_svm_gpu_info *gpu1,
+			 struct xe_svm_gpu_info *gpu2)
+{
+	int ret = 0;
+
+	if (!gpu1->supports_faults || !gpu2->supports_faults) {
+		igt_debug("GPU does not support page faults, skipping execution\n");
+		ret = 1;
+	}
+	return ret;
+}
+
+static void
+copy_src_dst(struct xe_svm_gpu_info *gpu1,
+	     struct xe_svm_gpu_info *gpu2,
+	     struct drm_xe_engine_class_instance *eci,
+	     unsigned int flags)
+{
+	uint32_t vm[1];
+	uint32_t exec_queue[2];
+	uint32_t batch_bo;
+	void *copy_src, *copy_dst;
+	uint64_t batch_addr;
+	struct drm_xe_sync sync = {};
+	uint64_t *sync_addr;
+
+	/* Checking if GPU support page faults */
+	if (mgpu_check_fault_support(gpu1, gpu2))
+		return;
+
+	create_vm_and_queue(gpu1, eci, &vm[0], &exec_queue[0]);
+
+	/* Allocate source and destination buffers */
+	copy_src = aligned_alloc(xe_get_default_alignment(gpu1->fd), SZ_64M);
+	igt_assert(copy_src);
+	copy_dst = aligned_alloc(xe_get_default_alignment(gpu2->fd), SZ_64M);
+	igt_assert(copy_dst);
+
+	batch_init(gpu1->fd, vm[0], to_user_pointer(copy_src), to_user_pointer(copy_dst),
+		   COPY_SIZE, &batch_bo, &batch_addr);
+
+	/* Fill the source with a pattern, clear the destination. */
+	memset(copy_src, 0x67, COPY_SIZE);
+	memset(copy_dst, 0x0, COPY_SIZE);
+
+	xe_multigpu_madvise(gpu1->fd, vm[0], to_user_pointer(copy_dst), COPY_SIZE,
+			    0, DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC,
+			    gpu2->fd, 0, gpu2->vram_regions[0], exec_queue[0]);
+
+	setup_sync(&sync, &sync_addr, BIND_SYNC_VAL);
+	xe_multigpu_prefetch(gpu1->fd, vm[0], to_user_pointer(copy_dst), COPY_SIZE, &sync,
+			     sync_addr, exec_queue[0], flags);
+	free(sync_addr);
+
+	sync_addr = (void *)((char *)batch_addr + SZ_4K);
+	sync.addr = to_user_pointer((uint64_t *)sync_addr);
+	sync.timeline_value = EXEC_SYNC_VAL;
+	WRITE_ONCE(*sync_addr, 0);
+
+	/* Execute a GPU copy. */
+	xe_exec_sync(gpu1->fd, exec_queue[0], batch_addr, &sync, 1);
+	if (READ_ONCE(*sync_addr) != EXEC_SYNC_VAL)
+		xe_wait_ufence(gpu1->fd, (uint64_t *)sync_addr, EXEC_SYNC_VAL, exec_queue[0],
+			       NSEC_PER_SEC * 10);
+
+	igt_assert(memcmp(copy_src, copy_dst, COPY_SIZE) == 0);
+
+	free(copy_dst);
+	free(copy_src);
+	munmap((void *)batch_addr, BATCH_SIZE(gpu1->fd));
+	batch_fini(gpu1->fd, vm[0], batch_bo, batch_addr);
+	cleanup_vm_and_queue(gpu1, vm[0], exec_queue[0]);
+}
+
+static void
+gpu_mem_access_wrapper(struct xe_svm_gpu_info *src,
+		       struct xe_svm_gpu_info *dst,
+		       struct drm_xe_engine_class_instance *eci,
+		       unsigned int flags)
+{
+	igt_assert(src);
+	igt_assert(dst);
+
+	copy_src_dst(src, dst, eci, flags);
+}
+
+static void
+test_mgpu_exec(int gpu_cnt, struct xe_svm_gpu_info *gpus,
+	       struct drm_xe_engine_class_instance *eci,
+	       unsigned int flags)
+{
+	if (flags & MULTIGPU_XGPU_ACCESS)
+		for_each_gpu_pair(gpu_cnt, gpus, eci, gpu_mem_access_wrapper, flags);
+}
+
+struct section {
+	const char *name;
+	unsigned int flags;
+};
+
+igt_main
+{
+	struct xe_svm_gpu_info gpus[MAX_XE_GPUS];
+	struct xe_device *xe;
+	int gpu, gpu_cnt;
+
+	struct drm_xe_engine_class_instance eci = {
+		.engine_class = DRM_XE_ENGINE_CLASS_COPY,
+	};
+
+	const struct section msections[] = {
+		{ "xgpu-access-basic", MULTIGPU_XGPU_ACCESS },
+		{ "xgpu-access-prefetch", MULTIGPU_PREFETCH | MULTIGPU_XGPU_ACCESS },
+		{ NULL },
+	};
+
+	igt_fixture {
+		gpu_cnt = get_device_info(gpus, ARRAY_SIZE(gpus));
+		igt_skip_on(gpu_cnt < 2);
+
+		for (gpu = 0; gpu < gpu_cnt; ++gpu) {
+			igt_assert(gpu < MAX_XE_GPUS);
+
+			open_pagemaps(gpus[gpu].fd, &gpus[gpu]);
+			/* NOTE! inverted return value. */
+			gpus[gpu].supports_faults = !xe_supports_faults(gpus[gpu].fd);
+			fprintf(stderr, "GPU %u has %u VRAM regions%s, and %s SVM VMs.\n",
+				gpu, gpus[gpu].num_regions,
+				gpus[gpu].num_regions != 1 ? "s" : "",
+				gpus[gpu].supports_faults ? "supports" : "doesn't support");
+
+			xe = xe_device_get(gpus[gpu].fd);
+			gpus[gpu].va_bits = xe->va_bits;
+		}
+	}
+
+	igt_describe("gpu-gpu write-read");
+	for (const struct section *s = msections; s->name; s++) {
+		igt_subtest_f("mgpu-%s", s->name)
+			test_mgpu_exec(gpu_cnt, gpus, &eci, s->flags);
+	}
+
+	igt_fixture {
+		int cnt;
+
+		for (cnt = 0; cnt < gpu_cnt; cnt++)
+			drm_close_driver(gpus[cnt].fd);
+	}
+}
tests/meson.build +1 -0
index 9736f2338..1209f84a4 100644
@@ -313,6 +313,7 @@ intel_xe_progs = [
 	'xe_media_fill',
 	'xe_mmap',
 	'xe_module_load',
+        'xe_multi_gpusvm',
 	'xe_noexec_ping_pong',
 	'xe_oa',
 	'xe_pat',
Signature · 1 line
2.48.1