Skip to content

Commit 129479b

Browse files
committed
570.124.04
1 parent 81fe4fb commit 129479b

File tree

141 files changed

+102257
-100082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+102257
-100082
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NVIDIA Linux Open GPU Kernel Module Source
22

33
This is the source release of the NVIDIA Linux open GPU kernel modules,
4-
version 570.86.16.
4+
version 570.124.04.
55

66

77
## How to Build
@@ -17,7 +17,7 @@ as root:
1717

1818
Note that the kernel modules built here must be used with GSP
1919
firmware and user-space NVIDIA GPU driver components from a corresponding
20-
570.86.16 driver release. This can be achieved by installing
20+
570.124.04 driver release. This can be achieved by installing
2121
the NVIDIA GPU driver from the .run file using the `--no-kernel-modules`
2222
option. E.g.,
2323

@@ -185,7 +185,7 @@ table below).
185185
For details on feature support and limitations, see the NVIDIA GPU driver
186186
end user README here:
187187

188-
https://us.download.nvidia.com/XFree86/Linux-x86_64/570.86.16/README/kernel_open.html
188+
https://us.download.nvidia.com/XFree86/Linux-x86_64/570.124.04/README/kernel_open.html
189189

190190
For vGPU support, please refer to the README.vgpu packaged in the vGPU Host
191191
Package for more details.
@@ -938,10 +938,17 @@ Subsystem Device ID.
938938
| NVIDIA RTX 500 Ada Generation Laptop GPU | 28BB |
939939
| NVIDIA GeForce RTX 4060 Laptop GPU | 28E0 |
940940
| NVIDIA GeForce RTX 4050 Laptop GPU | 28E1 |
941+
| NVIDIA GeForce RTX 3050 A Laptop GPU | 28E3 |
941942
| NVIDIA RTX 2000 Ada Generation Embedded GPU | 28F8 |
942943
| NVIDIA B200 | 2901 10DE 1999 |
943944
| NVIDIA B200 | 2901 10DE 199B |
944945
| NVIDIA B200 | 2901 10DE 20DA |
946+
| HGX GB200 | 2941 10DE 2046 |
947+
| HGX GB200 | 2941 10DE 20CA |
948+
| HGX GB200 | 2941 10DE 20D5 |
949+
| HGX GB200 | 2941 10DE 21C9 |
950+
| HGX GB200 | 2941 10DE 21CA |
945951
| NVIDIA GeForce RTX 5090 | 2B85 |
946952
| NVIDIA GeForce RTX 5090 D | 2B87 |
947953
| NVIDIA GeForce RTX 5080 | 2C02 |
954+
| NVIDIA GeForce RTX 5070 Ti | 2C05 |

kernel-open/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ EXTRA_CFLAGS += -I$(src)/common/inc
8686
EXTRA_CFLAGS += -I$(src)
8787
EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
8888
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
89-
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"570.86.16\"
89+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"570.124.04\"
9090

9191
ifneq ($(SYSSRCHOST1X),)
9292
EXTRA_CFLAGS += -I$(SYSSRCHOST1X)

kernel-open/common/inc/nv_uvm_types.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2014-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2014-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: MIT
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -756,6 +756,8 @@ typedef struct UvmGpuFbInfo_tag
756756
NvBool bStaticBar1Enabled; // Static BAR1 mode is enabled
757757
NvU64 staticBar1StartOffset; // The start offset of the the static mapping
758758
NvU64 staticBar1Size; // The size of the static mapping
759+
NvU32 heapStart; // The start offset of heap in KB, helpful for MIG
760+
// systems
759761
} UvmGpuFbInfo;
760762

761763
typedef struct UvmGpuEccInfo_tag

kernel-open/conftest.sh

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6307,6 +6307,32 @@ compile_test() {
63076307
compile_check_conftest "$CODE" "NV_NUM_REGISTERED_FB_PRESENT" "" "types"
63086308
;;
63096309

6310+
acpi_video_register_backlight)
6311+
#
6312+
# Determine if acpi_video_register_backlight() function is present
6313+
#
6314+
# acpi_video_register_backlight was added by commit 3dbc80a3e4c55c
6315+
# (ACPI: video: Make backlight class device registration a separate
6316+
# step (v2)) for v6.0 (2022-09-02).
6317+
# Note: the include directive for <linux/types> in this conftest is
6318+
# necessary in order to support kernels between commit 0b9f7d93ca61
6319+
# ("ACPI / i915: ignore firmware requests backlight change") for
6320+
# v3.16 (2014-07-07) and commit 3bd6bce369f5 ("ACPI / video: Port
6321+
# to new backlight interface selection API") for v4.2 (2015-07-16).
6322+
# Kernels within this range use the 'bool' type and the related
6323+
# 'false' value in <acpi/video.h> without first including the
6324+
# definitions of that type and value.
6325+
#
6326+
CODE="
6327+
#include <linux/types.h>
6328+
#include <acpi/video.h>
6329+
void conftest_acpi_video_register_backlight(void) {
6330+
acpi_video_register_backlight(0);
6331+
}"
6332+
6333+
compile_check_conftest "$CODE" "NV_ACPI_VIDEO_REGISTER_BACKLIGHT" "" "functions"
6334+
;;
6335+
63106336
acpi_video_backlight_use_native)
63116337
#
63126338
# Determine if acpi_video_backlight_use_native() function is present
@@ -6690,13 +6716,18 @@ compile_test() {
66906716
#
66916717
# Determine whether drm_client_setup is present.
66926718
#
6693-
# Added by commit d07fdf922592 ("drm/fbdev-ttm:
6694-
# Convert to client-setup") in v6.13.
6719+
# Added by commit d07fdf922592 ("drm/fbdev-ttm: Convert to
6720+
# client-setup") in v6.13 in drm/drm_client_setup.h, but then moved
6721+
# to drm/clients/drm_client_setup.h by commit b86711c6d6e2
6722+
# ("drm/client: Move public client header to clients/ subdirectory")
6723+
# in linux-next b86711c6d6e2.
66956724
#
66966725
CODE="
66976726
#include <drm/drm_fb_helper.h>
66986727
#if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
66996728
#include <drm/drm_client_setup.h>
6729+
#elif defined(NV_DRM_CLIENTS_DRM_CLIENT_SETUP_H_PRESENT)
6730+
#include <drm/clients/drm_client_setup.h>
67006731
#endif
67016732
void conftest_drm_client_setup(void) {
67026733
drm_client_setup();
@@ -7509,6 +7540,31 @@ compile_test() {
75097540
compile_check_conftest "$CODE" "NV_MODULE_IMPORT_NS_TAKES_CONSTANT" "" "generic"
75107541
;;
75117542

7543+
7544+
drm_driver_has_date)
7545+
#
7546+
# Determine if the 'drm_driver' structure has a 'date' field.
7547+
#
7548+
# Removed by commit cb2e1c2136f7 ("drm: remove driver date from
7549+
# struct drm_driver and all drivers") in linux-next, expected in
7550+
# v6.14.
7551+
#
7552+
CODE="
7553+
#if defined(NV_DRM_DRMP_H_PRESENT)
7554+
#include <drm/drmP.h>
7555+
#endif
7556+
7557+
#if defined(NV_DRM_DRM_DRV_H_PRESENT)
7558+
#include <drm/drm_drv.h>
7559+
#endif
7560+
7561+
int conftest_drm_driver_has_date(void) {
7562+
return offsetof(struct drm_driver, date);
7563+
}"
7564+
7565+
compile_check_conftest "$CODE" "NV_DRM_DRIVER_HAS_DATE" "" "types"
7566+
;;
7567+
75127568
# When adding a new conftest entry, please use the correct format for
75137569
# specifying the relevant upstream Linux kernel commit. Please
75147570
# avoid specifying -rc kernels, and only use SHAs that actually exist

kernel-open/header-presence-tests.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ NV_HEADER_PRESENCE_TESTS = \
3131
drm/drm_mode_config.h \
3232
drm/drm_modeset_lock.h \
3333
drm/drm_property.h \
34+
drm/clients/drm_client_setup.h \
3435
dt-bindings/interconnect/tegra_icc_id.h \
3536
generated/autoconf.h \
3637
generated/compile.h \

kernel-open/nvidia-drm/nvidia-drm-conftest.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,13 @@
6565
#if defined(NV_DRM_CLIENT_SETUP_PRESENT) && \
6666
(defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) || \
6767
defined(NV_APERTURE_REMOVE_CONFLICTING_PCI_DEVICES_PRESENT))
68+
// XXX remove dependency on DRM_TTM_HELPER by implementing nvidia-drm's own
69+
// .fbdev_probe callback that uses NVKMS kapi
70+
#if IS_ENABLED(CONFIG_DRM_TTM_HELPER)
6871
#define NV_DRM_FBDEV_AVAILABLE
6972
#define NV_DRM_CLIENT_AVAILABLE
7073
#endif
74+
#endif
7175

7276
/*
7377
* We can support color management if either drm_helper_crtc_enable_color_mgmt()

kernel-open/nvidia-drm/nvidia-drm-drv.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878

7979
#if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
8080
#include <drm/drm_client_setup.h>
81+
#elif defined(NV_DRM_CLIENTS_DRM_CLIENT_SETUP_H_PRESENT)
82+
#include <drm/clients/drm_client_setup.h>
8183
#endif
8284

8385
#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
@@ -1915,14 +1917,18 @@ static struct drm_driver nv_drm_driver = {
19151917
.name = "nvidia-drm",
19161918

19171919
.desc = "NVIDIA DRM driver",
1920+
1921+
#if defined(NV_DRM_DRIVER_HAS_DATE)
19181922
.date = "20160202",
1923+
#endif
19191924

19201925
#if defined(NV_DRM_DRIVER_HAS_DEVICE_LIST)
19211926
.device_list = LIST_HEAD_INIT(nv_drm_driver.device_list),
19221927
#elif defined(NV_DRM_DRIVER_HAS_LEGACY_DEV_LIST)
19231928
.legacy_dev_list = LIST_HEAD_INIT(nv_drm_driver.legacy_dev_list),
19241929
#endif
1925-
#if defined(DRM_FBDEV_TTM_DRIVER_OPS)
1930+
// XXX implement nvidia-drm's own .fbdev_probe callback that uses NVKMS kapi directly
1931+
#if defined(NV_DRM_FBDEV_AVAILABLE) && defined(DRM_FBDEV_TTM_DRIVER_OPS)
19261932
DRM_FBDEV_TTM_DRIVER_OPS,
19271933
#endif
19281934
};

kernel-open/nvidia-drm/nvidia-drm-sources.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,5 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_color_lut
143143
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_property_blob_put
144144
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_gem_prime_mmap
145145
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_output_poll_changed
146+
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_date
146147
NV_CONFTEST_TYPE_COMPILE_TESTS += file_operations_fop_unsigned_offset_present

kernel-open/nvidia-modeset/nvidia-modeset-linux.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,11 @@ nvkms_register_backlight(NvU32 gpu_id, NvU32 display_id, void *drv_priv,
10501050

10511051
#if defined(NV_ACPI_VIDEO_BACKLIGHT_USE_NATIVE)
10521052
if (!acpi_video_backlight_use_native()) {
1053+
#if defined(NV_ACPI_VIDEO_REGISTER_BACKLIGHT)
1054+
nvkms_log(NVKMS_LOG_LEVEL_INFO, NVKMS_LOG_PREFIX,
1055+
"ACPI reported no NVIDIA native backlight available; attempting to use ACPI backlight.");
1056+
acpi_video_register_backlight();
1057+
#endif
10531058
return NULL;
10541059
}
10551060
#endif

kernel-open/nvidia-modeset/nvidia-modeset.Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,5 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += list_is_first
102102
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ktime_get_real_ts64
103103
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ktime_get_raw_ts64
104104
NV_CONFTEST_FUNCTION_COMPILE_TESTS += acpi_video_backlight_use_native
105+
NV_CONFTEST_FUNCTION_COMPILE_TESTS += acpi_video_register_backlight
105106
NV_CONFTEST_FUNCTION_COMPILE_TESTS += kernel_read_has_pointer_pos_arg

kernel-open/nvidia-uvm/uvm_ats_faults.c

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/nodemask.h>
3030
#include <linux/mempolicy.h>
3131
#include <linux/mmu_notifier.h>
32+
#include <linux/topology.h>
3233

3334
#if UVM_HMM_RANGE_FAULT_SUPPORTED()
3435
#include <linux/hmm.h>
@@ -291,6 +292,27 @@ static const struct mmu_interval_notifier_ops uvm_ats_notifier_ops =
291292

292293
#endif
293294

295+
static bool resident_policy_match(struct vm_area_struct *vma, int dst_nid, int src_nid)
296+
{
297+
#if defined(NV_MEMPOLICY_HAS_UNIFIED_NODES)
298+
struct mempolicy *vma_policy = vma_policy(vma);
299+
300+
// TODO: Bug 4981209: When migrations between CPU numa nodes are supported,
301+
// add (dst_nid != closest_cpu_numa_node) to allow migrations between CPU
302+
// NUMA nodes when destination is the closest_cpu_numa_node.
303+
if (vma_policy &&
304+
node_isset(src_nid, vma_policy->nodes) &&
305+
node_isset(dst_nid, vma_policy->nodes) &&
306+
!cpumask_empty(cpumask_of_node(src_nid)) &&
307+
!cpumask_empty(cpumask_of_node(dst_nid))) {
308+
309+
return true;
310+
}
311+
#endif
312+
313+
return false;
314+
}
315+
294316
static NV_STATUS ats_compute_residency_mask(uvm_gpu_va_space_t *gpu_va_space,
295317
struct vm_area_struct *vma,
296318
NvU64 base,
@@ -370,9 +392,23 @@ static NV_STATUS ats_compute_residency_mask(uvm_gpu_va_space_t *gpu_va_space,
370392

371393
if (pfn & HMM_PFN_VALID) {
372394
struct page *page = hmm_pfn_to_page(pfn);
373-
374-
if (page_to_nid(page) == ats_context->residency_node)
395+
int resident_node = page_to_nid(page);
396+
397+
// Set the residency_mask if:
398+
// - The page is already resident at the intended destination.
399+
// or
400+
// - If both the source and destination nodes are CPU nodes and
401+
// source node is already in the list of preferred nodes for
402+
// the vma. On multi-CPU NUMA node architectures, this avoids
403+
// unnecessary migrations between CPU nodes. Since the
404+
// specific ats_context->residency_node selected by
405+
// ats_batch_select_residency() is just a guess among the list
406+
// of preferred nodes, paying the cost of migration across the
407+
// CPU preferred nodes in this case can't be justified.
408+
if ((resident_node == ats_context->residency_node) ||
409+
resident_policy_match(vma, ats_context->residency_node, resident_node)) {
375410
uvm_page_mask_set(residency_mask, page_index);
411+
}
376412

377413
ats_context->prefetch_state.first_touch = false;
378414
}

kernel-open/nvidia-uvm/uvm_global.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
Copyright (c) 2015-2024 NVIDIA Corporation
2+
Copyright (c) 2015-2025 NVIDIA Corporation
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to
@@ -35,6 +35,7 @@
3535
#include "uvm_mmu.h"
3636
#include "uvm_perf_heuristics.h"
3737
#include "uvm_pmm_sysmem.h"
38+
#include "uvm_pmm_gpu.h"
3839
#include "uvm_migrate.h"
3940
#include "uvm_gpu_access_counters.h"
4041
#include "uvm_va_space_mm.h"
@@ -90,6 +91,8 @@ NV_STATUS uvm_global_init(void)
9091
uvm_spin_lock_irqsave_init(&g_uvm_global.gpu_table_lock, UVM_LOCK_ORDER_LEAF);
9192
uvm_mutex_init(&g_uvm_global.va_spaces.lock, UVM_LOCK_ORDER_VA_SPACES_LIST);
9293
INIT_LIST_HEAD(&g_uvm_global.va_spaces.list);
94+
uvm_mutex_init(&g_uvm_global.devmem_ranges.lock, UVM_LOCK_ORDER_LEAF);
95+
INIT_LIST_HEAD(&g_uvm_global.devmem_ranges.list);
9396

9497
status = uvm_kvmalloc_init();
9598
if (status != NV_OK) {
@@ -231,6 +234,7 @@ void uvm_global_exit(void)
231234
uvm_va_policy_exit();
232235
uvm_mem_global_exit();
233236
uvm_pmm_sysmem_exit();
237+
uvm_pmm_devmem_exit();
234238
uvm_gpu_exit();
235239
uvm_processor_mask_cache_exit();
236240

kernel-open/nvidia-uvm/uvm_global.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
Copyright (c) 2015-2024 NVIDIA Corporation
2+
Copyright (c) 2015-2025 NVIDIA Corporation
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to
@@ -157,6 +157,12 @@ struct uvm_global_struct
157157
// This field is set once during global initialization (uvm_global_init),
158158
// and can be read afterwards without acquiring any locks.
159159
bool conf_computing_enabled;
160+
161+
// List of all devmem ranges allocted on this GPU
162+
struct {
163+
uvm_mutex_t lock;
164+
struct list_head list;
165+
} devmem_ranges;
160166
};
161167

162168
// Initialize global uvm state

0 commit comments

Comments
 (0)