All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/xe_mmap: Fix truncation of visible VRAM size
@ 2025-09-29 14:25 Marcin Bernatowicz
  2025-09-29 14:58 ` Matthew Auld
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Marcin Bernatowicz @ 2025-09-29 14:25 UTC (permalink / raw)
  To: igt-dev; +Cc: Marcin Bernatowicz, Lukasz Laguna, Matthew Auld

xe_visible_vram_size() returns a 64-bit value. Storing it in 32-bit
truncated sizes above 4 GiB and led to false positives.

Fixes: c93b4e6ff2f3 ("tests/xe/mmap: sanity check small-bar")
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
---
 tests/intel/xe_mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/intel/xe_mmap.c b/tests/intel/xe_mmap.c
index 9b87a9534..79c611f52 100644
--- a/tests/intel/xe_mmap.c
+++ b/tests/intel/xe_mmap.c
@@ -291,7 +291,7 @@ static void trap_sigbus(uint32_t *ptr)
 static void test_small_bar(int fd)
 {
 	size_t page_size = xe_get_default_alignment(fd);
-	uint32_t visible_size = xe_visible_vram_size(fd, 0);
+	uint64_t visible_size = xe_visible_vram_size(fd, 0);
 	uint32_t bo;
 	uint64_t mmo;
 	uint32_t *map;
-- 
2.31.1


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

end of thread, other threads:[~2025-09-30  8:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-29 14:25 [PATCH i-g-t] tests/intel/xe_mmap: Fix truncation of visible VRAM size Marcin Bernatowicz
2025-09-29 14:58 ` Matthew Auld
2025-09-29 17:44 ` ✓ i915.CI.BAT: success for " Patchwork
2025-09-29 17:49 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-29 19:01 ` ✓ Xe.CI.Full: " Patchwork
2025-09-29 22:12 ` ✗ i915.CI.Full: failure " Patchwork
2025-09-30  8:05   ` Bernatowicz, Marcin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.