From 0de73eeaf892d98fd946b56c0ee90b72c52fa6d6 Mon Sep 17 00:00:00 2001 From: "Yao, Longlong" Date: Fri, 11 Apr 2025 19:25:53 +0800 Subject: [PATCH] SWDEV-518966 - Avoid creating Arena Memobj for VMM pointer (#39) Change-Id: I69c6c0a1464d01e674ac929de34ab10047012f1a Signed-off-by: Longlong Yao --- rocclr/device/rocm/rocdevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp index 9ab3403f2a..d2cec2afcf 100644 --- a/rocclr/device/rocm/rocdevice.cpp +++ b/rocclr/device/rocm/rocdevice.cpp @@ -3405,6 +3405,10 @@ bool Device::IsValidAllocation(const void* dev_ptr, size_t size, hsa_amd_pointer LogError("hsa_amd_pointer_info() failed"); } + if (ptr_info->type == HSA_EXT_POINTER_TYPE_RESERVED_ADDR) { + return false; + } + // Return false for pinned memory. A true return may result in a race because // ROCclr may attempt to do a pin/copy/unpin underneath in a multithreaded environment if (ptr_info->type == HSA_EXT_POINTER_TYPE_LOCKED) {