Skip to content

Commit a5bfb10

Browse files
committed
590.44.01
1 parent 2af9f1f commit a5bfb10

File tree

954 files changed

+421710
-408004
lines changed

Some content is hidden

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

954 files changed

+421710
-408004
lines changed

README.md

Lines changed: 4 additions & 3 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.105.08.
4+
version 590.44.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-
580.105.08 driver release. This can be achieved by installing
20+
590.44.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

@@ -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.105.08/README/kernel_open.html
188+
https://us.download.nvidia.com/XFree86/Linux-x86_64/590.44.01/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.
@@ -313,6 +313,7 @@ Subsystem Device ID.
313313
| NVIDIA GeForce RTX 2080 Super with Max-Q Design | 1E93 1D05 1089 |
314314
| Quadro RTX 5000 | 1EB0 |
315315
| Quadro RTX 4000 | 1EB1 |
316+
| EIZO Quadro MED-XN92 | 1EB1 15C3 12A0 |
316317
| Quadro RTX 5000 | 1EB5 |
317318
| Quadro RTX 5000 with Max-Q Design | 1EB5 1025 1375 |
318319
| Quadro RTX 5000 with Max-Q Design | 1EB5 1025 1401 |

kernel-open/Kbuild

Lines changed: 2 additions & 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.105.08\"
82+
ccflags-y += -DNV_VERSION_STRING=\"590.44.01\"
8383

8484
# Include and link Tegra out-of-tree modules.
8585
ifneq ($(wildcard /usr/src/nvidia/nvidia-oot),)
@@ -187,6 +187,7 @@ NV_CONFTEST_CFLAGS += $(filter -std=%,$(KBUILD_CFLAGS))
187187
NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
188188
NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
189189
NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
190+
NV_CONFTEST_CFLAGS += $(call cc-option,-fms-extensions,)
190191
NV_CONFTEST_CFLAGS += -Wno-error
191192

192193
NV_CONFTEST_COMPILE_TEST_HEADERS := $(obj)/conftest/macros.h
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
* SPDX-License-Identifier: MIT
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a
6+
* copy of this software and associated documentation files (the "Software"),
7+
* to deal in the Software without restriction, including without limitation
8+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
9+
* and/or sell copies of the Software, and to permit persons to whom the
10+
* Software is furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21+
* DEALINGS IN THE SOFTWARE.
22+
*/
23+
24+
#ifndef SBIOS_TABLE_VERSION_H
25+
#define SBIOS_TABLE_VERSION_H
26+
27+
#define CONTROLLER_SBIOS_TABLE_VERSION_10 (0x10)
28+
#define CONTROLLER_SBIOS_TABLE_VERSION_20 (0x20)
29+
#define CONTROLLER_SBIOS_TABLE_VERSION_21 (0x21)
30+
#define CONTROLLER_SBIOS_TABLE_VERSION_22 (0x22)
31+
#define CONTROLLER_SBIOS_TABLE_VERSION_23 (0x23)
32+
#define CONTROLLER_SBIOS_TABLE_VERSION_24 (0x24)
33+
#define CONTROLLER_SBIOS_TABLE_VERSION_25 (0x25)
34+
#define CONTROLLER_SBIOS_TABLE_MAX_ENTRIES (8)
35+
36+
// NOTE: When adding a new version, make sure to update MAX_VERSION accordingly.
37+
#define CONTROLLER_SBIOS_TABLE_MAX_VERSION (0x25)
38+
39+
/*!
40+
* Layout of Controller 2x data used for static config
41+
*/
42+
#define NVPCF_CONTROLLER_STATIC_TABLE_VERSION_20 (0x20)
43+
#define NVPCF_CONTROLLER_STATIC_TABLE_VERSION_21 (0x21)
44+
#define NVPCF_CONTROLLER_STATIC_TABLE_VERSION_22 (0x22)
45+
#define NVPCF_CONTROLLER_STATIC_TABLE_VERSION_23 (0x23)
46+
#define NVPCF_CONTROLLER_STATIC_TABLE_VERSION_24 (0x24)
47+
#define NVPCF_CONTROLLER_STATIC_TABLE_VERSION_25 (0x25)
48+
#define NVPCF_CONTROLLER_STATIC_TABLE_MAX_ENTRIES (8)
49+
50+
// NOTE: When adding a new version, make sure to update MAX_VERSION accordingly.
51+
#define NVPCF_CONTROLLER_STATIC_TABLE_MAX_VERSION (0x25)
52+
53+
#endif // SBIOS_TABLE_VERSION_H

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#define __NV_HASH_H__
2525

2626
#include "conftest.h"
27-
#include "nv-list-helpers.h"
2827
#include <linux/types.h>
2928
#include <linux/kernel.h>
3029
#include <linux/hash.h>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
#define NV_IOCTL_H
2727

2828
#include <nv-ioctl-numbers.h>
29+
#include <nv-ioctl-numa.h>
2930
#include <nvtypes.h>
3031

32+
3133
typedef struct {
3234
NvU32 domain; /* PCI domain number */
3335
NvU8 bus; /* PCI bus number */
@@ -113,7 +115,7 @@ typedef struct nv_ioctl_query_device_intr
113115
{
114116
NvU32 intrStatus NV_ALIGN_BYTES(4);
115117
NvU32 status;
116-
} nv_ioctl_query_device_intr;
118+
} nv_ioctl_query_device_intr_t;
117119

118120
/* system parameters that the kernel driver may use for configuration */
119121
typedef struct nv_ioctl_sys_params

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

Lines changed: 21 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,6 @@
102102
#include <linux/dma-buf.h>
103103
#endif
104104

105-
#if defined(NV_DRM_AVAILABLE)
106-
#include <drm/drm_device.h>
107-
#include <drm/drm_drv.h>
108-
109-
#if defined(NV_DRM_DRMP_H_PRESENT)
110-
#include <drm/drmP.h>
111-
#endif
112-
113-
#include <drm/drm_gem.h>
114-
#endif /* NV_DRM_AVAILABLE */
115-
116105
/* task and signal-related items */
117106
#include <linux/sched/signal.h>
118107
#include <linux/sched/task.h>
@@ -141,8 +130,6 @@
141130
#include <asm/bitops.h> /* __set_bit() */
142131
#include <linux/time.h> /* FD_SET() */
143132

144-
#include "nv-list-helpers.h"
145-
146133
/*
147134
* Use current->cred->euid, instead of calling current_euid().
148135
* The latter can pull in the GPL-only debug_lockdep_rcu_enabled()
@@ -274,14 +261,8 @@ extern int nv_pat_mode;
274261
user_function, NULL, args)
275262
#endif
276263

277-
#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_PREEMPT_RT_FULL)
278-
#define NV_CONFIG_PREEMPT_RT 1
279-
#endif
280-
281264
#define NV_PAGE_COUNT(page) \
282265
((unsigned int)page_count(page))
283-
#define NV_GET_PAGE_FLAGS(page_ptr) \
284-
(NV_GET_PAGE_STRUCT(page_ptr->phys_addr)->flags)
285266

286267
#if !defined(DEBUG) && defined(__GFP_NOWARN)
287268
#define NV_GFP_KERNEL (GFP_KERNEL | __GFP_NOWARN)
@@ -298,9 +279,9 @@ extern int nv_pat_mode;
298279
* such as Linux/x86-64; the alternative is to use an IOMMU such
299280
* as the one implemented with the K8 GART, if available.
300281
*/
301-
#define NV_GFP_DMA32 (NV_GFP_KERNEL | GFP_DMA32)
282+
#define NV_GFP_DMA32 (GFP_DMA32)
302283
#else
303-
#define NV_GFP_DMA32 (NV_GFP_KERNEL)
284+
#define NV_GFP_DMA32 0
304285
#endif
305286

306287
#if defined(NVCPU_AARCH64) || defined(NVCPU_RISCV64)
@@ -388,11 +369,7 @@ static inline void nv_vfree(void *ptr, NvU64 size)
388369

389370
static inline void *nv_ioremap(NvU64 phys, NvU64 size)
390371
{
391-
#if IS_ENABLED(CONFIG_INTEL_TDX_GUEST) && defined(NV_IOREMAP_DRIVER_HARDENED_PRESENT)
392-
void *ptr = ioremap_driver_hardened(phys, size);
393-
#else
394372
void *ptr = ioremap(phys, size);
395-
#endif
396373
NV_MEMDBG_ADD(ptr, size);
397374
return ptr;
398375
}
@@ -405,9 +382,7 @@ static inline void *nv_ioremap_nocache(NvU64 phys, NvU64 size)
405382
static inline void *nv_ioremap_cache(NvU64 phys, NvU64 size)
406383
{
407384
void *ptr = NULL;
408-
#if IS_ENABLED(CONFIG_INTEL_TDX_GUEST) && defined(NV_IOREMAP_CACHE_SHARED_PRESENT)
409-
ptr = ioremap_cache_shared(phys, size);
410-
#elif defined(NV_IOREMAP_CACHE_PRESENT)
385+
#if defined(NV_IOREMAP_CACHE_PRESENT)
411386
ptr = ioremap_cache(phys, size);
412387
#else
413388
return nv_ioremap(phys, size);
@@ -421,9 +396,7 @@ static inline void *nv_ioremap_cache(NvU64 phys, NvU64 size)
421396
static inline void *nv_ioremap_wc(NvU64 phys, NvU64 size)
422397
{
423398
void *ptr = NULL;
424-
#if IS_ENABLED(CONFIG_INTEL_TDX_GUEST) && defined(NV_IOREMAP_DRIVER_HARDENED_WC_PRESENT)
425-
ptr = ioremap_driver_hardened_wc(phys, size);
426-
#elif defined(NV_IOREMAP_WC_PRESENT)
399+
#if defined(NV_IOREMAP_WC_PRESENT)
427400
ptr = ioremap_wc(phys, size);
428401
#else
429402
return nv_ioremap_nocache(phys, size);
@@ -465,13 +438,7 @@ static NvBool nv_numa_node_has_memory(int node_id)
465438
NV_MEMDBG_ADD(ptr, size); \
466439
}
467440

468-
#if defined(__GFP_RETRY_MAYFAIL)
469441
#define NV_GFP_NO_OOM (NV_GFP_KERNEL | __GFP_RETRY_MAYFAIL)
470-
#elif defined(__GFP_NORETRY)
471-
#define NV_GFP_NO_OOM (NV_GFP_KERNEL | __GFP_NORETRY)
472-
#else
473-
#define NV_GFP_NO_OOM (NV_GFP_KERNEL)
474-
#endif
475442

476443
#define NV_KMALLOC_NO_OOM(ptr, size) \
477444
{ \
@@ -528,22 +495,12 @@ static inline pgprot_t nv_adjust_pgprot(pgprot_t vm_prot)
528495
#endif
529496
#endif
530497

531-
#define NV_GET_CURRENT_PROCESS() current->tgid
532-
#define NV_IN_ATOMIC() in_atomic()
533-
#define NV_COPY_TO_USER(to, from, n) copy_to_user(to, from, n)
534-
#define NV_COPY_FROM_USER(to, from, n) copy_from_user(to, from, n)
535-
536498
#define NV_IS_SUSER() capable(CAP_SYS_ADMIN)
537-
#define NV_CLI() local_irq_disable()
538-
#define NV_SAVE_FLAGS(eflags) local_save_flags(eflags)
539-
#define NV_RESTORE_FLAGS(eflags) local_irq_restore(eflags)
540-
#define NV_MAY_SLEEP() (!irqs_disabled() && !in_interrupt() && !NV_IN_ATOMIC())
499+
#define NV_MAY_SLEEP() (!irqs_disabled() && !in_interrupt() && !in_atomic())
541500
#define NV_MODULE_PARAMETER(x) module_param(x, int, 0)
542501
#define NV_MODULE_STRING_PARAMETER(x) module_param(x, charp, 0)
543502
#undef MODULE_PARM
544503

545-
#define NV_NUM_CPUS() num_possible_cpus()
546-
547504
#define NV_HAVE_MEMORY_ENCRYPT_DECRYPT 0
548505

549506
#if defined(NVCPU_X86_64) && \
@@ -596,7 +553,6 @@ static inline dma_addr_t nv_phys_to_dma(struct device *dev, NvU64 pa)
596553
#endif
597554
}
598555

599-
#define NV_GET_OFFSET_IN_PAGE(phys_page) offset_in_page(phys_page)
600556
#define NV_GET_PAGE_STRUCT(phys_page) virt_to_page(__va(phys_page))
601557
#define NV_VMA_PGOFF(vma) ((vma)->vm_pgoff)
602558
#define NV_VMA_SIZE(vma) ((vma)->vm_end - (vma)->vm_start)
@@ -711,13 +667,6 @@ static inline dma_addr_t nv_phys_to_dma(struct device *dev, NvU64 pa)
711667
# define minor(x) MINOR(x)
712668
#endif
713669

714-
#if !defined(PCI_COMMAND_SERR)
715-
#define PCI_COMMAND_SERR 0x100
716-
#endif
717-
#if !defined(PCI_COMMAND_INTX_DISABLE)
718-
#define PCI_COMMAND_INTX_DISABLE 0x400
719-
#endif
720-
721670
#ifndef PCI_CAP_ID_EXP
722671
#define PCI_CAP_ID_EXP 0x10
723672
#endif
@@ -983,6 +932,7 @@ typedef struct nv_alloc_s {
983932
NvBool unencrypted : 1;
984933
NvBool coherent : 1;
985934
NvBool carveout : 1;
935+
NvBool pool : 1;
986936
} flags;
987937
unsigned int cache_type;
988938
unsigned int num_pages;
@@ -1143,14 +1093,18 @@ typedef struct nv_dma_map_s {
11431093
i++, sm = &dm->mapping.discontig.submaps[i])
11441094

11451095
/*
1146-
* On 4K ARM kernels, use max submap size a multiple of 64K to keep nv-p2p happy.
1147-
* Despite 4K OS pages, we still use 64K P2P pages due to dependent modules still using 64K.
1148-
* Instead of using (4G-4K), use max submap size as (4G-64K) since the mapped IOVA range
1149-
* must be aligned at 64K boundary.
1096+
* On 4K ARM kernels, use max submap size a multiple of 2M to avoid breaking up 2M page size
1097+
* sysmem allocations.
1098+
*
1099+
* Instead of using (4G-4K), use max submap size as (4G-2M) since the mapped IOVA range
1100+
* must be aligned at 2M boundary.
1101+
*
1102+
* Bug 5401803: Tracks migrating away from making IOMMU mappings using submaps in favor of
1103+
* using sg_chain() to chain a single large scatterlist.
11501104
*/
11511105
#if defined(CONFIG_ARM64_4K_PAGES)
11521106
#define NV_DMA_U32_MAX_4K_PAGES ((NvU32)((NV_U32_MAX >> PAGE_SHIFT) + 1))
1153-
#define NV_DMA_SUBMAP_MAX_PAGES ((NvU32)(NV_DMA_U32_MAX_4K_PAGES - 16))
1107+
#define NV_DMA_SUBMAP_MAX_PAGES ((NvU32)(NV_DMA_U32_MAX_4K_PAGES - 512))
11541108
#else
11551109
#define NV_DMA_SUBMAP_MAX_PAGES ((NvU32)(NV_U32_MAX >> PAGE_SHIFT))
11561110
#endif
@@ -1294,7 +1248,8 @@ struct nv_pci_tegra_devfreq_dev;
12941248
typedef struct nv_linux_state_s {
12951249
nv_state_t nv_state;
12961250

1297-
atomic_t usage_count;
1251+
atomic_t usage_count;
1252+
12981253
NvU32 suspend_count;
12991254

13001255
struct device *dev;
@@ -1470,6 +1425,8 @@ typedef struct nv_linux_state_s {
14701425

14711426
int (*devfreq_suspend)(struct device *dev);
14721427
int (*devfreq_resume)(struct device *dev);
1428+
int (*devfreq_enable_boost)(struct device *dev, unsigned int duration);
1429+
int (*devfreq_disable_boost)(struct device *dev);
14731430
#endif
14741431
} nv_linux_state_t;
14751432

@@ -1640,6 +1597,7 @@ extern NvU32 NVreg_EnableUserNUMAManagement;
16401597
extern NvU32 NVreg_RegisterPCIDriver;
16411598
extern NvU32 NVreg_RegisterPlatformDeviceDriver;
16421599
extern NvU32 NVreg_EnableResizableBar;
1600+
extern NvU32 NVreg_TegraGpuPgMask;
16431601
extern NvU32 NVreg_EnableNonblockingOpen;
16441602

16451603
extern NvU32 num_probed_nv_devices;
@@ -1697,10 +1655,7 @@ static inline NvU32 nv_default_irq_flags(nv_state_t *nv)
16971655
return flags;
16981656
}
16991657

1700-
#define MODULE_BASE_NAME "nvidia"
1701-
#define MODULE_INSTANCE_NUMBER 0
1702-
#define MODULE_INSTANCE_STRING ""
1703-
#define MODULE_NAME MODULE_BASE_NAME MODULE_INSTANCE_STRING
1658+
#define MODULE_NAME "nvidia"
17041659

17051660
NvS32 nv_request_soc_irq(nv_linux_state_t *, NvU32, nv_soc_irq_type_t, NvU32, NvU32, const char*);
17061661
NV_STATUS nv_imp_icc_get(nv_state_t *nv);

kernel-open/common/inc/nv-list-helpers.h

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,12 @@
2626
#include <linux/list.h>
2727
#include "conftest.h"
2828

29-
/*
30-
* list_first_entry_or_null added by commit 6d7581e62f8b ("list: introduce
31-
* list_first_entry_or_null") in v3.10 (2013-05-29).
32-
*/
33-
#if !defined(list_first_entry_or_null)
34-
#define list_first_entry_or_null(ptr, type, member) \
35-
(!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL)
36-
#endif
37-
38-
/*
39-
* Added by commit 93be3c2eb337 ("list: introduce list_last_entry(), use
40-
* list_{first,last}_entry()") in v3.13 (2013-11-12).
41-
*/
42-
#if !defined(list_last_entry)
43-
#define list_last_entry(ptr, type, member) \
44-
list_entry((ptr)->prev, type, member)
45-
#endif
46-
4729
/* list_last_entry_or_null() doesn't actually exist in the kernel */
4830
#if !defined(list_last_entry_or_null)
4931
#define list_last_entry_or_null(ptr, type, member) \
5032
(!list_empty(ptr) ? list_last_entry(ptr, type, member) : NULL)
5133
#endif
5234

53-
/*
54-
* list_prev_entry() and list_next_entry added by commit 008208c6b26f
55-
* ("list: introduce list_next_entry() and list_prev_entry()") in
56-
* v3.13 (2013-11-12).
57-
*/
58-
#if !defined(list_prev_entry)
59-
#define list_prev_entry(pos, member) \
60-
list_entry((pos)->member.prev, typeof(*(pos)), member)
61-
#endif
62-
63-
#if !defined(list_next_entry)
64-
#define list_next_entry(pos, member) \
65-
list_entry((pos)->member.next, typeof(*(pos)), member)
66-
#endif
67-
6835
#if !defined(NV_LIST_IS_FIRST_PRESENT)
6936
static inline int list_is_first(const struct list_head *list,
7037
const struct list_head *head)

0 commit comments

Comments
 (0)