ROCK-Kernel-Driver icon indicating copy to clipboard operation
ROCK-Kernel-Driver copied to clipboard

Obtain the physical address when allocating via `hipMalloc`

Open xuantengh opened this issue 2 years ago • 1 comments

Description

I'm conducting a research problem about AMD GPU memory management, including a step to obtain the physical address of the user space pointer returned by hipMalloc. I find that this process is executed by the ioctl with AMDKFD_IOC_ALLOC_MEMORY_OF_GPU as the argument and finally goes to amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu.

So I'm wondering is there any approach to obtain the physical address during this process, if so, which interface or data structure should I look for. Thanks in advance.

Operating System

Ubuntu 22.04

GPU

MI100

ROCm Component

No response

xuantengh avatar Jan 18 '24 11:01 xuantengh

@xuantengh Internal ticket is created to assist with your issue. Thanks!

ppanchad-amd avatar Aug 20 '24 14:08 ppanchad-amd

Hi @xuantengh, Exposing the physical address can potentially lead to security concerns. So unfortunately, it is not a supported feature.

alexxu-amd avatar Sep 10 '24 14:09 alexxu-amd