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.
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 theioctl
withAMDKFD_IOC_ALLOC_MEMORY_OF_GPU
as the argument and finally goes toamdgpu_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