uvm: Fix build failure for Linux 6.19+ due to HMM and PMM API changes#1015
uvm: Fix build failure for Linux 6.19+ due to HMM and PMM API changes#1015gg582 wants to merge 5 commits intoNVIDIA:mainfrom
Conversation
|
Testing has shown that open-kernel-modules with this patch applied fail to compile the Nvidia module under Ubuntu. |
Here is a fix, which works across several kernels versions. Even tough, I hope NVIDIA will push a 590 update before 6.19 goes stable. |
This seems to stem from the fact that Ubuntu has begun setting Hence, we need more steps there (and for other kernels setting that), at least to get the DKMS package to compile:
[1] Notes: I am a bit uncertain about the |
|
Thanks for the feedback and the suggestions. It's clear that the current PR needs to be more robust to handle different distribution configs like Ubuntu's I'll push the updated commits shortly. |
PR Summary UpdateThis PR has been updated to a more comprehensive and universal fix for Linux 6.19 based on community feedback. Key Changes:
I have verified that these changes allow the module to build successfully on both standard kernels and those with strict security configurations (like Ubuntu's). |
|
Hello, I read a certain patch from CachyOS. |
…rit-aliasing in 'src/nvidia/Makefile'.
|
I am testing on |
|
Added I'd like to request further review if this change makes unexpected behavior. P.S) I didn't run a translator to describe this problem accurately. Its grammar is wrong, but I am sure the meaning is not that wrong. Translator often obfuscate technical correctness. |
Recently, zone_device_page_init was changed. |
|
Sadly, NVIDIA seems that they want to keep this repository exclusively for reading. The last pull request merge was four years ago, and it seems to be only a minimal effort to match the Linux mainline kernel's release cycle. I don't expect that they'll merge this, but I just hope that they may internally test and patch :( |
Description
This PR addresses build failures in the NVIDIA UVM kernel module when compiling against Linux kernel version 6.19.0 and later. It handles two major API changes in the upstream kernel:
zone_device_page_initnow requires an additional argument.uvm_hmm.cto pass the required arguments based on theLINUX_VERSION_CODE.page_freecallback has been removed/changed in recent kernel updates.uvm_pmm_gpu.cto wrap thepage_freeassignment with version checks to prevent compilation errors.The changes use conditional compilation to maintain backward compatibility with older kernel versions.
Testing