Skip to content

Commit c5e439f

Browse files
committed
570.133.07
1 parent 25bef46 commit c5e439f

File tree

146 files changed

+53946
-54730
lines changed

Some content is hidden

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

146 files changed

+53946
-54730
lines changed

README.md

Lines changed: 776 additions & 761 deletions
Large diffs are not rendered by default.

kernel-open/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ EXTRA_CFLAGS += -I$(src)/common/inc
8686
EXTRA_CFLAGS += -I$(src)
8787
EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
8888
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
89-
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"570.124.06\"
89+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"570.133.07\"
9090

9191
ifneq ($(SYSSRCHOST1X),)
9292
EXTRA_CFLAGS += -I$(SYSSRCHOST1X)

kernel-open/common/inc/nv.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,9 @@ typedef struct nv_state_t
498498
NvU32 dispIsoStreamId;
499499
NvU32 dispNisoStreamId;
500500
} iommus;
501+
502+
/* Console is managed by drm drivers or NVKMS */
503+
NvBool client_managed_console;
501504
} nv_state_t;
502505

503506
#define NVFP_TYPE_NONE 0x0
@@ -542,9 +545,9 @@ typedef struct UvmGpuNvlinkInfo_tag *nvgpuNvlinkInfo_t;
542545
typedef struct UvmGpuEccInfo_tag *nvgpuEccInfo_t;
543546
typedef struct UvmGpuFaultInfo_tag *nvgpuFaultInfo_t;
544547
typedef struct UvmGpuAccessCntrInfo_tag *nvgpuAccessCntrInfo_t;
545-
typedef struct UvmGpuAccessCntrConfig_tag *nvgpuAccessCntrConfig_t;
546-
typedef struct UvmGpuInfo_tag nvgpuInfo_t;
547-
typedef struct UvmGpuClientInfo_tag nvgpuClientInfo_t;
548+
typedef struct UvmGpuAccessCntrConfig_tag nvgpuAccessCntrConfig_t;
549+
typedef struct UvmGpuInfo_tag nvgpuInfo_t;
550+
typedef struct UvmGpuClientInfo_tag nvgpuClientInfo_t;
548551
typedef struct UvmPmaAllocationOptions_tag *nvgpuPmaAllocationOptions_t;
549552
typedef struct UvmPmaStatistics_tag *nvgpuPmaStatistics_t;
550553
typedef struct UvmGpuMemoryInfo_tag *nvgpuMemoryInfo_t;

kernel-open/common/inc/nv_uvm_interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ NV_STATUS nvUvmInterfaceDestroyAccessCntrInfo(uvmGpuDeviceHandle device,
10561056
*/
10571057
NV_STATUS nvUvmInterfaceEnableAccessCntr(uvmGpuDeviceHandle device,
10581058
UvmGpuAccessCntrInfo *pAccessCntrInfo,
1059-
UvmGpuAccessCntrConfig *pAccessCntrConfig);
1059+
const UvmGpuAccessCntrConfig *pAccessCntrConfig);
10601060

10611061
/*******************************************************************************
10621062
nvUvmInterfaceDisableAccessCntr

kernel-open/common/inc/nv_uvm_types.h

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,24 +1103,9 @@ typedef enum
11031103
UVM_ACCESS_COUNTER_GRANULARITY_16G = 4,
11041104
} UVM_ACCESS_COUNTER_GRANULARITY;
11051105

1106-
typedef enum
1107-
{
1108-
UVM_ACCESS_COUNTER_USE_LIMIT_NONE = 1,
1109-
UVM_ACCESS_COUNTER_USE_LIMIT_QTR = 2,
1110-
UVM_ACCESS_COUNTER_USE_LIMIT_HALF = 3,
1111-
UVM_ACCESS_COUNTER_USE_LIMIT_FULL = 4,
1112-
} UVM_ACCESS_COUNTER_USE_LIMIT;
1113-
11141106
typedef struct UvmGpuAccessCntrConfig_tag
11151107
{
1116-
NvU32 mimcGranularity;
1117-
1118-
NvU32 momcGranularity;
1119-
1120-
NvU32 mimcUseLimit;
1121-
1122-
NvU32 momcUseLimit;
1123-
1108+
NvU32 granularity;
11241109
NvU32 threshold;
11251110
} UvmGpuAccessCntrConfig;
11261111

kernel-open/common/inc/nvstatuscodes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ NV_STATUS_CODE(NV_ERR_NVLINK_FABRIC_NOT_READY, 0x00000081, "Nvlink Fabri
159159
NV_STATUS_CODE(NV_ERR_NVLINK_FABRIC_FAILURE, 0x00000082, "Nvlink Fabric Probe failed")
160160
NV_STATUS_CODE(NV_ERR_GPU_MEMORY_ONLINING_FAILURE, 0x00000083, "GPU Memory Onlining failed")
161161
NV_STATUS_CODE(NV_ERR_REDUCTION_MANAGER_NOT_AVAILABLE, 0x00000084, "Reduction Manager is not available")
162+
NV_STATUS_CODE(NV_ERR_RESOURCE_RETIREMENT_ERROR, 0x00000086, "An error occurred while trying to retire a resource")
162163

163164
// Warnings:
164165
NV_STATUS_CODE(NV_WARN_HOT_SWITCH, 0x00010001, "WARNING Hot switch")

kernel-open/common/inc/rm-gpu-ops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ NV_STATUS NV_API_CALL rm_gpu_ops_has_pending_non_replayable_faults(nvidia_stack
8181
NV_STATUS NV_API_CALL rm_gpu_ops_init_access_cntr_info(nvidia_stack_t *, nvgpuDeviceHandle_t, nvgpuAccessCntrInfo_t, NvU32);
8282
NV_STATUS NV_API_CALL rm_gpu_ops_destroy_access_cntr_info(nvidia_stack_t *, nvgpuDeviceHandle_t, nvgpuAccessCntrInfo_t);
8383
NV_STATUS NV_API_CALL rm_gpu_ops_own_access_cntr_intr(nvidia_stack_t *, nvgpuSessionHandle_t, nvgpuAccessCntrInfo_t, NvBool);
84-
NV_STATUS NV_API_CALL rm_gpu_ops_enable_access_cntr(nvidia_stack_t *, nvgpuDeviceHandle_t, nvgpuAccessCntrInfo_t, nvgpuAccessCntrConfig_t);
84+
NV_STATUS NV_API_CALL rm_gpu_ops_enable_access_cntr(nvidia_stack_t *, nvgpuDeviceHandle_t, nvgpuAccessCntrInfo_t, const nvgpuAccessCntrConfig_t *);
8585
NV_STATUS NV_API_CALL rm_gpu_ops_disable_access_cntr(nvidia_stack_t *, nvgpuDeviceHandle_t, nvgpuAccessCntrInfo_t);
8686
NV_STATUS NV_API_CALL rm_gpu_ops_set_page_directory (nvidia_stack_t *, nvgpuAddressSpaceHandle_t, NvU64, unsigned, NvBool, NvU32);
8787
NV_STATUS NV_API_CALL rm_gpu_ops_unset_page_directory (nvidia_stack_t *, nvgpuAddressSpaceHandle_t);

kernel-open/conftest.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5289,6 +5289,45 @@ compile_test() {
52895289

52905290
compile_check_conftest "$CODE" "NV_FOLLOW_PFN_PRESENT" "" "functions"
52915291
;;
5292+
5293+
follow_pte_arg_vma)
5294+
#
5295+
# Determine if the first argument of follow_pte is
5296+
# mm_struct or vm_area_struct.
5297+
#
5298+
# The first argument was changed from mm_struct to vm_area_struct by
5299+
# commit 29ae7d96d166 ("mm: pass VMA instead of MM to follow_pte()")
5300+
#
5301+
CODE="
5302+
#include <linux/mm.h>
5303+
5304+
typeof(follow_pte) conftest_follow_pte_has_vma_arg;
5305+
int conftest_follow_pte_has_vma_arg(struct vm_area_struct *vma,
5306+
unsigned long address,
5307+
pte_t **ptep,
5308+
spinlock_t **ptl) {
5309+
return 0;
5310+
}"
5311+
5312+
compile_check_conftest "$CODE" "NV_FOLLOW_PTE_ARG1_VMA" "" "types"
5313+
;;
5314+
5315+
ptep_get)
5316+
#
5317+
# Determine if ptep_get() is present.
5318+
#
5319+
# ptep_get() was added by commit 481e980a7c19
5320+
# ("mm: Allow arches to provide ptep_get()")
5321+
#
5322+
CODE="
5323+
#include <linux/mm.h>
5324+
void conftest_ptep_get(void) {
5325+
ptep_get();
5326+
}"
5327+
5328+
compile_check_conftest "$CODE" "NV_PTEP_GET_PRESENT" "" "functions"
5329+
;;
5330+
52925331
drm_plane_atomic_check_has_atomic_state_arg)
52935332
#
52945333
# Determine if drm_plane_helper_funcs::atomic_check takes 'state'

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ NVIDIA_UVM_SOURCES += nvidia-uvm/uvm_volta_host.c
5959
NVIDIA_UVM_SOURCES += nvidia-uvm/uvm_volta_mmu.c
6060
NVIDIA_UVM_SOURCES += nvidia-uvm/uvm_volta.c
6161
NVIDIA_UVM_SOURCES += nvidia-uvm/uvm_volta_fault_buffer.c
62-
NVIDIA_UVM_SOURCES += nvidia-uvm/uvm_volta_access_counter_buffer.c
6362
NVIDIA_UVM_SOURCES += nvidia-uvm/uvm_turing.c
6463
NVIDIA_UVM_SOURCES += nvidia-uvm/uvm_turing_access_counter_buffer.c
6564
NVIDIA_UVM_SOURCES += nvidia-uvm/uvm_turing_fault_buffer.c

kernel-open/nvidia-uvm/uvm.c

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static void uvm_release_deferred(void *data)
240240
// Since this function is only scheduled to run when uvm_release() fails
241241
// to trylock-acquire the pm.lock, the following acquisition attempt
242242
// is expected to block this thread, and cause it to remain blocked until
243-
// uvm_resume() releases the lock. As a result, the deferred release
243+
// uvm_resume() releases the lock. As a result, the deferred release
244244
// kthread queue may stall for long periods of time.
245245
uvm_down_read(&g_uvm_global.pm.lock);
246246

@@ -292,14 +292,14 @@ static int uvm_release(struct inode *inode, struct file *filp)
292292

293293
// Because the kernel discards the status code returned from this release
294294
// callback, early exit in case of a pm.lock acquisition failure is not
295-
// an option. Instead, the teardown work normally performed synchronously
295+
// an option. Instead, the teardown work normally performed synchronously
296296
// needs to be scheduled to run after uvm_resume() releases the lock.
297297
if (uvm_down_read_trylock(&g_uvm_global.pm.lock)) {
298298
uvm_va_space_destroy(va_space);
299299
uvm_up_read(&g_uvm_global.pm.lock);
300300
}
301301
else {
302-
// Remove references to this inode from the address_space. This isn't
302+
// Remove references to this inode from the address_space. This isn't
303303
// strictly necessary, as any CPU mappings of this file have already
304304
// been destroyed, and va_space->mapping won't be used again. Still,
305305
// the va_space survives the inode if its destruction is deferred, in
@@ -867,8 +867,8 @@ static int uvm_mmap(struct file *filp, struct vm_area_struct *vma)
867867
}
868868

869869
// If the PM lock cannot be acquired, disable the VMA and report success
870-
// to the caller. The caller is expected to determine whether the
871-
// map operation succeeded via an ioctl() call. This is necessary to
870+
// to the caller. The caller is expected to determine whether the
871+
// map operation succeeded via an ioctl() call. This is necessary to
872872
// safely handle MAP_FIXED, which needs to complete atomically to prevent
873873
// the loss of the virtual address range.
874874
if (!uvm_down_read_trylock(&g_uvm_global.pm.lock)) {
@@ -1233,19 +1233,8 @@ static int uvm_init(void)
12331233
goto error;
12341234
}
12351235

1236-
pr_info("Loaded the UVM driver, major device number %d.\n", MAJOR(g_uvm_base_dev));
1237-
12381236
if (uvm_enable_builtin_tests)
1239-
pr_info("Built-in UVM tests are enabled. This is a security risk.\n");
1240-
1241-
// After Open RM is released, both the enclosing "#if" and this comment
1242-
// block should be removed, because the uvm_hmm_is_enabled_system_wide()
1243-
// check is both necessary and sufficient for reporting functionality.
1244-
// Until that time, however, we need to avoid advertisting UVM's ability to
1245-
// enable HMM functionality.
1246-
1247-
if (uvm_hmm_is_enabled_system_wide())
1248-
UVM_INFO_PRINT("HMM (Heterogeneous Memory Management) is enabled in the UVM driver.\n");
1237+
UVM_INFO_PRINT("Built-in UVM tests are enabled. This is a security risk.\n");
12491238

12501239
return 0;
12511240

@@ -1274,8 +1263,6 @@ static void uvm_exit(void)
12741263
uvm_global_exit();
12751264

12761265
uvm_test_unload_state_exit();
1277-
1278-
pr_info("Unloaded the UVM driver.\n");
12791266
}
12801267

12811268
static void __exit uvm_exit_entry(void)

0 commit comments

Comments
 (0)