Skip to content

Commit 18b7303

Browse files
committed
535.43.08
1 parent eb5c766 commit 18b7303

File tree

378 files changed

+124046
-161952
lines changed

Some content is hidden

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

378 files changed

+124046
-161952
lines changed

CHANGELOG.md

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

33
## Release 535 Entries
44

5+
### [535.43.08] 2023-08-17
6+
57
### [535.43.02] 2023-05-30
68

79
#### Fixed

README.md

Lines changed: 15 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.43.02.
4+
version 535.43.08.
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.43.02 driver release. This can be achieved by installing
20+
535.43.08 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.43.02 release,
183+
(see the table below). However, in the 535.43.08 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.43.02/README/kernel_open.html
191+
https://us.download.nvidia.com/XFree86/Linux-x86_64/535.43.08/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
@@ -664,6 +664,7 @@ Subsystem Device ID.
664664
| NVIDIA A100 80GB PCIe | 20B5 10DE 1642 |
665665
| NVIDIA PG506-232 | 20B6 10DE 1492 |
666666
| NVIDIA A30 | 20B7 10DE 1532 |
667+
| NVIDIA A30 | 20B7 10DE 1804 |
667668
| NVIDIA A100-PCIE-40GB | 20F1 10DE 145F |
668669
| NVIDIA A800-SXM4-80GB | 20F3 10DE 179B |
669670
| NVIDIA A800-SXM4-80GB | 20F3 10DE 179C |
@@ -828,6 +829,10 @@ Subsystem Device ID.
828829
| NVIDIA RTX 6000 Ada Generation | 26B1 103C 16A1 |
829830
| NVIDIA RTX 6000 Ada Generation | 26B1 10DE 16A1 |
830831
| NVIDIA RTX 6000 Ada Generation | 26B1 17AA 16A1 |
832+
| NVIDIA RTX 5000 Ada Generation | 26B2 1028 17FA |
833+
| NVIDIA RTX 5000 Ada Generation | 26B2 103C 17FA |
834+
| NVIDIA RTX 5000 Ada Generation | 26B2 10DE 17FA |
835+
| NVIDIA RTX 5000 Ada Generation | 26B2 17AA 17FA |
831836
| NVIDIA L40 | 26B5 10DE 169D |
832837
| NVIDIA L40 | 26B5 10DE 17DA |
833838
| NVIDIA GeForce RTX 4080 | 2704 |
@@ -841,15 +846,21 @@ Subsystem Device ID.
841846
| NVIDIA RTX 4000 SFF Ada Generation | 27B0 103C 16FA |
842847
| NVIDIA RTX 4000 SFF Ada Generation | 27B0 10DE 16FA |
843848
| NVIDIA RTX 4000 SFF Ada Generation | 27B0 17AA 16FA |
849+
| NVIDIA RTX 4000 Ada Generation | 27B2 1028 181B |
850+
| NVIDIA RTX 4000 Ada Generation | 27B2 103C 181B |
851+
| NVIDIA RTX 4000 Ada Generation | 27B2 10DE 181B |
852+
| NVIDIA RTX 4000 Ada Generation | 27B2 17AA 181B |
844853
| NVIDIA L4 | 27B8 10DE 16CA |
845854
| NVIDIA L4 | 27B8 10DE 16EE |
846855
| NVIDIA RTX 4000 Ada Generation Laptop GPU | 27BA |
847856
| NVIDIA RTX 3500 Ada Generation Laptop GPU | 27BB |
848857
| NVIDIA GeForce RTX 4080 Laptop GPU | 27E0 |
849858
| NVIDIA GeForce RTX 4060 Ti | 2803 |
859+
| NVIDIA GeForce RTX 4060 Ti | 2805 |
850860
| NVIDIA GeForce RTX 4070 Laptop GPU | 2820 |
851861
| NVIDIA RTX 3000 Ada Generation Laptop GPU | 2838 |
852862
| NVIDIA GeForce RTX 4070 Laptop GPU | 2860 |
863+
| NVIDIA GeForce RTX 4060 | 2882 |
853864
| NVIDIA GeForce RTX 4060 Laptop GPU | 28A0 |
854865
| NVIDIA GeForce RTX 4050 Laptop GPU | 28A1 |
855866
| NVIDIA RTX 2000 Ada Generation Laptop GPU | 28B8 |

kernel-open/Kbuild

Lines changed: 5 additions & 2 deletions
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.43.02\"
75+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"535.43.08\"
7676

7777
ifneq ($(SYSSRCHOST1X),)
7878
EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
@@ -275,6 +275,7 @@ NV_HEADER_PRESENCE_TESTS = \
275275
asm/opal-api.h \
276276
sound/hdaudio.h \
277277
asm/pgtable_types.h \
278+
asm/page.h \
278279
linux/stringhash.h \
279280
linux/dma-map-ops.h \
280281
rdma/peer_mem.h \
@@ -300,7 +301,9 @@ NV_HEADER_PRESENCE_TESTS = \
300301
linux/vfio_pci_core.h \
301302
linux/mdev.h \
302303
soc/tegra/bpmp-abi.h \
303-
soc/tegra/bpmp.h
304+
soc/tegra/bpmp.h \
305+
linux/cc_platform.h \
306+
asm/cpufeature.h
304307

305308
# Filename to store the define for the header in $(1); this is only consumed by
306309
# the rule below that concatenates all of these together.

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

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
#include <linux/highmem.h>
212212

213213
#include <linux/nodemask.h>
214+
#include <linux/memory.h>
214215

215216
#include <linux/workqueue.h> /* workqueue */
216217
#include "nv-kthread-q.h" /* kthread based queue */
@@ -510,7 +511,11 @@ static inline void nv_vfree(void *ptr, NvU64 size)
510511

511512
static inline void *nv_ioremap(NvU64 phys, NvU64 size)
512513
{
514+
#if IS_ENABLED(CONFIG_INTEL_TDX_GUEST) && defined(NV_IOREMAP_DRIVER_HARDENED_PRESENT)
515+
void *ptr = ioremap_driver_hardened(phys, size);
516+
#else
513517
void *ptr = ioremap(phys, size);
518+
#endif
514519
if (ptr)
515520
NV_MEMDBG_ADD(ptr, size);
516521
return ptr;
@@ -523,11 +528,11 @@ static inline void *nv_ioremap_nocache(NvU64 phys, NvU64 size)
523528

524529
static inline void *nv_ioremap_cache(NvU64 phys, NvU64 size)
525530
{
526-
#if defined(NV_IOREMAP_CACHE_PRESENT)
527-
void *ptr = ioremap_cache(phys, size);
528-
if (ptr)
529-
NV_MEMDBG_ADD(ptr, size);
530-
return ptr;
531+
void *ptr = NULL;
532+
#if IS_ENABLED(CONFIG_INTEL_TDX_GUEST) && defined(NV_IOREMAP_CACHE_SHARED_PRESENT)
533+
ptr = ioremap_cache_shared(phys, size);
534+
#elif defined(NV_IOREMAP_CACHE_PRESENT)
535+
ptr = ioremap_cache(phys, size);
531536
#elif defined(NVCPU_PPC64LE)
532537
//
533538
// ioremap_cache() has been only implemented correctly for ppc64le with
@@ -542,25 +547,32 @@ static inline void *nv_ioremap_cache(NvU64 phys, NvU64 size)
542547
// (commit 40f1ce7fb7e8, kernel 3.0+) and that covers all kernels we
543548
// support on power.
544549
//
545-
void *ptr = ioremap_prot(phys, size, pgprot_val(PAGE_KERNEL));
546-
if (ptr)
547-
NV_MEMDBG_ADD(ptr, size);
548-
return ptr;
550+
ptr = ioremap_prot(phys, size, pgprot_val(PAGE_KERNEL));
549551
#else
550552
return nv_ioremap(phys, size);
551553
#endif
552-
}
553554

554-
static inline void *nv_ioremap_wc(NvU64 phys, NvU64 size)
555-
{
556-
#if defined(NV_IOREMAP_WC_PRESENT)
557-
void *ptr = ioremap_wc(phys, size);
558555
if (ptr)
559556
NV_MEMDBG_ADD(ptr, size);
557+
560558
return ptr;
559+
}
560+
561+
static inline void *nv_ioremap_wc(NvU64 phys, NvU64 size)
562+
{
563+
void *ptr = NULL;
564+
#if IS_ENABLED(CONFIG_INTEL_TDX_GUEST) && defined(NV_IOREMAP_DRIVER_HARDENED_WC_PRESENT)
565+
ptr = ioremap_driver_hardened_wc(phys, size);
566+
#elif defined(NV_IOREMAP_WC_PRESENT)
567+
ptr = ioremap_wc(phys, size);
561568
#else
562569
return nv_ioremap_nocache(phys, size);
563570
#endif
571+
572+
if (ptr)
573+
NV_MEMDBG_ADD(ptr, size);
574+
575+
return ptr;
564576
}
565577

566578
static inline void nv_iounmap(void *ptr, NvU64 size)
@@ -633,37 +645,24 @@ static NvBool nv_numa_node_has_memory(int node_id)
633645
free_pages(ptr, order); \
634646
}
635647

636-
extern NvU64 nv_shared_gpa_boundary;
648+
static inline pgprot_t nv_sme_clr(pgprot_t prot)
649+
{
650+
#if defined(__sme_clr)
651+
return __pgprot(__sme_clr(pgprot_val(prot)));
652+
#else
653+
return prot;
654+
#endif // __sme_clr
655+
}
637656

638657
static inline pgprot_t nv_adjust_pgprot(pgprot_t vm_prot, NvU32 extra)
639658
{
640659
pgprot_t prot = __pgprot(pgprot_val(vm_prot) | extra);
641-
#if defined(CONFIG_AMD_MEM_ENCRYPT) && defined(NV_PGPROT_DECRYPTED_PRESENT)
642-
/*
643-
* When AMD memory encryption is enabled, device memory mappings with the
644-
* C-bit set read as 0xFF, so ensure the bit is cleared for user mappings.
645-
*
646-
* If cc_mkdec() is present, then pgprot_decrypted() can't be used.
647-
*/
648-
#if defined(NV_CC_MKDEC_PRESENT)
649-
if (nv_shared_gpa_boundary != 0)
650-
{
651-
/*
652-
* By design, a VM using vTOM doesn't see the SEV setting and
653-
* for AMD with vTOM, *set* means decrypted.
654-
*/
655-
prot = __pgprot(nv_shared_gpa_boundary | (pgprot_val(vm_prot)));
656-
}
657-
else
658-
{
659-
prot = __pgprot(__sme_clr(pgprot_val(vm_prot)));
660-
}
661-
#else
662-
prot = pgprot_decrypted(prot);
663-
#endif
664-
#endif
665660

666-
return prot;
661+
#if defined(pgprot_decrypted)
662+
return pgprot_decrypted(prot);
663+
#else
664+
return nv_sme_clr(prot);
665+
#endif // pgprot_decrypted
667666
}
668667

669668
#if defined(PAGE_KERNEL_NOENC)
@@ -1323,7 +1322,7 @@ nv_dma_maps_swiotlb(struct device *dev)
13231322
* SEV memory encryption") forces SWIOTLB to be enabled when AMD SEV
13241323
* is active in all cases.
13251324
*/
1326-
if (os_sev_enabled)
1325+
if (os_cc_enabled)
13271326
swiotlb_in_use = NV_TRUE;
13281327
#endif
13291328

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

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2016-2017 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2016-2023 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
@@ -36,12 +36,21 @@ typedef int vm_fault_t;
3636
* pin_user_pages() was added by commit eddb1c228f7951d399240
3737
* ("mm/gup: introduce pin_user_pages*() and FOLL_PIN") in v5.6-rc1 (2020-01-30)
3838
*
39+
* Removed vmas parameter from pin_user_pages() by commit 40896a02751
40+
* ("mm/gup: remove vmas parameter from pin_user_pages()")
41+
* in linux-next, expected in v6.5-rc1 (2023-05-17)
42+
*
3943
*/
4044

4145
#include <linux/mm.h>
4246
#include <linux/sched.h>
4347
#if defined(NV_PIN_USER_PAGES_PRESENT)
44-
#define NV_PIN_USER_PAGES pin_user_pages
48+
#if defined(NV_PIN_USER_PAGES_HAS_ARGS_VMAS)
49+
#define NV_PIN_USER_PAGES pin_user_pages
50+
#else
51+
#define NV_PIN_USER_PAGES(start, nr_pages, gup_flags, pages, vmas) \
52+
pin_user_pages(start, nr_pages, gup_flags, pages)
53+
#endif // NV_PIN_USER_PAGES_HAS_ARGS_VMAS
4554
#define NV_UNPIN_USER_PAGE unpin_user_page
4655
#else
4756
#define NV_PIN_USER_PAGES NV_GET_USER_PAGES
@@ -64,11 +73,18 @@ typedef int vm_fault_t;
6473
* commit 8e50b8b07f462ab4b91bc1491b1c91bd75e4ad40 which cherry-picked the
6574
* replacement of the write and force parameters with gup_flags
6675
*
76+
* Removed vmas parameter from get_user_pages() by commit 7bbf9c8c99
77+
* ("mm/gup: remove unused vmas parameter from get_user_pages()")
78+
* in linux-next, expected in v6.5-rc1 (2023-05-17)
79+
*
6780
*/
6881

6982
#if defined(NV_GET_USER_PAGES_HAS_ARGS_FLAGS)
83+
#define NV_GET_USER_PAGES(start, nr_pages, flags, pages, vmas) \
84+
get_user_pages(start, nr_pages, flags, pages)
85+
#elif defined(NV_GET_USER_PAGES_HAS_ARGS_FLAGS_VMAS)
7086
#define NV_GET_USER_PAGES get_user_pages
71-
#elif defined(NV_GET_USER_PAGES_HAS_ARGS_TSK_FLAGS)
87+
#elif defined(NV_GET_USER_PAGES_HAS_ARGS_TSK_FLAGS_VMAS)
7288
#define NV_GET_USER_PAGES(start, nr_pages, flags, pages, vmas) \
7389
get_user_pages(current, current->mm, start, nr_pages, flags, pages, vmas)
7490
#else
@@ -81,13 +97,13 @@ typedef int vm_fault_t;
8197
int write = flags & FOLL_WRITE;
8298
int force = flags & FOLL_FORCE;
8399

84-
#if defined(NV_GET_USER_PAGES_HAS_ARGS_WRITE_FORCE)
100+
#if defined(NV_GET_USER_PAGES_HAS_ARGS_WRITE_FORCE_VMAS)
85101
return get_user_pages(start, nr_pages, write, force, pages, vmas);
86102
#else
87-
// NV_GET_USER_PAGES_HAS_ARGS_TSK_WRITE_FORCE
103+
// NV_GET_USER_PAGES_HAS_ARGS_TSK_WRITE_FORCE_VMAS
88104
return get_user_pages(current, current->mm, start, nr_pages, write,
89105
force, pages, vmas);
90-
#endif // NV_GET_USER_PAGES_HAS_ARGS_WRITE_FORCE
106+
#endif // NV_GET_USER_PAGES_HAS_ARGS_WRITE_FORCE_VMAS
91107
}
92108
#endif // NV_GET_USER_PAGES_HAS_ARGS_FLAGS
93109

@@ -100,15 +116,22 @@ typedef int vm_fault_t;
100116
* 64019a2e467a ("mm/gup: remove task_struct pointer for all gup code")
101117
* in v5.9-rc1 (2020-08-11). *
102118
*
119+
* Removed unused vmas parameter from pin_user_pages_remote() by commit
120+
* 83bcc2e132("mm/gup: remove unused vmas parameter from pin_user_pages_remote()")
121+
* in linux-next, expected in v6.5-rc1 (2023-05-14)
122+
*
103123
*/
104124

105125
#if defined(NV_PIN_USER_PAGES_REMOTE_PRESENT)
106-
#if defined (NV_PIN_USER_PAGES_REMOTE_HAS_ARGS_TSK)
126+
#if defined(NV_PIN_USER_PAGES_REMOTE_HAS_ARGS_TSK_VMAS)
107127
#define NV_PIN_USER_PAGES_REMOTE(mm, start, nr_pages, flags, pages, vmas, locked) \
108128
pin_user_pages_remote(NULL, mm, start, nr_pages, flags, pages, vmas, locked)
109-
#else
129+
#elif defined(NV_PIN_USER_PAGES_REMOTE_HAS_ARGS_VMAS)
110130
#define NV_PIN_USER_PAGES_REMOTE pin_user_pages_remote
111-
#endif // NV_PIN_USER_PAGES_REMOTE_HAS_ARGS_TSK
131+
#else
132+
#define NV_PIN_USER_PAGES_REMOTE(mm, start, nr_pages, flags, pages, vmas, locked) \
133+
pin_user_pages_remote(mm, start, nr_pages, flags, pages, locked)
134+
#endif // NV_PIN_USER_PAGES_REMOTE_HAS_ARGS_TSK_VMAS
112135
#else
113136
#define NV_PIN_USER_PAGES_REMOTE NV_GET_USER_PAGES_REMOTE
114137
#endif // NV_PIN_USER_PAGES_REMOTE_PRESENT
@@ -135,22 +158,30 @@ typedef int vm_fault_t;
135158
* commit 64019a2e467a ("mm/gup: remove task_struct pointer for
136159
* all gup code") in v5.9-rc1 (2020-08-11).
137160
*
161+
* Removed vmas parameter from get_user_pages_remote() by commit a4bde14d549
162+
* ("mm/gup: remove vmas parameter from get_user_pages_remote()")
163+
* in linux-next, expected in v6.5-rc1 (2023-05-14)
164+
*
138165
*/
139166

140167
#if defined(NV_GET_USER_PAGES_REMOTE_PRESENT)
141168
#if defined(NV_GET_USER_PAGES_REMOTE_HAS_ARGS_FLAGS_LOCKED)
169+
#define NV_GET_USER_PAGES_REMOTE(mm, start, nr_pages, flags, pages, vmas, locked) \
170+
get_user_pages_remote(mm, start, nr_pages, flags, pages, locked)
171+
172+
#elif defined(NV_GET_USER_PAGES_REMOTE_HAS_ARGS_FLAGS_LOCKED_VMAS)
142173
#define NV_GET_USER_PAGES_REMOTE get_user_pages_remote
143174

144-
#elif defined(NV_GET_USER_PAGES_REMOTE_HAS_ARGS_TSK_FLAGS_LOCKED)
175+
#elif defined(NV_GET_USER_PAGES_REMOTE_HAS_ARGS_TSK_FLAGS_LOCKED_VMAS)
145176
#define NV_GET_USER_PAGES_REMOTE(mm, start, nr_pages, flags, pages, vmas, locked) \
146177
get_user_pages_remote(NULL, mm, start, nr_pages, flags, pages, vmas, locked)
147178

148-
#elif defined(NV_GET_USER_PAGES_REMOTE_HAS_ARGS_TSK_FLAGS)
179+
#elif defined(NV_GET_USER_PAGES_REMOTE_HAS_ARGS_TSK_FLAGS_VMAS)
149180
#define NV_GET_USER_PAGES_REMOTE(mm, start, nr_pages, flags, pages, vmas, locked) \
150181
get_user_pages_remote(NULL, mm, start, nr_pages, flags, pages, vmas)
151182

152183
#else
153-
// NV_GET_USER_PAGES_REMOTE_HAS_ARGS_TSK_WRITE_FORCE
184+
// NV_GET_USER_PAGES_REMOTE_HAS_ARGS_TSK_WRITE_FORCE_VMAS
154185
static inline long NV_GET_USER_PAGES_REMOTE(struct mm_struct *mm,
155186
unsigned long start,
156187
unsigned long nr_pages,
@@ -167,7 +198,7 @@ typedef int vm_fault_t;
167198
}
168199
#endif // NV_GET_USER_PAGES_REMOTE_HAS_ARGS_FLAGS_LOCKED
169200
#else
170-
#if defined(NV_GET_USER_PAGES_HAS_ARGS_TSK_WRITE_FORCE)
201+
#if defined(NV_GET_USER_PAGES_HAS_ARGS_TSK_WRITE_FORCE_VMAS)
171202
static inline long NV_GET_USER_PAGES_REMOTE(struct mm_struct *mm,
172203
unsigned long start,
173204
unsigned long nr_pages,
@@ -185,7 +216,7 @@ typedef int vm_fault_t;
185216
#else
186217
#define NV_GET_USER_PAGES_REMOTE(mm, start, nr_pages, flags, pages, vmas, locked) \
187218
get_user_pages(NULL, mm, start, nr_pages, flags, pages, vmas)
188-
#endif // NV_GET_USER_PAGES_HAS_ARGS_TSK_WRITE_FORCE
219+
#endif // NV_GET_USER_PAGES_HAS_ARGS_TSK_WRITE_FORCE_VMAS
189220
#endif // NV_GET_USER_PAGES_REMOTE_PRESENT
190221

191222
/*

0 commit comments

Comments
 (0)