[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to check for resizable BAR or HSA_AMD_P2P?



Hi Cory,

> On Apr 9, 2024, at 12:09, Cordell Bloor <cgmb@slerp.xyz> wrote:
> 
> Hi folks,
> 
> Does anyone know how to programmatically check if:
> 
> 1. Large BAR is enabled?
> 2. The kernel was built with HSA_AMD_P2P?

For the amdgpu kernel module, one can query the P2P config description:

$ modinfo amdgpu | grep "parm:" | grep “pcie_p2p"
parm:           pcie_p2p:Enable PCIe P2P (requires large-BAR). (N = off, Y = on(default)) (bool)

To check the value, I use:

$ cat /sys/module/amdgpu/parameters/pcie_p2p
Y

I guess pcie_pip=Y can indidate large-BAR is enabled?

As for kernel build config, I usually check via:

$ cat /boot/config-`uname -r` | grep “HSA_AMD”

But the above command returns only the two lines in my machine:

CONFIG_HSA_AMD=y
CONFIG_HSA_AMD_SVM=y

I’m not sure whether there will be “CONFIG_HSA_AMD_P2P=y” if it’s enabled.

Best,
Xuanteng


Reply to: