From: Sobin Thomas <sobin.thomas@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: nishit.sharma@intel.com, Sobin Thomas <sobin.thomas@intel.com>
Subject: [PATCH i-g-t 1/1] tests/intel/xe_exec_system_allocator: Added 64k alignment support
Date: Mon, 24 Nov 2025 04:28:21 +0000 [thread overview]
Message-ID: <20251124042821.283623-2-sobin.thomas@intel.com> (raw)
In-Reply-To: <20251124042821.283623-1-sobin.thomas@intel.com>
The original test for madvise split vm only supported 4 KB alignment,
which failed certain hardware such as PVC that required 64 KB page
alignment. The test has been updated to include support for 64 KB
page alignment.
Signed-off-by: Sobin Thomas <sobin.thomas@intel.com>
---
tests/intel/xe_exec_system_allocator.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/tests/intel/xe_exec_system_allocator.c b/tests/intel/xe_exec_system_allocator.c
index b88967e58..9530e07e7 100644
--- a/tests/intel/xe_exec_system_allocator.c
+++ b/tests/intel/xe_exec_system_allocator.c
@@ -1201,6 +1201,8 @@ xe_vm_parse_execute_madvise(int fd, uint32_t vm, struct test_exec_data *data,
struct drm_xe_sync *sync, uint8_t (*pat_value)(int))
{
uint32_t bo_flags, bo = 0;
+ uint64_t split_addr, split_size;
+ uint64_t alignment;
if (flags & MADVISE_ATOMIC_DEVICE)
xe_vm_madvise_atomic_attr(fd, vm, to_user_pointer(data), bo_size,
@@ -1251,17 +1253,29 @@ xe_vm_parse_execute_madvise(int fd, uint32_t vm, struct test_exec_data *data,
}
if (flags & MADVISE_SPLIT_VMA) {
+ uint16_t dev_id = intel_get_drm_devid(fd);
+ uint64_t alignment = SZ_4K;
+
+ if (IS_PONTEVECCHIO(dev_id))
+ alignment = SZ_64K;
+
if (bo_size)
- bo_size = ALIGN(bo_size, SZ_4K);
+ bo_size = ALIGN(bo_size, alignment);
+
+ split_addr = to_user_pointer(data) + bo_size/2;
+ split_addr = ALIGN(split_addr, alignment);
+ split_size = bo_size / 2;
+ split_size = ALIGN(split_size, alignment);
bo_flags = DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM;
bo = xe_bo_create(fd, vm, bo_size, vram_if_possible(fd, eci->gt_id),
bo_flags);
- xe_vm_bind_async(fd, vm, 0, bo, 0, to_user_pointer(data) + bo_size / 2,
- bo_size / 2, 0, 0);
- __xe_vm_bind_assert(fd, vm, 0, 0, 0, to_user_pointer(data) + bo_size / 2,
- bo_size / 2, DRM_XE_VM_BIND_OP_MAP,
+ xe_vm_bind_async(fd, vm, 0, bo, 0, split_addr,
+ split_size, 0, 0);
+
+ __xe_vm_bind_assert(fd, vm, 0, 0, 0, split_addr,
+ split_size, DRM_XE_VM_BIND_OP_MAP,
DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR, sync,
1, 0, 0);
xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE, 0, FIVE_SEC);
@@ -1269,7 +1283,7 @@ xe_vm_parse_execute_madvise(int fd, uint32_t vm, struct test_exec_data *data,
gem_close(fd, bo);
bo = 0;
- xe_vm_madvise_atomic_attr(fd, vm, to_user_pointer(data), bo_size / 2,
+ xe_vm_madvise_atomic_attr(fd, vm, split_addr, split_size,
DRM_XE_ATOMIC_GLOBAL);
}
--
2.51.0
next prev parent reply other threads:[~2025-11-24 4:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 4:28 [PATCH i-g-t 0/1] tests/intel/xe_exec_system_allocator: Added 64k alignment support Sobin Thomas
2025-11-24 4:28 ` Sobin Thomas [this message]
2025-11-27 9:35 ` [PATCH i-g-t 1/1] " Sharma, Nishit
2025-11-25 6:42 ` ✓ i915.CI.BAT: success for tests/intel/xe_exec_system_allocator: Added 64k alignment support (rev2) Patchwork
2025-11-25 14:30 ` ✗ i915.CI.Full: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251124042821.283623-2-sobin.thomas@intel.com \
--to=sobin.thomas@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nishit.sharma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox