Skip to content

Commit 4dbb564

Browse files
committed
580.159.03
1 parent 1a5075f commit 4dbb564

64 files changed

Lines changed: 214040 additions & 213113 deletions

File tree

Some content is hidden

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

README.md

Lines changed: 3 additions & 5 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 580.142.
4+
version 580.159.03.
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-
580.142 driver release. This can be achieved by installing
20+
580.159.03 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/580.142/README/kernel_open.html
188+
https://us.download.nvidia.com/XFree86/Linux-x86_64/580.159.03/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.
@@ -974,7 +974,6 @@ Subsystem Device ID.
974974
| NVIDIA RTX PRO 6000 Blackwell Server Edition | 2BB5 10DE 204E |
975975
| NVIDIA RTX PRO 6000 Blackwell Server Edition | 2BB5 10DE 220B |
976976
| NVIDIA RTX 6000D | 2BB9 10DE 2091 |
977-
| NVIDIA RTX 6000D | 2BB9 10DE 2092 |
978977
| NVIDIA GeForce RTX 5080 | 2C02 |
979978
| NVIDIA GeForce RTX 5070 Ti | 2C05 |
980979
| NVIDIA GeForce RTX 5090 Laptop GPU | 2C18 |
@@ -993,7 +992,6 @@ Subsystem Device ID.
993992
| NVIDIA RTX PRO 4000 Blackwell | 2C34 17AA 2052 |
994993
| NVIDIA RTX PRO 5000 Blackwell Generation Laptop GPU | 2C38 |
995994
| NVIDIA RTX PRO 4000 Blackwell Generation Laptop GPU | 2C39 |
996-
| NVIDIA RTX PRO 4500 Blackwell Server Edition | 2C3A 10DE 21F4 |
997995
| NVIDIA GeForce RTX 5090 Laptop GPU | 2C58 |
998996
| NVIDIA GeForce RTX 5080 Laptop GPU | 2C59 |
999997
| NVIDIA RTX PRO 5000 Blackwell Embedded GPU | 2C77 |

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=\"580.142\"
82+
ccflags-y += -DNV_VERSION_STRING=\"580.159.03\"
8383

8484
# Include and link Tegra out-of-tree modules.
8585
ifneq ($(wildcard /usr/src/nvidia/nvidia-oot),)

kernel-open/Makefile

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,31 +71,6 @@ else
7171
CC ?= cc
7272
LD ?= ld
7373
OBJDUMP ?= objdump
74-
AWK ?= awk
75-
# Bake the following awk program in a string. The program is needed to add C++
76-
# to the languages excluded from BTF generation.
77-
#
78-
# Also, unconditionally return success (0) from the awk program, rather than
79-
# propagating pahole's return status (with 'exit system(pahole_cmd)'), to
80-
# workaround an DW_TAG_rvalue_reference_type error in
81-
# kernel/nvidia-modeset.ko.
82-
#
83-
# BEGIN {
84-
# pahole_cmd = "pahole"
85-
# for (i = 1; i < ARGC; i++) {
86-
# if (ARGV[i] ~ /--lang_exclude=/) {
87-
# pahole_cmd = pahole_cmd sprintf(" %s,c++", ARGV[i])
88-
# } else {
89-
# pahole_cmd = pahole_cmd sprintf(" %s", ARGV[i])
90-
# }
91-
# }
92-
# system(pahole_cmd)
93-
# }
94-
PAHOLE_AWK_PROGRAM = BEGIN { pahole_cmd = \"pahole\"; for (i = 1; i < ARGC; i++) { if (ARGV[i] ~ /--lang_exclude=/) { pahole_cmd = pahole_cmd sprintf(\" %s,c++\", ARGV[i]); } else { pahole_cmd = pahole_cmd sprintf(\" %s\", ARGV[i]); } } system(pahole_cmd); }
95-
# If scripts/pahole-flags.sh is not present in the kernel tree, add PAHOLE and
96-
# PAHOLE_AWK_PROGRAM assignments to PAHOLE_VARIABLES; otherwise assign the
97-
# empty string to PAHOLE_VARIABLES.
98-
PAHOLE_VARIABLES=$(if $(wildcard $(KERNEL_SOURCES)/scripts/pahole-flags.sh),,"PAHOLE=$(AWK) '$(PAHOLE_AWK_PROGRAM)'")
9974

10075
ifndef ARCH
10176
ARCH := $(shell uname -m | sed -e 's/i.86/i386/' \
@@ -133,10 +108,12 @@ else
133108
KBUILD_PARAMS += INSTALL_MOD_DIR="$(INSTALL_MOD_DIR)"
134109
KBUILD_PARAMS += NV_SPECTRE_V2=$(SPECTRE_V2_RETPOLINE)
135110

111+
export ORIG_PAHOLE := $(PAHOLE)
112+
136113
.PHONY: modules module clean clean_conftest modules_install
137114
modules clean modules_install:
138115
@$(MAKE) "LD=$(LD)" "CC=$(CC)" "OBJDUMP=$(OBJDUMP)" \
139-
$(PAHOLE_VARIABLES) $(KBUILD_PARAMS) $@
116+
PAHOLE=$(CURDIR)/pahole.sh $(KBUILD_PARAMS) $@
140117
@if [ "$@" = "modules" ]; then \
141118
for module in $(NV_KERNEL_MODULES); do \
142119
if [ -x split-object-file.sh ]; then \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ module_exit(nv_linux_drm_exit);
6464

6565
MODULE_INFO(supported, "external");
6666
MODULE_VERSION(NV_VERSION_STRING);
67+
MODULE_DESCRIPTION("NVIDIA DRM kernel module");

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,3 +2221,4 @@ module_exit(nvkms_exit);
22212221

22222222
MODULE_INFO(supported, "external");
22232223
MODULE_VERSION(NV_VERSION_STRING);
2224+
MODULE_DESCRIPTION("NVIDIA modeset kernel module");

kernel-open/nvidia-uvm/uvm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,3 +1232,4 @@ module_exit(uvm_exit_entry);
12321232
MODULE_LICENSE("Dual MIT/GPL");
12331233
MODULE_INFO(supported, "external");
12341234
MODULE_VERSION(NV_VERSION_STRING);
1235+
MODULE_DESCRIPTION("NVIDIA Unified Virtual Memory kernel module");

kernel-open/nvidia-uvm/uvm_hmm.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,31 @@ uvm_va_block_region_t uvm_hmm_get_prefetch_region(uvm_va_block_t *va_block,
15831583
return uvm_va_block_region_from_start_end(va_block, start, end);
15841584
}
15851585

1586+
uvm_prot_t uvm_hmm_compute_mapping_prot(uvm_va_block_t *va_block,
1587+
uvm_processor_id_t processor_id,
1588+
uvm_page_index_t page_index)
1589+
{
1590+
if (!uvm_processor_mask_test(&va_block->mapped, UVM_ID_CPU))
1591+
return UVM_PROT_NONE;
1592+
1593+
if (uvm_page_mask_test(&va_block->cpu.pte_bits[UVM_PTE_BITS_CPU_WRITE], page_index)) {
1594+
if (uvm_processor_mask_test(&va_block->hmm.va_space->has_native_atomics[uvm_id_value(UVM_ID_CPU)],
1595+
processor_id))
1596+
// If the CPU has write access it also has atomic access, so it's
1597+
// fine for any GPU with HW support to do atomic accesses.
1598+
return UVM_PROT_READ_WRITE_ATOMIC;
1599+
else
1600+
// Otherwise the GPU needs to fault on atomic access to ensure the
1601+
// CPU is unmapped.
1602+
return UVM_PROT_READ_WRITE;
1603+
}
1604+
1605+
if (uvm_page_mask_test(&va_block->cpu.pte_bits[UVM_PTE_BITS_CPU_READ], page_index))
1606+
return UVM_PROT_READ_ONLY;
1607+
1608+
return UVM_PROT_NONE;
1609+
}
1610+
15861611
uvm_prot_t uvm_hmm_compute_logical_prot(uvm_va_block_t *va_block,
15871612
struct vm_area_struct *vma,
15881613
NvU64 addr)

kernel-open/nvidia-uvm/uvm_hmm.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,14 @@ typedef struct
258258
const uvm_va_policy_t *policy,
259259
NvU64 address);
260260

261+
// Return the actual permissions allowed when mapping a page within a
262+
// va_block on the given processor_id. This may differ from the logical
263+
// permission if for example the kernel has the CPU pages mapped read-only
264+
// to do copy-on-write.
265+
uvm_prot_t uvm_hmm_compute_mapping_prot(uvm_va_block_t *va_block,
266+
uvm_processor_id_t processor_id,
267+
uvm_page_index_t page_index);
268+
261269
// Return the logical protection allowed of a HMM va_block for the page at
262270
// the given address within the vma which must be valid. This is usually
263271
// obtained from uvm_hmm_va_block_find_create()).
@@ -561,6 +569,13 @@ typedef struct
561569
return (uvm_va_block_region_t){};
562570
}
563571

572+
static uvm_prot_t uvm_hmm_compute_mapping_prot(uvm_va_block_t *va_block,
573+
uvm_processor_id_t processor_id,
574+
uvm_page_index_t page_index)
575+
{
576+
return UVM_PROT_NONE;
577+
}
578+
564579
static uvm_prot_t uvm_hmm_compute_logical_prot(uvm_va_block_t *va_block,
565580
struct vm_area_struct *vma,
566581
NvU64 addr)

kernel-open/nvidia-uvm/uvm_va_block.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11374,6 +11374,13 @@ uvm_prot_t uvm_va_block_page_compute_highest_permission(uvm_va_block_t *va_block
1137411374
uvm_processor_mask_t *resident_processors = &va_block_context->scratch_processor_mask;
1137511375
NvU32 resident_processors_count;
1137611376

11377+
// TODO: Bug 5841902
11378+
// There are several calls to uvm_va_block_is_hmm() which need to be removed
11379+
if (uvm_va_block_is_hmm(va_block))
11380+
return uvm_hmm_compute_mapping_prot(va_block,
11381+
processor_id,
11382+
page_index);
11383+
1137711384
if (uvm_processor_mask_test(block_get_uvm_lite_gpus(va_block), processor_id))
1137811385
return UVM_PROT_READ_WRITE_ATOMIC;
1137911386

kernel-open/nvidia-uvm/uvm_va_range.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -947,8 +947,12 @@ void uvm_va_range_remove_gpu_va_space(uvm_va_range_t *va_range,
947947
gpu_va_space->gpu);
948948
break;
949949
case UVM_VA_RANGE_TYPE_DEVICE_P2P:
950-
unmap_mapping_range(va_range->va_space->mapping, va_range->node.start, uvm_va_range_size(va_range), 1);
951-
uvm_va_range_deinit_device_p2p(uvm_va_range_to_device_p2p(va_range), deferred_free_list);
950+
// Device P2P ranges are associated with a specific GPU so destroy
951+
// the range entirely if unregistering the associated GPU.
952+
if (uvm_va_range_to_device_p2p(va_range)->gpu == gpu_va_space->gpu) {
953+
unmap_mapping_range(va_range->va_space->mapping, va_range->node.start, uvm_va_range_size(va_range), 1);
954+
uvm_va_range_deinit_device_p2p(uvm_va_range_to_device_p2p(va_range), deferred_free_list);
955+
}
952956
break;
953957
default:
954958
UVM_ASSERT_MSG(0, "[0x%llx, 0x%llx] has type %d\n",
@@ -1223,9 +1227,10 @@ void uvm_va_range_unregister_gpu(uvm_va_range_t *va_range,
12231227
va_range_unregister_gpu_semaphore_pool(uvm_va_range_to_semaphore_pool(va_range), gpu);
12241228
break;
12251229
case UVM_VA_RANGE_TYPE_DEVICE_P2P:
1226-
// All ranges should have been deinited by GPU VA space unregister,
1227-
// which should have already happened.
1228-
UVM_ASSERT(!uvm_va_range_to_device_p2p(va_range)->p2p_mem);
1230+
// All ranges for this GPU should have been deinited by GPU VA space
1231+
// unregister, which should have already happened.
1232+
if (uvm_va_range_to_device_p2p(va_range)->p2p_mem != NULL)
1233+
UVM_ASSERT(uvm_va_range_to_device_p2p(va_range)->gpu != gpu);
12291234
break;
12301235
default:
12311236
UVM_ASSERT_MSG(0, "[0x%llx, 0x%llx] has type %d\n",

0 commit comments

Comments
 (0)