Skip to content

Commit 12c0739

Browse files
committed
535.98
1 parent 29f830f commit 12c0739

File tree

85 files changed

+33143
-32565
lines changed

Some content is hidden

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

85 files changed

+33143
-32565
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.98] 2023-08-08
6+
57
### [535.86.10] 2023-07-31
68

79
### [535.86.05] 2023-07-18

README.md

Lines changed: 12 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.86.10.
4+
version 535.98.
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.86.10 driver release. This can be achieved by installing
20+
535.98 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.86.10 release,
183+
(see the table below). However, in the 535.98 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.86.10/README/kernel_open.html
191+
https://us.download.nvidia.com/XFree86/Linux-x86_64/535.98/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
@@ -829,6 +829,10 @@ Subsystem Device ID.
829829
| NVIDIA RTX 6000 Ada Generation | 26B1 103C 16A1 |
830830
| NVIDIA RTX 6000 Ada Generation | 26B1 10DE 16A1 |
831831
| 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 |
832836
| NVIDIA L40 | 26B5 10DE 169D |
833837
| NVIDIA L40 | 26B5 10DE 17DA |
834838
| NVIDIA GeForce RTX 4080 | 2704 |
@@ -842,6 +846,10 @@ Subsystem Device ID.
842846
| NVIDIA RTX 4000 SFF Ada Generation | 27B0 103C 16FA |
843847
| NVIDIA RTX 4000 SFF Ada Generation | 27B0 10DE 16FA |
844848
| 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 |
845853
| NVIDIA L4 | 27B8 10DE 16CA |
846854
| NVIDIA L4 | 27B8 10DE 16EE |
847855
| NVIDIA RTX 4000 Ada Generation Laptop GPU | 27BA |

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.86.10\"
75+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"535.98\"
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: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,11 @@ static inline void nv_vfree(void *ptr, NvU64 size)
511511

512512
static inline void *nv_ioremap(NvU64 phys, NvU64 size)
513513
{
514+
#if IS_ENABLED(CONFIG_INTEL_TDX_GUEST) && defined(NV_IOREMAP_DRIVER_HARDENED_PRESENT)
515+
void *ptr = ioremap_driver_hardened(phys, size);
516+
#else
514517
void *ptr = ioremap(phys, size);
518+
#endif
515519
if (ptr)
516520
NV_MEMDBG_ADD(ptr, size);
517521
return ptr;
@@ -524,11 +528,11 @@ static inline void *nv_ioremap_nocache(NvU64 phys, NvU64 size)
524528

525529
static inline void *nv_ioremap_cache(NvU64 phys, NvU64 size)
526530
{
527-
#if defined(NV_IOREMAP_CACHE_PRESENT)
528-
void *ptr = ioremap_cache(phys, size);
529-
if (ptr)
530-
NV_MEMDBG_ADD(ptr, size);
531-
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);
532536
#elif defined(NVCPU_PPC64LE)
533537
//
534538
// ioremap_cache() has been only implemented correctly for ppc64le with
@@ -543,25 +547,32 @@ static inline void *nv_ioremap_cache(NvU64 phys, NvU64 size)
543547
// (commit 40f1ce7fb7e8, kernel 3.0+) and that covers all kernels we
544548
// support on power.
545549
//
546-
void *ptr = ioremap_prot(phys, size, pgprot_val(PAGE_KERNEL));
547-
if (ptr)
548-
NV_MEMDBG_ADD(ptr, size);
549-
return ptr;
550+
ptr = ioremap_prot(phys, size, pgprot_val(PAGE_KERNEL));
550551
#else
551552
return nv_ioremap(phys, size);
552553
#endif
553-
}
554554

555-
static inline void *nv_ioremap_wc(NvU64 phys, NvU64 size)
556-
{
557-
#if defined(NV_IOREMAP_WC_PRESENT)
558-
void *ptr = ioremap_wc(phys, size);
559555
if (ptr)
560556
NV_MEMDBG_ADD(ptr, size);
557+
561558
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);
562568
#else
563569
return nv_ioremap_nocache(phys, size);
564570
#endif
571+
572+
if (ptr)
573+
NV_MEMDBG_ADD(ptr, size);
574+
575+
return ptr;
565576
}
566577

567578
static inline void nv_iounmap(void *ptr, NvU64 size)
@@ -634,37 +645,24 @@ static NvBool nv_numa_node_has_memory(int node_id)
634645
free_pages(ptr, order); \
635646
}
636647

637-
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+
}
638656

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

667-
return prot;
661+
#if defined(pgprot_decrypted)
662+
return pgprot_decrypted(prot);
663+
#else
664+
return nv_sme_clr(prot);
665+
#endif // pgprot_decrypted
668666
}
669667

670668
#if defined(PAGE_KERNEL_NOENC)
@@ -1324,7 +1322,7 @@ nv_dma_maps_swiotlb(struct device *dev)
13241322
* SEV memory encryption") forces SWIOTLB to be enabled when AMD SEV
13251323
* is active in all cases.
13261324
*/
1327-
if (os_sev_enabled)
1325+
if (os_cc_enabled)
13281326
swiotlb_in_use = NV_TRUE;
13291327
#endif
13301328

kernel-open/common/inc/nv_uvm_types.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,6 @@ typedef struct UvmGpuChannelAllocParams_tag
321321
// The next two fields store UVM_BUFFER_LOCATION values
322322
NvU32 gpFifoLoc;
323323
NvU32 gpPutLoc;
324-
325-
// Allocate the channel as secure. This flag should only be set when
326-
// Confidential Compute is enabled.
327-
NvBool secure;
328324
} UvmGpuChannelAllocParams;
329325

330326
typedef struct UvmGpuPagingChannelAllocParams_tag
@@ -368,9 +364,6 @@ typedef struct
368364
// True if the CE can be used for P2P transactions
369365
NvBool p2p:1;
370366

371-
// True if the CE supports encryption
372-
NvBool secure:1;
373-
374367
// Mask of physical CEs assigned to this LCE
375368
//
376369
// The value returned by RM for this field may change when a GPU is

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ NV_STATUS NV_API_CALL os_offline_page_at_address(NvU64 address);
214214
extern NvU32 os_page_size;
215215
extern NvU64 os_page_mask;
216216
extern NvU8 os_page_shift;
217-
extern NvU32 os_sev_status;
218-
extern NvBool os_sev_enabled;
217+
extern NvBool os_cc_enabled;
218+
extern NvBool os_cc_tdx_enabled;
219219
extern NvBool os_dma_buf_enabled;
220220

221221
/*

0 commit comments

Comments
 (0)