Skip to content

Commit 455d4b8

Browse files
committed
580.126.09
1 parent de3d54a commit 455d4b8

File tree

67 files changed

+160873
-160139
lines changed

Some content is hidden

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

67 files changed

+160873
-160139
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.119.02.
4+
version 580.126.09.
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.119.02 driver release. This can be achieved by installing
20+
580.126.09 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.119.02/README/kernel_open.html
188+
https://us.download.nvidia.com/XFree86/Linux-x86_64/580.126.09/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.
@@ -971,6 +971,7 @@ Subsystem Device ID.
971971
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | 2BB4 10DE 204C |
972972
| NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation Edition | 2BB4 17AA 204C |
973973
| NVIDIA RTX PRO 6000 Blackwell Server Edition | 2BB5 10DE 204E |
974+
| NVIDIA RTX PRO 6000 Blackwell Server Edition | 2BB5 10DE 220B |
974975
| NVIDIA RTX 6000D | 2BB9 10DE 2091 |
975976
| NVIDIA GeForce RTX 5080 | 2C02 |
976977
| NVIDIA GeForce RTX 5070 Ti | 2C05 |

kernel-open/Kbuild

Lines changed: 1 addition & 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.119.02\"
82+
ccflags-y += -DNV_VERSION_STRING=\"580.126.09\"
8383

8484
# Include and link Tegra out-of-tree modules.
8585
ifneq ($(wildcard /usr/src/nvidia/nvidia-oot),)

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -693,9 +693,9 @@ static inline dma_addr_t nv_phys_to_dma(struct device *dev, NvU64 pa)
693693
#define NV_PRINT_AT(nv_debug_level,at) \
694694
{ \
695695
nv_printf(nv_debug_level, \
696-
"NVRM: VM: %s:%d: 0x%p, %d page(s), count = %d, " \
696+
"NVRM: VM: %s:%d: 0x%p, %d page(s), count = %lld, " \
697697
"page_table = 0x%p\n", __FUNCTION__, __LINE__, at, \
698-
at->num_pages, NV_ATOMIC_READ(at->usage_count), \
698+
at->num_pages, (long long)atomic64_read(&at->usage_count), \
699699
at->page_table); \
700700
}
701701

@@ -970,7 +970,7 @@ struct nv_dma_buf
970970
typedef struct nv_alloc_s {
971971
struct nv_alloc_s *next;
972972
struct device *dev;
973-
atomic_t usage_count;
973+
atomic64_t usage_count;
974974
struct {
975975
NvBool contig : 1;
976976
NvBool guest : 1;
@@ -1258,6 +1258,10 @@ typedef struct coherent_link_info_s {
12581258
* of virutalized OS environment it is Intermediate Physical Address(IPA) */
12591259
NvU64 gpu_mem_pa;
12601260

1261+
/* Size of the GPU memory mappable through coherent link. It is possible
1262+
that less than whole FB is mapped to CPU. */
1263+
NvU64 gpu_mem_size;
1264+
12611265
/* Physical address of the reserved portion of the GPU memory, applicable
12621266
* only in Grace Hopper self hosted passthrough virtualizatioan platform. */
12631267
NvU64 rsvd_mem_pa;
@@ -1294,7 +1298,7 @@ struct nv_pci_tegra_devfreq_dev;
12941298
typedef struct nv_linux_state_s {
12951299
nv_state_t nv_state;
12961300

1297-
atomic_t usage_count;
1301+
atomic64_t usage_count;
12981302

12991303
NvU32 suspend_count;
13001304

@@ -1670,9 +1674,9 @@ static inline NvBool nv_alloc_release(nv_linux_file_private_t *nvlfp, nv_alloc_t
16701674
{
16711675
NV_PRINT_AT(NV_DBG_MEMINFO, at);
16721676

1673-
if (NV_ATOMIC_DEC_AND_TEST(at->usage_count))
1677+
if (atomic64_dec_and_test(&at->usage_count))
16741678
{
1675-
NV_ATOMIC_INC(at->usage_count);
1679+
atomic64_inc(&at->usage_count);
16761680

16771681
at->next = nvlfp->free_list;
16781682
nvlfp->free_list = at;

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

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,33 @@ static inline struct rw_semaphore *nv_mmap_get_lock(struct mm_struct *mm)
196196
* Commit 45ad9f5290dc updated vma_start_write() to call __vma_start_write().
197197
*/
198198
void nv_vma_start_write(struct vm_area_struct *);
199+
200+
static inline void nv_vma_flags_set_word(struct vm_area_struct *vma, unsigned long flags)
201+
{
202+
nv_vma_start_write(vma);
203+
#if defined(NV_VMA_FLAGS_SET_WORD_PRESENT)
204+
vma_flags_set_word(&vma->flags, flags);
205+
#else
206+
ACCESS_PRIVATE(vma, __vm_flags) |= flags;
199207
#endif
208+
}
209+
210+
static inline void nv_vma_flags_clear_word(struct vm_area_struct *vma, unsigned long flags)
211+
{
212+
nv_vma_start_write(vma);
213+
#if defined(NV_VMA_FLAGS_SET_WORD_PRESENT)
214+
vma_flags_clear_word(&vma->flags, flags);
215+
#else
216+
ACCESS_PRIVATE(vma, __vm_flags) &= ~flags;
217+
#endif
218+
}
219+
#endif // !NV_CAN_CALL_VMA_START_WRITE
200220

201221
static inline void nv_vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
202222
{
203223
#if !NV_CAN_CALL_VMA_START_WRITE
204-
nv_vma_start_write(vma);
205-
ACCESS_PRIVATE(vma, __vm_flags) |= flags;
206-
#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
224+
nv_vma_flags_set_word(vma, flags);
225+
#elif defined(NV_VM_FLAGS_SET_PRESENT)
207226
vm_flags_set(vma, flags);
208227
#else
209228
vma->vm_flags |= flags;
@@ -213,9 +232,8 @@ static inline void nv_vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
213232
static inline void nv_vm_flags_clear(struct vm_area_struct *vma, vm_flags_t flags)
214233
{
215234
#if !NV_CAN_CALL_VMA_START_WRITE
216-
nv_vma_start_write(vma);
217-
ACCESS_PRIVATE(vma, __vm_flags) &= ~flags;
218-
#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)
235+
nv_vma_flags_clear_word(vma, flags);
236+
#elif defined(NV_VM_FLAGS_SET_PRESENT)
219237
vm_flags_clear(vma, flags);
220238
#else
221239
vma->vm_flags &= ~flags;

kernel-open/common/inc/nv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ void NV_API_CALL nv_put_firmware(const void *);
959959
nv_file_private_t* NV_API_CALL nv_get_file_private(NvS32, NvBool, void **);
960960
void NV_API_CALL nv_put_file_private(void *);
961961

962-
NV_STATUS NV_API_CALL nv_get_device_memory_config(nv_state_t *, NvU64 *, NvU64 *, NvU64 *, NvU32 *, NvS32 *);
962+
NV_STATUS NV_API_CALL nv_get_device_memory_config(nv_state_t *, NvU64 *, NvU64 *, NvU64 *, NvU64 *, NvU32 *, NvS32 *);
963963
NV_STATUS NV_API_CALL nv_get_egm_info(nv_state_t *, NvU64 *, NvU64 *, NvS32 *);
964964

965965
void NV_API_CALL nv_p2p_free_platform_data(void *data);

kernel-open/conftest.sh

Lines changed: 154 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,45 @@ compile_test() {
11391139
compile_check_conftest "$CODE" "NV_PFN_ADDRESS_SPACE_STRUCT_PRESENT" "" "types"
11401140
;;
11411141

1142+
irq_bypass_producer_has_token)
1143+
#
1144+
# Determine if 'struct irq_bypass_producer' has 'token' field
1145+
#
1146+
# Added by commit 2b521d86ee80 ("irqbypass: Take ownership of
1147+
# producer/consumer token tracking") in v6.17
1148+
#
1149+
CODE="
1150+
#include <linux/irqbypass.h>
1151+
int conftest_irq_bypass_producer_has_token(void) {
1152+
return offsetof(struct irq_bypass_producer, token);
1153+
}"
1154+
1155+
compile_check_conftest "$CODE" "NV_IRQ_BYPASS_PRODUCER_HAS_TOKEN" "" "types"
1156+
;;
1157+
1158+
irq_bypass_register_producer_has_eventfd_and_irq_args)
1159+
#
1160+
# Determine if irq_bypass_register_producer() function has
1161+
# additional 'eventfd' and 'irq' arguments.
1162+
#
1163+
# Added by commits 2b521d86ee80 ("irqbypass: Take ownership of
1164+
# producer/consumer token tracking") and 23b54381cee2
1165+
# ("irqbypass: Require producers to pass in Linux IRQ number
1166+
# during registration") in v6.17
1167+
#
1168+
CODE="
1169+
#include <linux/irqbypass.h>
1170+
#include <linux/eventfd.h>
1171+
void conftest_irq_bypass_register_producer_has_eventfd_and_irq_args(void) {
1172+
struct irq_bypass_producer *prod = NULL;
1173+
struct eventfd_ctx *eventfd = NULL;
1174+
int irq = 0;
1175+
irq_bypass_register_producer(prod, eventfd, irq);
1176+
}"
1177+
1178+
compile_check_conftest "$CODE" "NV_IRQ_BYPASS_REGISTER_PRODUCER_HAS_EVENTFD_AND_IRQ_ARGS" "" "types"
1179+
;;
1180+
11421181
egm_module_helper_api_present)
11431182
#
11441183
# Determine if egm management api are present or not.
@@ -1351,6 +1390,45 @@ compile_test() {
13511390
compile_check_conftest "$CODE" "NV_GET_DEV_PAGEMAP_HAS_PGMAP_ARG" "" "types"
13521391
;;
13531392

1393+
zone_device_page_init_has_order_arg)
1394+
#
1395+
# Determine if the zone_device_page_init() has an extra argument
1396+
#
1397+
# This change was introduced by d245f9b4ab80
1398+
# ("mm/zone_device: support large zone device private folios")
1399+
#
1400+
# in linux-next, expected in v6.19.
1401+
#
1402+
CODE="
1403+
#include <linux/memremap.h>
1404+
void init_page(void) {
1405+
struct page *page;
1406+
zone_device_page_init(page, 0);
1407+
}"
1408+
compile_check_conftest "$CODE" "NV_ZONE_DEVICE_PAGE_INIT_HAS_ORDER_ARG" "" "types"
1409+
;;
1410+
1411+
dev_pagemap_ops_has_folio_free)
1412+
#
1413+
# Determine if the zone device now uses a folio_free() as the callback
1414+
# function instead of page_free()
1415+
#
1416+
# This change was introduced by 3a5a06554566
1417+
# (mm/zone_device: rename page_free callback to folio_free)
1418+
#
1419+
# in linux-next, expected in v6.19.
1420+
#
1421+
CODE="
1422+
#include <linux/memremap.h>
1423+
void test_folio_free(struct folio *folio) {
1424+
}
1425+
void set_folio_free_ops(void) {
1426+
struct dev_pagemap_ops ops;
1427+
ops.folio_free = test_folio_free;
1428+
}"
1429+
compile_check_conftest "$CODE" "NV_PAGEMAP_OPS_HAS_FOLIO_FREE" "" "types"
1430+
;;
1431+
13541432
drm_available)
13551433
# Determine if the DRM subsystem is usable
13561434
CODE="
@@ -2223,6 +2301,35 @@ compile_test() {
22232301
compile_check_conftest "$CODE" "NV_GET_BACKLIGHT_DEVICE_BY_NAME_PRESENT" "" "functions"
22242302
;;
22252303

2304+
dma_map_ops_has_map_phys)
2305+
#
2306+
# Determine if .map_phys exists in struct dma_map_ops.
2307+
#
2308+
# Commit 14cb413af00c ("dma-mapping: remove unused mapping resource callbacks")
2309+
# removed .map_resource operation and replaced it with .map_phys.
2310+
#
2311+
echo "$CONFTEST_PREAMBLE
2312+
#include <linux/dma-map-ops.h>
2313+
int conftest_dma_map_ops_has_map_phys(void) {
2314+
return offsetof(struct dma_map_ops, map_phys);
2315+
}
2316+
int conftest_dma_map_ops_has_unmap_phys(void) {
2317+
return offsetof(struct dma_map_ops, unmap_phys);
2318+
}" > conftest$$.c
2319+
2320+
$CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
2321+
rm -f conftest$$.c
2322+
2323+
if [ -f conftest$$.o ]; then
2324+
echo "#define NV_DMA_MAP_OPS_HAS_MAP_PHYS" | append_conftest "types"
2325+
rm -f conftest$$.o
2326+
return
2327+
else
2328+
echo "#undef NV_DMA_MAP_OPS_HAS_MAP_PHYS" | append_conftest "types"
2329+
return
2330+
fi
2331+
;;
2332+
22262333
dma_buf_ops_has_map)
22272334
#
22282335
# Determine if .map exists in dma_buf_ops.
@@ -3938,6 +4045,27 @@ compile_test() {
39384045
compile_check_conftest "$CODE" "NV_PCI_REBAR_GET_POSSIBLE_SIZES_PRESENT" "" "functions"
39394046
;;
39404047

4048+
pci_resize_resource_has_exclude_bars_arg)
4049+
#
4050+
# Determine if pci_resize_resource() has exclude_bars argument.
4051+
#
4052+
# exclude_bars argument was added to pci_resize_resource by commit
4053+
# 337b1b566db0 (11/14/2025) ("PCI: Fix restoring BARs on BAR resize rollback path")
4054+
# in linux-next.
4055+
#
4056+
CODE="
4057+
#include <linux/pci.h>
4058+
4059+
typeof(pci_resize_resource) conftest_pci_resize_resource_has_exclude_bars_arg;
4060+
int __must_check conftest_pci_resize_resource_has_exclude_bars_arg(struct pci_dev *dev,
4061+
int i, int size,
4062+
int exclude_bars) {
4063+
return 0;
4064+
}"
4065+
4066+
compile_check_conftest "$CODE" "NV_PCI_RESIZE_RESOURCE_HAS_EXCLUDE_BARS_ARG" "" "types"
4067+
;;
4068+
39414069
drm_connector_has_override_edid)
39424070
#
39434071
# Determine if 'struct drm_connector' has an 'override_edid' member.
@@ -3976,22 +4104,39 @@ compile_test() {
39764104
compile_check_conftest "$CODE" "NV_IOMMU_SVA_BIND_DEVICE_HAS_DRVDATA_ARG" "" "types"
39774105
;;
39784106

3979-
vm_area_struct_has_const_vm_flags)
4107+
vm_flags_set)
39804108
#
3981-
# Determine if the 'vm_area_struct' structure has
3982-
# const 'vm_flags'.
4109+
# Determine if the vm_flags_set() function is present. The
4110+
# presence of this function indicates that the vm_flags_clear()
4111+
# function is also present.
39834112
#
3984-
# A union of '__vm_flags' and 'const vm_flags' was added by
4113+
# The functions vm_flags_set()/ vm_flags_clear() were added by
39854114
# commit bc292ab00f6c ("mm: introduce vma->vm_flags wrapper
3986-
# functions") in v6.3.
4115+
# functions") in v6.3-rc1 (2023-02-09).
39874116
#
39884117
CODE="
3989-
#include <linux/mm_types.h>
3990-
int conftest_vm_area_struct_has_const_vm_flags(void) {
3991-
return offsetof(struct vm_area_struct, __vm_flags);
4118+
#include <linux/mm.h>
4119+
void conftest_vm_flags_set(void) {
4120+
vm_flags_set();
4121+
}"
4122+
4123+
compile_check_conftest "$CODE" "NV_VM_FLAGS_SET_PRESENT" "" "functions"
4124+
;;
4125+
4126+
vma_flags_set_word)
4127+
#
4128+
# Determine if the vma_flags_set_word() function is present.
4129+
#
4130+
# Added by commit c3f7c506e8f1 ("mm: introduce VMA flags bitmap type")
4131+
# in v6.19-rc1.
4132+
#
4133+
CODE="
4134+
#include <linux/mm.h>
4135+
void conftest_vma_flags_set_word(void) {
4136+
vma_flags_set_word();
39924137
}"
39934138

3994-
compile_check_conftest "$CODE" "NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS" "" "types"
4139+
compile_check_conftest "$CODE" "NV_VMA_FLAGS_SET_WORD_PRESENT" "" "functions"
39954140
;;
39964141

39974142
drm_driver_has_dumb_destroy)

kernel-open/nvidia-drm/nvidia-drm-sources.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_plane_create_color_properties
6262
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_atomic_helper_legacy_gamma_set
6363
NV_CONFTEST_FUNCTION_COMPILE_TESTS += vmf_insert_mixed
6464
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_gem_prime_mmap
65+
NV_CONFTEST_FUNCTION_COMPILE_TESTS += vm_flags_set
6566

6667
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_legacy_dev_list
6768
NV_CONFTEST_TYPE_COMPILE_TESTS += vm_ops_fault_removed_vma_arg
@@ -91,7 +92,6 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += reservation_object_reserve_shared_has_num_fenc
9192
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_connector_has_override_edid
9293
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_file_get_master
9394
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_modeset_lock_all_end
94-
NV_CONFTEST_TYPE_COMPILE_TESTS += vm_area_struct_has_const_vm_flags
9595
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_dumb_destroy
9696
NV_CONFTEST_TYPE_COMPILE_TESTS += fence_ops_use_64bit_seqno
9797
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_aperture_remove_conflicting_framebuffers_has_driver_arg

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += migrate_vma_added_flags
6262
NV_CONFTEST_TYPE_COMPILE_TESTS += migrate_device_range
6363
NV_CONFTEST_TYPE_COMPILE_TESTS += handle_mm_fault_has_pt_regs_arg
6464
NV_CONFTEST_TYPE_COMPILE_TESTS += get_dev_pagemap_has_pgmap_arg
65+
NV_CONFTEST_TYPE_COMPILE_TESTS += dev_pagemap_ops_has_folio_free
66+
NV_CONFTEST_TYPE_COMPILE_TESTS += zone_device_page_init_has_order_arg
6567
NV_CONFTEST_TYPE_COMPILE_TESTS += mempolicy_has_unified_nodes
6668
NV_CONFTEST_TYPE_COMPILE_TESTS += mempolicy_has_home_node
6769
NV_CONFTEST_TYPE_COMPILE_TESTS += mpol_preferred_many_present

0 commit comments

Comments
 (0)