Skip to content

Commit f59818b

Browse files
committed
535.113.01
1 parent a8e01be commit f59818b

File tree

94 files changed

+2405
-791
lines changed

Some content is hidden

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

94 files changed

+2405
-791
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Release 535 Entries
44

5+
### [535.113.01] 2023-09-21
6+
7+
#### Fixed
8+
9+
- Fixed building main against current centos stream 8 fails, [#550](https://github.com/NVIDIA/open-gpu-kernel-modules/issues/550) by @airlied
10+
511
### [535.104.05] 2023-08-22
612

713
### [535.98] 2023-08-08

README.md

Lines changed: 8 additions & 4 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 535.104.05.
4+
version 535.113.01.
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-
535.104.05 driver release. This can be achieved by installing
20+
535.113.01 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

@@ -180,15 +180,15 @@ software applications.
180180
## Compatible GPUs
181181

182182
The open-gpu-kernel-modules can be used on any Turing or later GPU
183-
(see the table below). However, in the 535.104.05 release,
183+
(see the table below). However, in the 535.113.01 release,
184184
GeForce and Workstation support is still considered alpha-quality.
185185

186186
To enable use of the open kernel modules on GeForce and Workstation GPUs,
187187
set the "NVreg_OpenRmEnableUnsupportedGpus" nvidia.ko kernel module
188188
parameter to 1. For more details, see the NVIDIA GPU driver end user
189189
README here:
190190

191-
https://us.download.nvidia.com/XFree86/Linux-x86_64/535.104.05/README/kernel_open.html
191+
https://us.download.nvidia.com/XFree86/Linux-x86_64/535.113.01/README/kernel_open.html
192192

193193
In the below table, if three IDs are listed, the first is the PCI Device
194194
ID, the second is the PCI Subsystem Vendor ID, and the third is the PCI
@@ -856,6 +856,10 @@ Subsystem Device ID.
856856
| NVIDIA RTX 4000 SFF Ada Generation | 27B0 103C 16FA |
857857
| NVIDIA RTX 4000 SFF Ada Generation | 27B0 10DE 16FA |
858858
| NVIDIA RTX 4000 SFF Ada Generation | 27B0 17AA 16FA |
859+
| NVIDIA RTX 4500 Ada Generation | 27B1 1028 180C |
860+
| NVIDIA RTX 4500 Ada Generation | 27B1 103C 180C |
861+
| NVIDIA RTX 4500 Ada Generation | 27B1 10DE 180C |
862+
| NVIDIA RTX 4500 Ada Generation | 27B1 17AA 180C |
859863
| NVIDIA RTX 4000 Ada Generation | 27B2 1028 181B |
860864
| NVIDIA RTX 4000 Ada Generation | 27B2 103C 181B |
861865
| NVIDIA RTX 4000 Ada Generation | 27B2 10DE 181B |

kernel-open/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ EXTRA_CFLAGS += -I$(src)/common/inc
7272
EXTRA_CFLAGS += -I$(src)
7373
EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-error -Wno-format-extra-args
7474
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
75-
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"535.104.05\"
75+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"535.113.01\"
7676

7777
ifneq ($(SYSSRCHOST1X),)
7878
EXTRA_CFLAGS += -I$(SYSSRCHOST1X)

kernel-open/common/inc/os-interface.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,13 @@ enum os_pci_req_atomics_type {
207207
OS_INTF_PCIE_REQ_ATOMICS_128BIT
208208
};
209209
NV_STATUS NV_API_CALL os_enable_pci_req_atomics (void *, enum os_pci_req_atomics_type);
210+
NV_STATUS NV_API_CALL os_get_numa_node_memory_usage (NvS32, NvU64 *, NvU64 *);
210211
NV_STATUS NV_API_CALL os_numa_add_gpu_memory (void *, NvU64, NvU64, NvU32 *);
211212
NV_STATUS NV_API_CALL os_numa_remove_gpu_memory (void *, NvU64, NvU64, NvU32);
212213
NV_STATUS NV_API_CALL os_offline_page_at_address(NvU64 address);
214+
void* NV_API_CALL os_get_pid_info(void);
215+
void NV_API_CALL os_put_pid_info(void *pid_info);
216+
NV_STATUS NV_API_CALL os_find_ns_pid(void *pid_info, NvU32 *ns_pid);
213217

214218
extern NvU32 os_page_size;
215219
extern NvU64 os_page_mask;

kernel-open/conftest.sh

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5636,23 +5636,6 @@ compile_test() {
56365636
compile_check_conftest "$CODE" "NV_GPIO_TO_IRQ_PRESENT" "" "functions"
56375637
;;
56385638

5639-
migrate_vma_setup)
5640-
#
5641-
# Determine if migrate_vma_setup() function is present
5642-
#
5643-
# migrate_vma_setup() function was added by commit
5644-
# a7d1f22bb74f32cf3cd93f52776007e161f1a738 ("mm: turn migrate_vma
5645-
# upside down) in v5.4.
5646-
# (2019-08-20).
5647-
CODE="
5648-
#include <linux/migrate.h>
5649-
int conftest_migrate_vma_setup(void) {
5650-
migrate_vma_setup();
5651-
}"
5652-
5653-
compile_check_conftest "$CODE" "NV_MIGRATE_VMA_SETUP_PRESENT" "" "functions"
5654-
;;
5655-
56565639
migrate_vma_added_flags)
56575640
#
56585641
# Determine if migrate_vma structure has flags
@@ -5743,23 +5726,25 @@ compile_test() {
57435726
compile_check_conftest "$CODE" "NV_IOASID_GET_PRESENT" "" "functions"
57445727
;;
57455728

5746-
mm_pasid_set)
5729+
mm_pasid_drop)
57475730
#
5748-
# Determine if mm_pasid_set() function is present
5731+
# Determine if mm_pasid_drop() function is present
5732+
#
5733+
# Added by commit 701fac40384f ("iommu/sva: Assign a PASID to mm
5734+
# on PASID allocation and free it on mm exit") in v5.18.
5735+
# Moved to linux/iommu.h in commit cd3891158a77 ("iommu/sva: Move
5736+
# PASID helpers to sva code") in v6.4.
57495737
#
5750-
# mm_pasid_set() function was added by commit
5751-
# 701fac40384f07197b106136012804c3cae0b3de (iommu/sva: Assign a
5752-
# PASID to mm on PASID allocation and free it on mm exit) in v5.18.
5753-
# (2022-02-15).
57545738
CODE="
57555739
#if defined(NV_LINUX_SCHED_MM_H_PRESENT)
57565740
#include <linux/sched/mm.h>
57575741
#endif
5758-
void conftest_mm_pasid_set(void) {
5759-
mm_pasid_set();
5742+
#include <linux/iommu.h>
5743+
void conftest_mm_pasid_drop(void) {
5744+
mm_pasid_drop();
57605745
}"
57615746

5762-
compile_check_conftest "$CODE" "NV_MM_PASID_SET_PRESENT" "" "functions"
5747+
compile_check_conftest "$CODE" "NV_MM_PASID_DROP_PRESENT" "" "functions"
57635748
;;
57645749

57655750
drm_crtc_state_has_no_vblank)
@@ -6341,6 +6326,22 @@ compile_test() {
63416326
compile_check_conftest "$CODE" "NV_MEMPOLICY_HAS_HOME_NODE" "" "types"
63426327
;;
63436328

6329+
mpol_preferred_many_present)
6330+
#
6331+
# Determine if MPOL_PREFERRED_MANY enum is present or not
6332+
#
6333+
# Added by commit b27abaccf8e8b ("mm/mempolicy: add
6334+
# MPOL_PREFERRED_MANY for multiple preferred nodes") in
6335+
# v5.15
6336+
#
6337+
CODE="
6338+
#include <linux/mempolicy.h>
6339+
int mpol_preferred_many = MPOL_PREFERRED_MANY;
6340+
"
6341+
6342+
compile_check_conftest "$CODE" "NV_MPOL_PREFERRED_MANY_PRESENT" "" "types"
6343+
;;
6344+
63446345
mmu_interval_notifier)
63456346
#
63466347
# Determine if mmu_interval_notifier struct is present or not

kernel-open/nvidia-uvm/nvidia-uvm.Kbuild

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += set_memory_uc
8181
NV_CONFTEST_FUNCTION_COMPILE_TESTS += set_pages_uc
8282
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ktime_get_raw_ts64
8383
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ioasid_get
84-
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mm_pasid_set
85-
NV_CONFTEST_FUNCTION_COMPILE_TESTS += migrate_vma_setup
84+
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mm_pasid_drop
8685
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mmget_not_zero
8786
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mmgrab
8887
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iommu_sva_bind_device_has_drvdata_arg
@@ -110,6 +109,8 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += handle_mm_fault_has_mm_arg
110109
NV_CONFTEST_TYPE_COMPILE_TESTS += handle_mm_fault_has_pt_regs_arg
111110
NV_CONFTEST_TYPE_COMPILE_TESTS += mempolicy_has_unified_nodes
112111
NV_CONFTEST_TYPE_COMPILE_TESTS += mempolicy_has_home_node
112+
NV_CONFTEST_TYPE_COMPILE_TESTS += mpol_preferred_many_present
113113
NV_CONFTEST_TYPE_COMPILE_TESTS += mmu_interval_notifier
114114

115115
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_int_active_memcg
116+
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_migrate_vma_setup

kernel-open/nvidia-uvm/uvm_ats_faults.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
Copyright (c) 2018 NVIDIA Corporation
2+
Copyright (c) 2023 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
@@ -149,7 +149,11 @@ static void ats_batch_select_residency(uvm_gpu_va_space_t *gpu_va_space,
149149

150150
mode = vma_policy->mode;
151151

152-
if ((mode == MPOL_BIND) || (mode == MPOL_PREFERRED_MANY) || (mode == MPOL_PREFERRED)) {
152+
if ((mode == MPOL_BIND)
153+
#if defined(NV_MPOL_PREFERRED_MANY_PRESENT)
154+
|| (mode == MPOL_PREFERRED_MANY)
155+
#endif
156+
|| (mode == MPOL_PREFERRED)) {
153157
int home_node = NUMA_NO_NODE;
154158

155159
#if defined(NV_MEMPOLICY_HAS_HOME_NODE)
@@ -467,6 +471,10 @@ NV_STATUS uvm_ats_service_faults(uvm_gpu_va_space_t *gpu_va_space,
467471
uvm_page_mask_and(write_fault_mask, write_fault_mask, read_fault_mask);
468472
else
469473
uvm_page_mask_zero(write_fault_mask);
474+
475+
// There are no pending faults beyond write faults to RO region.
476+
if (uvm_page_mask_empty(read_fault_mask))
477+
return status;
470478
}
471479

472480
ats_batch_select_residency(gpu_va_space, vma, ats_context);

kernel-open/nvidia-uvm/uvm_ats_sva.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,23 @@
3232
// For ATS support on aarch64, arm_smmu_sva_bind() is needed for
3333
// iommu_sva_bind_device() calls. Unfortunately, arm_smmu_sva_bind() is not
3434
// conftest-able. We instead look for the presence of ioasid_get() or
35-
// mm_pasid_set(). ioasid_get() was added in the same patch series as
36-
// arm_smmu_sva_bind() and removed in v6.0. mm_pasid_set() was added in the
35+
// mm_pasid_drop(). ioasid_get() was added in the same patch series as
36+
// arm_smmu_sva_bind() and removed in v6.0. mm_pasid_drop() was added in the
3737
// same patch as the removal of ioasid_get(). We assume the presence of
38-
// arm_smmu_sva_bind() if ioasid_get(v5.11 - v5.17) or mm_pasid_set(v5.18+) is
38+
// arm_smmu_sva_bind() if ioasid_get(v5.11 - v5.17) or mm_pasid_drop(v5.18+) is
3939
// present.
4040
//
4141
// arm_smmu_sva_bind() was added with commit
4242
// 32784a9562fb0518b12e9797ee2aec52214adf6f and ioasid_get() was added with
4343
// commit cb4789b0d19ff231ce9f73376a023341300aed96 (11/23/2020). Commit
4444
// 701fac40384f07197b106136012804c3cae0b3de (02/15/2022) removed ioasid_get()
45-
// and added mm_pasid_set().
46-
#if UVM_CAN_USE_MMU_NOTIFIERS() && (defined(NV_IOASID_GET_PRESENT) || defined(NV_MM_PASID_SET_PRESENT))
47-
#define UVM_ATS_SVA_SUPPORTED() 1
45+
// and added mm_pasid_drop().
46+
#if UVM_CAN_USE_MMU_NOTIFIERS() && (defined(NV_IOASID_GET_PRESENT) || defined(NV_MM_PASID_DROP_PRESENT))
47+
#if defined(CONFIG_IOMMU_SVA)
48+
#define UVM_ATS_SVA_SUPPORTED() 1
49+
#else
50+
#define UVM_ATS_SVA_SUPPORTED() 0
51+
#endif
4852
#else
4953
#define UVM_ATS_SVA_SUPPORTED() 0
5054
#endif

kernel-open/nvidia-uvm/uvm_ce_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static NV_STATUS test_membar(uvm_gpu_t *gpu)
191191

192192
for (i = 0; i < REDUCTIONS; ++i) {
193193
uvm_push_set_flag(&push, UVM_PUSH_FLAG_NEXT_MEMBAR_NONE);
194-
gpu->parent->ce_hal->semaphore_reduction_inc(&push, host_mem_gpu_va, REDUCTIONS + 1);
194+
gpu->parent->ce_hal->semaphore_reduction_inc(&push, host_mem_gpu_va, REDUCTIONS);
195195
}
196196

197197
// Without a sys membar the channel tracking semaphore can and does complete
@@ -577,7 +577,7 @@ static NV_STATUS test_semaphore_reduction_inc(uvm_gpu_t *gpu)
577577

578578
for (i = 0; i < REDUCTIONS; i++) {
579579
uvm_push_set_flag(&push, UVM_PUSH_FLAG_NEXT_MEMBAR_NONE);
580-
gpu->parent->ce_hal->semaphore_reduction_inc(&push, gpu_va, i+1);
580+
gpu->parent->ce_hal->semaphore_reduction_inc(&push, gpu_va, REDUCTIONS);
581581
}
582582

583583
status = uvm_push_end_and_wait(&push);

0 commit comments

Comments
 (0)