Version in base suite: 535.54.03-1~deb12u1 Base version: nvidia-modprobe_535.54.03-1~deb12u1 Target version: nvidia-modprobe_535.161.07-1~deb12u1 Base file: /srv/ftp-master.debian.org/ftp/pool/contrib/n/nvidia-modprobe/nvidia-modprobe_535.54.03-1~deb12u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/contrib/n/nvidia-modprobe/nvidia-modprobe_535.161.07-1~deb12u1.dsc debian/changelog | 12 +++++++++ debian/copyright | 2 - debian/salsa-ci.yml | 3 -- modprobe-utils/nvidia-modprobe-utils.c | 41 +++++++++++++++++++++++++++++++++ modprobe-utils/nvidia-modprobe-utils.h | 1 nvidia-modprobe.1.m4 | 2 - nvidia-modprobe.c | 13 ++++++++++ option-table.h | 8 ++++++ version.mk | 2 - 9 files changed, 79 insertions(+), 5 deletions(-) diff -Nru nvidia-modprobe-535.54.03/debian/changelog nvidia-modprobe-535.161.07/debian/changelog --- nvidia-modprobe-535.54.03/debian/changelog 2023-07-11 22:16:04.000000000 +0000 +++ nvidia-modprobe-535.161.07/debian/changelog 2024-03-25 22:08:54.000000000 +0000 @@ -1,3 +1,15 @@ +nvidia-modprobe (535.161.07-1~deb12u1) bookworm; urgency=medium + + * Rebuild for bookworm. + + -- Andreas Beckmann Mon, 25 Mar 2024 23:08:54 +0100 + +nvidia-modprobe (535.161.07-1) unstable; urgency=medium + + * New upstream release. + + -- Andreas Beckmann Thu, 07 Mar 2024 14:36:38 +0100 + nvidia-modprobe (535.54.03-1~deb12u1) bookworm; urgency=medium * Rebuild for bookworm. diff -Nru nvidia-modprobe-535.54.03/debian/copyright nvidia-modprobe-535.161.07/debian/copyright --- nvidia-modprobe-535.54.03/debian/copyright 2023-07-11 22:16:04.000000000 +0000 +++ nvidia-modprobe-535.161.07/debian/copyright 2024-03-25 22:08:54.000000000 +0000 @@ -27,7 +27,7 @@ Files: debian/* Copyright: - © 2014-2023 Andreas Beckmann + © 2014-2024 Andreas Beckmann License: Expat License: Expat diff -Nru nvidia-modprobe-535.54.03/debian/salsa-ci.yml nvidia-modprobe-535.161.07/debian/salsa-ci.yml --- nvidia-modprobe-535.54.03/debian/salsa-ci.yml 2023-07-11 22:16:04.000000000 +0000 +++ nvidia-modprobe-535.161.07/debian/salsa-ci.yml 2024-03-25 22:08:54.000000000 +0000 @@ -1,4 +1,3 @@ --- include: - - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml - - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml diff -Nru nvidia-modprobe-535.54.03/modprobe-utils/nvidia-modprobe-utils.c nvidia-modprobe-535.161.07/modprobe-utils/nvidia-modprobe-utils.c --- nvidia-modprobe-535.54.03/modprobe-utils/nvidia-modprobe-utils.c 2023-06-06 23:16:34.000000000 +0000 +++ nvidia-modprobe-535.161.07/modprobe-utils/nvidia-modprobe-utils.c 2024-02-18 00:04:16.000000000 +0000 @@ -1059,4 +1059,45 @@ cap_file_path, uid, gid, mode); } +/* + * Attempt to enable auto onlining mode online_movable + */ +int nvidia_enable_auto_online_movable(const int print_errors) +{ + int fd; + const char path_to_file[] = "/sys/devices/system/memory/auto_online_blocks"; + const char str[] = "online_movable"; + ssize_t write_count; + + fd = open(path_to_file, O_RDWR, 0); + if (fd < 0) + { + if (print_errors) + { + fprintf(stderr, + "NVIDIA: failed to open `%s`: %s.\n", + path_to_file, strerror(errno)); + } + return 0; + } + + write_count = write(fd, str, sizeof(str)); + if (write_count != sizeof(str)) + { + if (print_errors) + { + fprintf(stderr, + "NVIDIA: unable to write to `%s`: %s.\n", + path_to_file, strerror(errno)); + } + + close(fd); + return 0; + } + + close(fd); + + return 1; +} + #endif /* NV_LINUX */ diff -Nru nvidia-modprobe-535.54.03/modprobe-utils/nvidia-modprobe-utils.h nvidia-modprobe-535.161.07/modprobe-utils/nvidia-modprobe-utils.h --- nvidia-modprobe-535.54.03/modprobe-utils/nvidia-modprobe-utils.h 2023-06-06 23:16:34.000000000 +0000 +++ nvidia-modprobe-535.161.07/modprobe-utils/nvidia-modprobe-utils.h 2024-02-18 00:04:16.000000000 +0000 @@ -85,6 +85,7 @@ int nvidia_cap_get_file_state(const char* cap_file_path); int nvidia_get_chardev_major(const char *name); int nvidia_msr_modprobe(void); +int nvidia_enable_auto_online_movable(const int print_errors); #endif /* NV_LINUX */ diff -Nru nvidia-modprobe-535.54.03/nvidia-modprobe.1.m4 nvidia-modprobe-535.161.07/nvidia-modprobe.1.m4 --- nvidia-modprobe-535.54.03/nvidia-modprobe.1.m4 2023-06-06 23:16:34.000000000 +0000 +++ nvidia-modprobe-535.161.07/nvidia-modprobe.1.m4 2024-02-18 00:04:16.000000000 +0000 @@ -28,7 +28,7 @@ .SH DESCRIPTION The .B nvidia\-modprobe -utility is used by user-space NVIDIA driver components to make sure the NVIDIA kernel module is loaded and that the NVIDIA character device files are present. These facilities are normally provided by Linux distribution configuration systems such as udev. When possible, it is recommended to use your Linux distribution's native mechanisms for managing kernel module loading and device file creation. This utility is provided as a fallback to work out-of-the-box in a distribution-independent way. +utility is used by user-space NVIDIA driver components to make sure the NVIDIA kernel module is loaded, the NVIDIA character device files are present and configure certain runtime settings in the kernel. These facilities are normally provided by Linux distribution configuration systems such as udev. When possible, it is recommended to use your Linux distribution's native mechanisms for managing kernel module loading, device file creation and kernel runtime config settings. This utility is provided as a fallback to work out-of-the-box in a distribution-independent way. .PP When installed .B by nvidia\-installer diff -Nru nvidia-modprobe-535.54.03/nvidia-modprobe.c nvidia-modprobe-535.161.07/nvidia-modprobe.c --- nvidia-modprobe-535.54.03/nvidia-modprobe.c 2023-06-06 23:16:34.000000000 +0000 +++ nvidia-modprobe-535.161.07/nvidia-modprobe.c 2024-02-18 00:04:16.000000000 +0000 @@ -97,6 +97,7 @@ int modeset = FALSE; int nvswitch = FALSE; int nvlink = FALSE; + int enable_auto_online_movable = FALSE; int unused; while (1) @@ -157,6 +158,9 @@ exit(1); } break; + case 'a': + enable_auto_online_movable = TRUE; + break; default: nv_error_msg("Invalid commandline, please run `%s --help` " "for usage information.\n", argv[0]); @@ -222,6 +226,15 @@ } } } + else if (enable_auto_online_movable) + { + /* Enable auto onlining mode online_movable */ + ret = nvidia_enable_auto_online_movable(0); + if (!ret) + { + goto done; + } + } else { /* Load the kernel module. */ diff -Nru nvidia-modprobe-535.54.03/option-table.h nvidia-modprobe-535.161.07/option-table.h --- nvidia-modprobe-535.54.03/option-table.h 2023-06-06 23:16:34.000000000 +0000 +++ nvidia-modprobe-535.161.07/option-table.h 2024-02-18 00:04:16.000000000 +0000 @@ -72,5 +72,13 @@ "/proc file path. This option can be specified multiple times to create " "multiple NVIDIA capability device files." }, + { "auto-online-movable", + 'a', + 0, + NULL, + "Enable the online_movable auto onlining kernel setting for " + "platforms (like Grace Hopper) that add and online GPU memory " + "to the kernel" }, + { NULL, 0, 0, NULL, NULL }, }; diff -Nru nvidia-modprobe-535.54.03/version.mk nvidia-modprobe-535.161.07/version.mk --- nvidia-modprobe-535.54.03/version.mk 2023-06-06 23:16:34.000000000 +0000 +++ nvidia-modprobe-535.161.07/version.mk 2024-02-18 00:04:16.000000000 +0000 @@ -1,4 +1,4 @@ -NVIDIA_VERSION = 535.54.03 +NVIDIA_VERSION = 535.161.07 # This file. VERSION_MK_FILE := $(lastword $(MAKEFILE_LIST))