Skip to content

Commit 54d6948

Browse files
committed
570.86.15
1 parent 9d0b041 commit 54d6948

File tree

1,166 files changed

+318673
-182497
lines changed

Some content is hidden

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

1,166 files changed

+318673
-182497
lines changed

README.md

Lines changed: 7 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 565.77.
4+
version 570.86.15.
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-
565.77 driver release. This can be achieved by installing
20+
570.86.15 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/565.77/README/kernel_open.html
188+
https://us.download.nvidia.com/XFree86/Linux-x86_64/570.86.15/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.
@@ -755,7 +755,6 @@ Subsystem Device ID.
755755
| NVIDIA H20 | 2329 10DE 198B |
756756
| NVIDIA H20 | 2329 10DE 198C |
757757
| NVIDIA H20-3e | 232C 10DE 2063 |
758-
| NVIDIA H20-3e | 232C 10DE 2064 |
759758
| NVIDIA H100 80GB HBM3 | 2330 10DE 16C0 |
760759
| NVIDIA H100 80GB HBM3 | 2330 10DE 16C1 |
761760
| NVIDIA H100 PCIe | 2331 10DE 1626 |
@@ -925,6 +924,7 @@ Subsystem Device ID.
925924
| NVIDIA GeForce RTX 4060 | 2882 |
926925
| NVIDIA GeForce RTX 4060 Laptop GPU | 28A0 |
927926
| NVIDIA GeForce RTX 4050 Laptop GPU | 28A1 |
927+
| NVIDIA GeForce RTX 3050 A Laptop GPU | 28A3 |
928928
| NVIDIA RTX 2000 Ada Generation | 28B0 1028 1870 |
929929
| NVIDIA RTX 2000 Ada Generation | 28B0 103C 1870 |
930930
| NVIDIA RTX 2000E Ada Generation | 28B0 103C 1871 |
@@ -939,3 +939,6 @@ Subsystem Device ID.
939939
| NVIDIA GeForce RTX 4060 Laptop GPU | 28E0 |
940940
| NVIDIA GeForce RTX 4050 Laptop GPU | 28E1 |
941941
| NVIDIA RTX 2000 Ada Generation Embedded GPU | 28F8 |
942+
| NVIDIA B200 | 2901 10DE 1999 |
943+
| NVIDIA B200 | 2901 10DE 199B |
944+
| NVIDIA B200 | 2901 10DE 20DA |

kernel-open/Kbuild

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,20 @@ ifeq ($(NV_UNDEF_BEHAVIOR_SANITIZER),1)
5757
UBSAN_SANITIZE := y
5858
endif
5959

60+
#
61+
# Command to create a symbolic link, explicitly resolving the symlink target
62+
# to an absolute path to abstract away the difference between Linux < 6.13,
63+
# where the CWD is the Linux kernel source tree for Kbuild extmod builds, and
64+
# Linux >= 6.13, where the CWD is the external module source tree.
65+
#
66+
# This is used to create the nv*-kernel.o -> nv*-kernel.o_binary symlinks for
67+
# kernel modules which use precompiled binary object files.
68+
#
69+
70+
quiet_cmd_symlink = SYMLINK $@
71+
cmd_symlink = ln -sf $(abspath $<) $@
72+
73+
6074
$(foreach _module, $(NV_KERNEL_MODULES), \
6175
$(eval include $(src)/$(_module)/$(_module).Kbuild))
6276

@@ -72,7 +86,7 @@ EXTRA_CFLAGS += -I$(src)/common/inc
7286
EXTRA_CFLAGS += -I$(src)
7387
EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
7488
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
75-
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"565.77\"
89+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"570.86.15\"
7690

7791
ifneq ($(SYSSRCHOST1X),)
7892
EXTRA_CFLAGS += -I$(SYSSRCHOST1X)

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
typedef enum
3333
{
3434
NV_FIRMWARE_TYPE_GSP,
35-
NV_FIRMWARE_TYPE_GSP_LOG
35+
NV_FIRMWARE_TYPE_GSP_LOG,
36+
#if defined(NV_VMWARE)
37+
NV_FIRMWARE_TYPE_BINDATA
38+
#endif
3639
} nv_firmware_type_t;
3740

3841
typedef enum
@@ -45,6 +48,7 @@ typedef enum
4548
NV_FIRMWARE_CHIP_FAMILY_AD10X = 5,
4649
NV_FIRMWARE_CHIP_FAMILY_GH100 = 6,
4750
NV_FIRMWARE_CHIP_FAMILY_GB10X = 8,
51+
NV_FIRMWARE_CHIP_FAMILY_GB20X = 9,
4852
NV_FIRMWARE_CHIP_FAMILY_END,
4953
} nv_firmware_chip_family_t;
5054

@@ -54,6 +58,7 @@ static inline const char *nv_firmware_chip_family_to_string(
5458
{
5559
switch (fw_chip_family) {
5660
case NV_FIRMWARE_CHIP_FAMILY_GB10X: return "gb10x";
61+
case NV_FIRMWARE_CHIP_FAMILY_GB20X: return "gb20x";
5762
case NV_FIRMWARE_CHIP_FAMILY_GH100: return "gh100";
5863
case NV_FIRMWARE_CHIP_FAMILY_AD10X: return "ad10x";
5964
case NV_FIRMWARE_CHIP_FAMILY_GA10X: return "ga10x";
@@ -84,6 +89,7 @@ static inline const char *nv_firmware_for_chip_family(
8489
switch (fw_chip_family)
8590
{
8691
case NV_FIRMWARE_CHIP_FAMILY_GB10X: // fall through
92+
case NV_FIRMWARE_CHIP_FAMILY_GB20X: // fall through
8793
case NV_FIRMWARE_CHIP_FAMILY_GH100: // fall through
8894
case NV_FIRMWARE_CHIP_FAMILY_AD10X: // fall through
8995
case NV_FIRMWARE_CHIP_FAMILY_GA10X:
@@ -104,6 +110,7 @@ static inline const char *nv_firmware_for_chip_family(
104110
switch (fw_chip_family)
105111
{
106112
case NV_FIRMWARE_CHIP_FAMILY_GB10X: // fall through
113+
case NV_FIRMWARE_CHIP_FAMILY_GB20X: // fall through
107114
case NV_FIRMWARE_CHIP_FAMILY_GH100: // fall through
108115
case NV_FIRMWARE_CHIP_FAMILY_AD10X: // fall through
109116
case NV_FIRMWARE_CHIP_FAMILY_GA10X:
@@ -119,7 +126,12 @@ static inline const char *nv_firmware_for_chip_family(
119126
return "";
120127
}
121128
}
122-
129+
#if defined(NV_VMWARE)
130+
else if (fw_type == NV_FIRMWARE_TYPE_BINDATA)
131+
{
132+
return NV_FIRMWARE_FOR_NAME("bindata_image");
133+
}
134+
#endif
123135
return "";
124136
}
125137
#endif // defined(NV_FIRMWARE_FOR_NAME)

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2020-2024 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
@@ -128,6 +128,9 @@ typedef struct nv_ioctl_register_fd
128128

129129
#define NV_DMABUF_EXPORT_MAX_HANDLES 128
130130

131+
#define NV_DMABUF_EXPORT_MAPPING_TYPE_DEFAULT 0
132+
#define NV_DMABUF_EXPORT_MAPPING_TYPE_FORCE_PCIE 1
133+
131134
typedef struct nv_ioctl_export_to_dma_buf_fd
132135
{
133136
int fd;
@@ -136,6 +139,7 @@ typedef struct nv_ioctl_export_to_dma_buf_fd
136139
NvU32 numObjects;
137140
NvU32 index;
138141
NvU64 totalSize NV_ALIGN_BYTES(8);
142+
NvU8 mappingType;
139143
NvHandle handles[NV_DMABUF_EXPORT_MAX_HANDLES];
140144
NvU64 offsets[NV_DMABUF_EXPORT_MAX_HANDLES] NV_ALIGN_BYTES(8);
141145
NvU64 sizes[NV_DMABUF_EXPORT_MAX_HANDLES] NV_ALIGN_BYTES(8);

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

Lines changed: 2 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,6 @@ NV_STATUS nvos_forward_error_to_cray(struct pci_dev *, NvU32,
231231
const char *, va_list);
232232
#endif
233233

234-
#if defined(NVCPU_PPC64LE) && defined(CONFIG_EEH)
235-
#include <asm/eeh.h>
236-
#define NV_PCI_ERROR_RECOVERY_ENABLED() eeh_enabled()
237-
#define NV_PCI_ERROR_RECOVERY
238-
#endif
239-
240234
#if defined(NV_ASM_SET_MEMORY_H_PRESENT)
241235
#include <asm/set_memory.h>
242236
#endif
@@ -609,7 +603,7 @@ static NvBool nv_numa_node_has_memory(int node_id)
609603

610604
#define NV_ALLOC_PAGES_NODE(ptr, nid, order, gfp_mask) \
611605
{ \
612-
(ptr) = (unsigned long)page_address(alloc_pages_node(nid, gfp_mask, order)); \
606+
(ptr) = (unsigned long) alloc_pages_node(nid, gfp_mask, order); \
613607
}
614608

615609
#define NV_GET_FREE_PAGES(ptr, order, gfp_mask) \
@@ -881,16 +875,6 @@ typedef void irqreturn_t;
881875
#define PCI_CAP_ID_EXP 0x10
882876
#endif
883877

884-
/*
885-
* On Linux on PPC64LE enable basic support for Linux PCI error recovery (see
886-
* Documentation/PCI/pci-error-recovery.txt). Currently RM only supports error
887-
* notification and data collection, not actual recovery of the device.
888-
*/
889-
#if defined(NVCPU_PPC64LE) && defined(CONFIG_EEH)
890-
#include <asm/eeh.h>
891-
#define NV_PCI_ERROR_RECOVERY
892-
#endif
893-
894878
/*
895879
* If the host OS has page sizes larger than 4KB, we may have a security
896880
* problem. Registers are typically grouped in 4KB pages, but if there are
@@ -1419,8 +1403,6 @@ typedef struct nv_dma_map_s {
14191403
0 ? NV_OK : NV_ERR_OPERATING_SYSTEM)
14201404
#endif
14211405

1422-
typedef struct nv_ibmnpu_info nv_ibmnpu_info_t;
1423-
14241406
typedef struct nv_work_s {
14251407
struct work_struct task;
14261408
void *data;
@@ -1468,7 +1450,6 @@ struct nv_dma_device {
14681450
} addressable_range;
14691451

14701452
struct device *dev;
1471-
NvBool nvlink;
14721453
};
14731454

14741455
/* Properties of the coherent link */
@@ -1517,9 +1498,6 @@ typedef struct nv_linux_state_s {
15171498
struct device *dev;
15181499
struct pci_dev *pci_dev;
15191500

1520-
/* IBM-NPU info associated with this GPU */
1521-
nv_ibmnpu_info_t *npu;
1522-
15231501
/* coherent link information */
15241502
coherent_link_info_t coherent_link_info;
15251503

@@ -1835,7 +1813,7 @@ static inline int nv_is_control_device(struct inode *inode)
18351813
return (minor((inode)->i_rdev) == NV_MINOR_DEVICE_NUMBER_CONTROL_DEVICE);
18361814
}
18371815

1838-
#if defined(NV_DOM0_KERNEL_PRESENT) || defined(NV_VGPU_KVM_BUILD)
1816+
#if defined(NV_DOM0_KERNEL_PRESENT) || defined(NV_VGPU_KVM_BUILD) || defined(NV_DEVICE_VM_BUILD)
18391817
#define NV_VGX_HYPER
18401818
#if defined(NV_XEN_IOEMU_INJECT_MSI)
18411819
#include <xen/ioemu.h>
@@ -1872,59 +1850,6 @@ static inline NvBool nv_alloc_release(nv_linux_file_private_t *nvlfp, nv_alloc_t
18721850
#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
18731851
#endif
18741852

1875-
/*
1876-
* Starting on Power9 systems, DMA addresses for NVLink are no longer
1877-
* the same as used over PCIe.
1878-
*
1879-
* Power9 supports a 56-bit Real Address. This address range is compressed
1880-
* when accessed over NVLink to allow the GPU to access all of memory using
1881-
* its 47-bit Physical address.
1882-
*
1883-
* If there is an NPU device present on the system, it implies that NVLink
1884-
* sysmem links are present and we need to apply the required address
1885-
* conversion for NVLink within the driver.
1886-
*
1887-
* See Bug 1920398 for further background and details.
1888-
*
1889-
* Note, a deviation from the documented compression scheme is that the
1890-
* upper address bits (i.e. bit 56-63) instead of being set to zero are
1891-
* preserved during NVLink address compression so the orignal PCIe DMA
1892-
* address can be reconstructed on expansion. These bits can be safely
1893-
* ignored on NVLink since they are truncated by the GPU.
1894-
*
1895-
* Bug 1968345: As a performance enhancement it is the responsibility of
1896-
* the caller on PowerPC platforms to check for presence of an NPU device
1897-
* before the address transformation is applied.
1898-
*/
1899-
static inline NvU64 nv_compress_nvlink_addr(NvU64 addr)
1900-
{
1901-
NvU64 addr47 = addr;
1902-
1903-
#if defined(NVCPU_PPC64LE)
1904-
addr47 = addr & ((1ULL << 43) - 1);
1905-
addr47 |= (addr & (0x3ULL << 45)) >> 2;
1906-
WARN_ON(addr47 & (1ULL << 44));
1907-
addr47 |= (addr & (0x3ULL << 49)) >> 4;
1908-
addr47 |= addr & ~((1ULL << 56) - 1);
1909-
#endif
1910-
1911-
return addr47;
1912-
}
1913-
1914-
static inline NvU64 nv_expand_nvlink_addr(NvU64 addr47)
1915-
{
1916-
NvU64 addr = addr47;
1917-
1918-
#if defined(NVCPU_PPC64LE)
1919-
addr = addr47 & ((1ULL << 43) - 1);
1920-
addr |= (addr47 & (3ULL << 43)) << 2;
1921-
addr |= (addr47 & (3ULL << 45)) << 4;
1922-
addr |= addr47 & ~((1ULL << 56) - 1);
1923-
#endif
1924-
1925-
return addr;
1926-
}
1927-
19281853
// Default flags for ISRs
19291854
static inline NvU32 nv_default_irq_flags(nv_state_t *nv)
19301855
{

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2019 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2019-2024 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,5 +36,6 @@ int nv_pci_count_devices(void);
3636
NvU8 nv_find_pci_capability(struct pci_dev *, NvU8);
3737
int nvidia_dev_get_pci_info(const NvU8 *, struct pci_dev **, NvU64 *, NvU64 *);
3838
nv_linux_state_t * find_pci(NvU32, NvU8, NvU8, NvU8);
39+
NvBool nv_pci_is_valid_topology_for_direct_pci(nv_state_t *, struct device *);
3940

4041
#endif

0 commit comments

Comments
 (0)