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

Convert hardcoded list of OS names into a default case & Merge upstream

Open agravgaard opened this issue 5 years ago • 4 comments

Reasoning described in #94

agravgaard avatar Jun 14 '20 12:06 agravgaard

This patch will currently fail as the dkms build:

  MODPOST 4 modules
ERROR: modpost: "kallsyms_lookup_name" [/var/lib/dkms/amdgpu-3.5/30/build/amd/amdkcl/amdkcl.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make: *** [Makefile:1642: modules] Error 2
make: Leaving directory '/usr/lib/modules/5.7.0-3-MANJARO/build'

The reason is better explained in: https://github.com/anbox/anbox-modules/issues/49 and here kallsyms_lookup_name is no longer exported in 5.7 for security reasons, so I guess all referenced in amdkcl and dkms should be avoided for 5.7.

Adjust kernel version conditionals:

https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/blob/2106edaef95ae2262097652454bce1fe720b2b9b/drivers/gpu/drm/amd/amdkcl/kcl_common.h#L11-L21

https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/blob/2106edaef95ae2262097652454bce1fe720b2b9b/drivers/gpu/drm/amd/amdkcl/symbols#L3-L5

And possibly in some of the configure scripts in amd/dkms

agravgaard avatar Jun 15 '20 10:06 agravgaard

The DKMS build is now succeeding for me with 4.19, 5.6 and 5.7.

With the module installed Linux 5.7 boots fine and has the attached rocminfo and dmesg output: rocminfo_output.txt dmesg_grep_amdgpu.txt

Do you need more info, testing or other logs ?

agravgaard avatar Jun 15 '20 15:06 agravgaard

Hi Andreas, it looks like you're trying to make our DKMS/release branch work with the latest upstream kernels. That's not really the purpose of that branch. The purpose is to support older or patched Linux kernels used in popular Linux distributions. Therefore our DKMS kernel support development is usually aligned with the Linux distributions' release schedule. We don't try to keep up with every upstream release.

If you want to use ROCm with the latest upstream kernels, I would recommend you try the KFD included in the upstream kernel. We do most of our KFD development in the upstream branch anyway; it flows into the DKMS branch from there. There are only a few features still missing upstream, I'm not sure whether those matter to you. We're working on closing that gap:

  • PCIe P2P support
  • IPC support (used by MPI), patch has been submitted for upstream consideration, waiting for feedback, maybe I should ping that thread
  • GDB support is still experimental and depends on experimental GDB patches, we won't upstream that until we have settled on a final API

fxkamd avatar Aug 27 '20 15:08 fxkamd

Hi Andreas, it looks like you're trying to make our DKMS/release branch work with the latest upstream kernels. That's not really the purpose of that branch. The purpose is to support older or patched Linux kernels used in popular Linux distributions. Therefore our DKMS kernel support development is usually aligned with the Linux distributions' release schedule. We don't try to keep up with every upstream release.

If you want to use ROCm with the latest upstream kernels, I would recommend you try the KFD included in the upstream kernel. We do most of our KFD development in the upstream branch anyway; it flows into the DKMS branch from there. There are only a few features still missing upstream, I'm not sure whether those matter to you. We're working on closing that gap:

  • PCIe P2P support
  • IPC support (used by MPI), patch has been submitted for upstream consideration, waiting for feedback, maybe I should ping that thread
  • GDB support is still experimental and depends on experimental GDB patches, we won't upstream that until we have settled on a final API

Makes sense, thanks for clearing that up! Those features are not that important to me (gdb support will definitely be at some point sooner or later) - I'm not sure about the rest of the rocm-arch community though. Anyway, I'll stop working on it for now, and until I or someone else runs into problems with the KFD in upstream.

agravgaard avatar Aug 27 '20 15:08 agravgaard