Skip to content

Commit 4b30f4c

Browse files
committed
570.169
1 parent d5cb404 commit 4b30f4c

File tree

73 files changed

+50480
-50010
lines changed

Some content is hidden

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

73 files changed

+50480
-50010
lines changed

README.md

Lines changed: 20 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.153.02.
4+
version 570.169.
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.153.02 driver release. This can be achieved by installing
20+
570.169 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.153.02/README/kernel_open.html
188+
https://us.download.nvidia.com/XFree86/Linux-x86_64/570.169/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.
@@ -966,11 +966,28 @@ Subsystem Device ID.
966966
| NVIDIA GeForce RTX 5070 Ti | 2C05 |
967967
| NVIDIA GeForce RTX 5090 Laptop GPU | 2C18 |
968968
| NVIDIA GeForce RTX 5080 Laptop GPU | 2C19 |
969+
| NVIDIA RTX PRO 4500 Blackwell | 2C31 1028 2051 |
970+
| NVIDIA RTX PRO 4500 Blackwell | 2C31 103C 2051 |
971+
| NVIDIA RTX PRO 4500 Blackwell | 2C31 10DE 2051 |
972+
| NVIDIA RTX PRO 4500 Blackwell | 2C31 17AA 2051 |
973+
| NVIDIA RTX PRO 4000 Blackwell | 2C34 1028 2052 |
974+
| NVIDIA RTX PRO 4000 Blackwell | 2C34 103C 2052 |
975+
| NVIDIA RTX PRO 4000 Blackwell | 2C34 10DE 2052 |
976+
| NVIDIA RTX PRO 4000 Blackwell | 2C34 17AA 2052 |
977+
| NVIDIA RTX PRO 5000 Blackwell Generation Laptop GPU | 2C38 |
978+
| NVIDIA RTX PRO 4000 Blackwell Generation Laptop GPU | 2C39 |
969979
| NVIDIA GeForce RTX 5090 Laptop GPU | 2C58 |
970980
| NVIDIA GeForce RTX 5080 Laptop GPU | 2C59 |
971981
| NVIDIA GeForce RTX 5060 Ti | 2D04 |
982+
| NVIDIA GeForce RTX 5060 | 2D05 |
972983
| NVIDIA GeForce RTX 5070 Laptop GPU | 2D18 |
984+
| NVIDIA GeForce RTX 5060 Laptop GPU | 2D19 |
985+
| NVIDIA RTX PRO 2000 Blackwell Generation Laptop GPU | 2D39 |
973986
| NVIDIA GeForce RTX 5070 Laptop GPU | 2D58 |
987+
| NVIDIA GeForce RTX 5060 Laptop GPU | 2D59 |
988+
| NVIDIA RTX PRO 1000 Blackwell Generation Laptop GPU | 2DB8 |
989+
| NVIDIA RTX PRO 500 Blackwell Generation Laptop GPU | 2DB9 |
974990
| NVIDIA GeForce RTX 5070 | 2F04 |
975991
| NVIDIA GeForce RTX 5070 Ti Laptop GPU | 2F18 |
992+
| NVIDIA RTX PRO 3000 Blackwell Generation Laptop GPU | 2F38 |
976993
| NVIDIA GeForce RTX 5070 Ti Laptop GPU | 2F58 |

kernel-open/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ccflags-y += -I$(src)/common/inc
7979
ccflags-y += -I$(src)
8080
ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
8181
ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
82-
ccflags-y += -DNV_VERSION_STRING=\"570.153.02\"
82+
ccflags-y += -DNV_VERSION_STRING=\"570.169\"
8383

8484
ifneq ($(SYSSRCHOST1X),)
8585
ccflags-y += -I$(SYSSRCHOST1X)

kernel-open/common/inc/nv-mm.h

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2016-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2016-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
@@ -297,9 +297,21 @@ static inline struct rw_semaphore *nv_mmap_get_lock(struct mm_struct *mm)
297297
#endif
298298
}
299299

300+
#define NV_CAN_CALL_VMA_START_WRITE 1
301+
302+
#if !NV_CAN_CALL_VMA_START_WRITE
303+
/*
304+
* Commit 45ad9f5290dc updated vma_start_write() to call __vma_start_write().
305+
*/
306+
void nv_vma_start_write(struct vm_area_struct *);
307+
#endif
308+
300309
static inline void nv_vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
301310
{
302-
#if defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
311+
#if !NV_CAN_CALL_VMA_START_WRITE
312+
nv_vma_start_write(vma);
313+
ACCESS_PRIVATE(vma, __vm_flags) |= flags;
314+
#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
303315
vm_flags_set(vma, flags);
304316
#else
305317
vma->vm_flags |= flags;
@@ -308,7 +320,10 @@ static inline void nv_vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
308320

309321
static inline void nv_vm_flags_clear(struct vm_area_struct *vma, vm_flags_t flags)
310322
{
311-
#if defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
323+
#if !NV_CAN_CALL_VMA_START_WRITE
324+
nv_vma_start_write(vma);
325+
ACCESS_PRIVATE(vma, __vm_flags) &= ~flags;
326+
#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
312327
vm_flags_clear(vma, flags);
313328
#else
314329
vma->vm_flags &= ~flags;

kernel-open/conftest.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6602,22 +6602,22 @@ compile_test() {
66026602
compile_check_conftest "$CODE" "NV_DRM_DRIVER_HAS_DUMB_DESTROY" "" "types"
66036603
;;
66046604

6605-
memory_failure_has_trapno_arg)
6605+
memory_failure_queue_has_trapno_arg)
66066606
#
6607-
# Check if memory_failure() has trapno parameter.
6607+
# Check if memory_failure_queue() has trapno parameter.
66086608
#
66096609
# Removed by commit 83b57531c58f ("mm/memory_failure: Remove
66106610
# unused trapno from memory_failure") in v4.16.
66116611
#
66126612
CODE="
66136613
#include <linux/mm.h>
6614-
void conftest_memory_failure_has_trapno_arg(unsigned long pfn,
6614+
void conftest_memory_failure_queue_has_trapno_arg(unsigned long pfn,
66156615
int trapno,
66166616
int flags) {
6617-
(void) memory_failure(pfn, trapno, flags);
6617+
memory_failure_queue(pfn, trapno, flags);
66186618
}"
66196619

6620-
compile_check_conftest "$CODE" "NV_MEMORY_FAILURE_HAS_TRAPNO_ARG" "" "types"
6620+
compile_check_conftest "$CODE" "NV_MEMORY_FAILURE_QUEUE_HAS_TRAPNO_ARG" "" "types"
66216621
;;
66226622

66236623
memory_failure_mf_sw_simulated_defined)
@@ -7571,7 +7571,7 @@ compile_test() {
75717571
CODE="
75727572
#include <linux/mmzone.h>
75737573
int conftest_page_pgmap(void) {
7574-
return page_pgmap(NULL);
7574+
return page_pgmap();
75757575
}"
75767576

75777577
compile_check_conftest "$CODE" "NV_PAGE_PGMAP_PRESENT" "" "functions"

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@
6262
#undef NV_DRM_FENCE_AVAILABLE
6363
#endif
6464

65+
#if defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) && \
66+
defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT)
67+
#define NV_DRM_FBDEV_AVAILABLE
68+
#define NV_DRM_FBDEV_GENERIC_AVAILABLE
69+
#endif
70+
71+
#if defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT) && \
72+
defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT)
73+
#if IS_ENABLED(CONFIG_DRM_TTM_HELPER)
74+
#define NV_DRM_FBDEV_AVAILABLE
75+
#define NV_DRM_FBDEV_TTM_AVAILABLE
76+
#endif
77+
#endif
78+
6579
#if defined(NV_DRM_CLIENT_SETUP_PRESENT) && \
6680
(defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) || \
6781
defined(NV_APERTURE_REMOVE_CONFLICTING_PCI_DEVICES_PRESENT))

kernel-open/nvidia-drm/nvidia-drm-os-interface.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ typedef struct nv_timer nv_drm_timer;
5858
#error "Need to define kernel timer callback primitives for this OS"
5959
#endif
6060

61-
#if defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT)
62-
#define NV_DRM_FBDEV_AVAILABLE
63-
#define NV_DRM_FBDEV_GENERIC_AVAILABLE
64-
#endif
65-
66-
#if defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT)
67-
#define NV_DRM_FBDEV_AVAILABLE
68-
#define NV_DRM_FBDEV_TTM_AVAILABLE
69-
#endif
70-
7161
struct page;
7262

7363
/* Set to true when the atomic modeset feature is enabled. */

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ NV_CONFTEST_GENERIC_COMPILE_TESTS += drm_alpha_blending_available
3838
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_fd_to_handle
3939
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_handle_to_fd
4040
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_timer_delete_sync
41+
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_gpl___vma_start_write
4142

4243
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_dev_unref
4344
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_reinit_primary_mode_group

kernel-open/nvidia-uvm/uvm_ats_faults.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,20 @@ NV_STATUS uvm_ats_service_access_counters(uvm_gpu_va_space_t *gpu_va_space,
767767
&ats_context->access_counters.accessed_mask,
768768
&ats_context->prefetch_state.residency_mask);
769769

770+
// Pretend that pages that are already resident at the destination GPU were
771+
// migrated now. This makes sure that the access counter is cleared even if
772+
// the accessed pages, were already resident on the target.
773+
// TODO: Bug 5296998: [uvm][ats] Not clearing stale access counter
774+
// notifications can lead to missed migrations
775+
// The same problem of stale notification exists for migration to other
776+
// locations than local vidmem. However, stale notifications to data
777+
// migrated to another remote location are identical to those triggered
778+
// by accessing memory that cannot or should not be migrated.
779+
if (uvm_id_equal(ats_context->residency_id, gpu_va_space->gpu->id)) {
780+
uvm_page_mask_copy(&ats_context->access_counters.migrated_mask,
781+
&ats_context->prefetch_state.residency_mask);
782+
}
783+
770784
for_each_va_block_subregion_in_mask(subregion, &ats_context->access_counters.accessed_mask, region) {
771785
NV_STATUS status;
772786
NvU64 start = base + (subregion.first * PAGE_SIZE);
@@ -779,7 +793,7 @@ NV_STATUS uvm_ats_service_access_counters(uvm_gpu_va_space_t *gpu_va_space,
779793

780794
status = service_ats_requests(gpu_va_space, vma, start, length, access_type, service_type, ats_context);
781795

782-
// clear access counters if pages were migrated or migration needs to
796+
// Clear access counters if pages were migrated or migration needs to
783797
// be retried
784798
if (status == NV_OK || status == NV_ERR_BUSY_RETRY)
785799
uvm_page_mask_region_fill(migrated_mask, subregion);

kernel-open/nvidia-uvm/uvm_ats_sva.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,13 @@ void uvm_ats_smmu_invalidate_tlbs(uvm_gpu_va_space_t *gpu_va_space, NvU64 addr,
308308

309309
NV_STATUS uvm_ats_sva_add_gpu(uvm_parent_gpu_t *parent_gpu)
310310
{
311+
#if NV_IS_EXPORT_SYMBOL_GPL_iommu_dev_enable_feature
311312
int ret;
312313

313314
ret = iommu_dev_enable_feature(&parent_gpu->pci_dev->dev, IOMMU_DEV_FEAT_SVA);
314315
if (ret)
315316
return errno_to_nv_status(ret);
316-
317+
#endif
317318
if (UVM_ATS_SMMU_WAR_REQUIRED())
318319
return uvm_ats_smmu_war_init(parent_gpu);
319320
else
@@ -325,7 +326,9 @@ void uvm_ats_sva_remove_gpu(uvm_parent_gpu_t *parent_gpu)
325326
if (UVM_ATS_SMMU_WAR_REQUIRED())
326327
uvm_ats_smmu_war_deinit(parent_gpu);
327328

329+
#if NV_IS_EXPORT_SYMBOL_GPL_iommu_dev_disable_feature
328330
iommu_dev_disable_feature(&parent_gpu->pci_dev->dev, IOMMU_DEV_FEAT_SVA);
331+
#endif
329332
}
330333

331334
NV_STATUS uvm_ats_sva_bind_gpu(uvm_gpu_va_space_t *gpu_va_space)

kernel-open/nvidia/nv-caps.c

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2019-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
@@ -582,6 +582,9 @@ int NV_API_CALL nv_cap_validate_and_dup_fd(const nv_cap_t *cap, int fd)
582582
void NV_API_CALL nv_cap_close_fd(int fd)
583583
{
584584
#if NV_FILESYSTEM_ACCESS_AVAILABLE
585+
struct file *file;
586+
NvBool is_nv_cap_fd;
587+
585588
if (fd == -1)
586589
{
587590
return;
@@ -600,6 +603,30 @@ void NV_API_CALL nv_cap_close_fd(int fd)
600603
return;
601604
}
602605

606+
file = fget(fd);
607+
if (file == NULL)
608+
{
609+
task_unlock(current);
610+
return;
611+
}
612+
613+
/* Make sure the fd belongs to the nv-cap-drv */
614+
is_nv_cap_fd = (file->f_op == &g_nv_cap_drv_fops);
615+
616+
fput(file);
617+
618+
/*
619+
* In some cases, we may be in shutdown path and execute
620+
* in context of unrelated process. In that case we should
621+
* not access any 'current' state, but instead let kernel
622+
* clean up capability files on its own.
623+
*/
624+
if (!is_nv_cap_fd)
625+
{
626+
task_unlock(current);
627+
return;
628+
}
629+
603630
/*
604631
* From v4.17-rc1 (to v5.10.8) kernels have stopped exporting sys_close(fd)
605632
* and started exporting __close_fd, as of this commit:

0 commit comments

Comments
 (0)