VMM: Default access should be none

After a memory handle is created. hsa_amd_vmem_get_access should return
HSA_ACCESS_PERMISSION_NONE insread of reporting the allocation as
invalid.

Change-Id: I1a09d15c220d48497d09c89059493e538f82aeb9


[ROCm/ROCR-Runtime commit: 2f97049da5]
This commit is contained in:
David Yat Sin
2024-01-08 22:27:25 +00:00
parent 01ae507bf2
commit a8664a7471
@@ -3287,7 +3287,10 @@ hsa_status_t Runtime::VMemoryGetAccess(const void* va, hsa_access_permission_t*
*perms = agentPermsIt->second.permissions;
return HSA_STATUS_SUCCESS;
}
return HSA_STATUS_ERROR_INVALID_ALLOCATION;
/* Set access was not called on this memory handle */
*perms = HSA_ACCESS_PERMISSION_NONE;
return HSA_STATUS_SUCCESS;
}
hsa_status_t Runtime::VMemoryExportShareableHandle(int* dmabuf_fd,