ROCm / ROCK-Kernel-Driver

AMDGPU Driver with KFD used by the ROCm project. Also contains the current Linux Kernel that matches this base driver
Other
333 stars 101 forks source link

Obtain the physical address when allocating via `hipMalloc` #158

Closed xuantengh closed 2 months ago

xuantengh commented 10 months ago

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

ppanchad-amd commented 3 months ago

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

alexxu-amd commented 2 months ago

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