Skip to content

Commit 60d85c4

Browse files
committed
535.216.01
1 parent c588c38 commit 60d85c4

File tree

92 files changed

+1170
-1207
lines changed

Some content is hidden

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

92 files changed

+1170
-1207
lines changed

CHANGELOG.md

Lines changed: 0 additions & 192 deletions
This file was deleted.

README.md

Lines changed: 4 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.183.06.
4+
version 535.216.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-
535.183.06 driver release. This can be achieved by installing
20+
535.216.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

@@ -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.183.06 release,
183+
(see the table below). However, in the 535.216.01 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.183.06/README/kernel_open.html
191+
https://us.download.nvidia.com/XFree86/Linux-x86_64/535.216.01/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

kernel-open/Kbuild

Lines changed: 1 addition & 1 deletion
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.183.06\"
75+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"535.216.01\"
7676

7777
ifneq ($(SYSSRCHOST1X),)
7878
EXTRA_CFLAGS += -I$(SYSSRCHOST1X)

kernel-open/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ else
2828
else
2929
KERNEL_UNAME ?= $(shell uname -r)
3030
KERNEL_MODLIB := /lib/modules/$(KERNEL_UNAME)
31-
KERNEL_SOURCES := $(shell test -d $(KERNEL_MODLIB)/source && echo $(KERNEL_MODLIB)/source || echo $(KERNEL_MODLIB)/build)
31+
KERNEL_SOURCES := $(shell ((test -d $(KERNEL_MODLIB)/source && echo $(KERNEL_MODLIB)/source) || (test -d $(KERNEL_MODLIB)/build/source && echo $(KERNEL_MODLIB)/build/source)) || echo $(KERNEL_MODLIB)/build)
3232
endif
3333

3434
KERNEL_OUTPUT := $(KERNEL_SOURCES)
@@ -42,7 +42,11 @@ else
4242
else
4343
KERNEL_UNAME ?= $(shell uname -r)
4444
KERNEL_MODLIB := /lib/modules/$(KERNEL_UNAME)
45-
ifeq ($(KERNEL_SOURCES), $(KERNEL_MODLIB)/source)
45+
# $(filter patter...,text) - Returns all whitespace-separated words in text that
46+
# do match any of the pattern words, removing any words that do not match.
47+
# Set the KERNEL_OUTPUT only if either $(KERNEL_MODLIB)/source or
48+
# $(KERNEL_MODLIB)/build/source path matches the KERNEL_SOURCES.
49+
ifneq ($(filter $(KERNEL_SOURCES),$(KERNEL_MODLIB)/source $(KERNEL_MODLIB)/build/source),)
4650
KERNEL_OUTPUT := $(KERNEL_MODLIB)/build
4751
KBUILD_PARAMS := KBUILD_OUTPUT=$(KERNEL_OUTPUT)
4852
endif

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

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ typedef enum _HYPERVISOR_TYPE
3737
OS_HYPERVISOR_UNKNOWN
3838
} HYPERVISOR_TYPE;
3939

40-
#define CMD_VGPU_VFIO_WAKE_WAIT_QUEUE 0
41-
#define CMD_VGPU_VFIO_INJECT_INTERRUPT 1
42-
#define CMD_VGPU_VFIO_REGISTER_MDEV 2
43-
#define CMD_VGPU_VFIO_PRESENT 3
44-
#define CMD_VFIO_PCI_CORE_PRESENT 4
40+
#define CMD_VFIO_WAKE_REMOVE_GPU 1
41+
#define CMD_VGPU_VFIO_PRESENT 2
42+
#define CMD_VFIO_PCI_CORE_PRESENT 3
4543

46-
#define MAX_VF_COUNT_PER_GPU 64
44+
#define MAX_VF_COUNT_PER_GPU 64
4745

4846
typedef enum _VGPU_TYPE_INFO
4947
{
@@ -54,17 +52,11 @@ typedef enum _VGPU_TYPE_INFO
5452

5553
typedef struct
5654
{
57-
void *vgpuVfioRef;
58-
void *waitQueue;
5955
void *nv;
60-
NvU32 *vgpuTypeIds;
61-
NvU8 **vgpuNames;
62-
NvU32 numVgpuTypes;
63-
NvU32 domain;
64-
NvU8 bus;
65-
NvU8 slot;
66-
NvU8 function;
67-
NvBool is_virtfn;
56+
NvU32 domain;
57+
NvU32 bus;
58+
NvU32 device;
59+
NvU32 return_status;
6860
} vgpu_vfio_info;
6961

7062
typedef struct

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ static inline void *nv_vmalloc(unsigned long size)
499499
void *ptr = __vmalloc(size, GFP_KERNEL);
500500
#endif
501501
if (ptr)
502+
{
502503
NV_MEMDBG_ADD(ptr, size);
504+
}
503505
return ptr;
504506
}
505507

@@ -517,7 +519,9 @@ static inline void *nv_ioremap(NvU64 phys, NvU64 size)
517519
void *ptr = ioremap(phys, size);
518520
#endif
519521
if (ptr)
522+
{
520523
NV_MEMDBG_ADD(ptr, size);
524+
}
521525
return ptr;
522526
}
523527

@@ -553,8 +557,9 @@ static inline void *nv_ioremap_cache(NvU64 phys, NvU64 size)
553557
#endif
554558

555559
if (ptr)
560+
{
556561
NV_MEMDBG_ADD(ptr, size);
557-
562+
}
558563
return ptr;
559564
}
560565

@@ -570,8 +575,9 @@ static inline void *nv_ioremap_wc(NvU64 phys, NvU64 size)
570575
#endif
571576

572577
if (ptr)
578+
{
573579
NV_MEMDBG_ADD(ptr, size);
574-
580+
}
575581
return ptr;
576582
}
577583

@@ -700,7 +706,9 @@ static inline NvUPtr nv_vmap(struct page **pages, NvU32 page_count,
700706
/* All memory cached in PPC64LE; can't honor 'cached' input. */
701707
ptr = vmap(pages, page_count, VM_MAP, prot);
702708
if (ptr)
709+
{
703710
NV_MEMDBG_ADD(ptr, page_count * PAGE_SIZE);
711+
}
704712
return (NvUPtr)ptr;
705713
}
706714

@@ -1603,6 +1611,10 @@ typedef struct nv_linux_state_s {
16031611

16041612
struct nv_dma_device dma_dev;
16051613
struct nv_dma_device niso_dma_dev;
1614+
#if defined(NV_VGPU_KVM_BUILD)
1615+
wait_queue_head_t wait;
1616+
NvS32 return_status;
1617+
#endif
16061618
} nv_linux_state_t;
16071619

16081620
extern nv_linux_state_t *nv_linux_devices;

kernel-open/common/inc/nv.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,12 +1034,11 @@ NV_STATUS NV_API_CALL nv_vgpu_create_request(nvidia_stack_t *, nv_state_t *, c
10341034
NV_STATUS NV_API_CALL nv_vgpu_delete(nvidia_stack_t *, const NvU8 *, NvU16);
10351035
NV_STATUS NV_API_CALL nv_vgpu_get_type_ids(nvidia_stack_t *, nv_state_t *, NvU32 *, NvU32 *, NvBool, NvU8, NvBool);
10361036
NV_STATUS NV_API_CALL nv_vgpu_get_type_info(nvidia_stack_t *, nv_state_t *, NvU32, char *, int, NvU8);
1037-
NV_STATUS NV_API_CALL nv_vgpu_get_bar_info(nvidia_stack_t *, nv_state_t *, const NvU8 *, NvU64 *, NvU32, void *);
1038-
NV_STATUS NV_API_CALL nv_vgpu_start(nvidia_stack_t *, const NvU8 *, void *, NvS32 *, NvU8 *, NvU32);
1039-
NV_STATUS NV_API_CALL nv_vgpu_get_sparse_mmap(nvidia_stack_t *, nv_state_t *, const NvU8 *, NvU64 **, NvU64 **, NvU32 *);
1037+
NV_STATUS NV_API_CALL nv_vgpu_get_bar_info(nvidia_stack_t *, nv_state_t *, const NvU8 *, NvU64 *,
1038+
NvU64 *, NvU64 *, NvU32 *, NvU8 *);
10401039
NV_STATUS NV_API_CALL nv_vgpu_process_vf_info(nvidia_stack_t *, nv_state_t *, NvU8, NvU32, NvU8, NvU8, NvU8, NvBool, void *);
1041-
NV_STATUS NV_API_CALL nv_vgpu_update_request(nvidia_stack_t *, const NvU8 *, NvU32, NvU64 *, NvU64 *, const char *);
1042-
NV_STATUS NV_API_CALL nv_gpu_bind_event(nvidia_stack_t *);
1040+
NV_STATUS NV_API_CALL nv_gpu_bind_event(nvidia_stack_t *, NvU32, NvBool *);
1041+
NV_STATUS NV_API_CALL nv_gpu_unbind_event(nvidia_stack_t *, NvU32, NvBool *);
10431042

10441043
NV_STATUS NV_API_CALL nv_get_usermap_access_params(nv_state_t*, nv_usermap_access_params_t*);
10451044
nv_soc_irq_type_t NV_API_CALL nv_get_current_irq_type(nv_state_t*);

0 commit comments

Comments
 (0)