Skip to content

Commit e45d91d

Browse files
committed
550.90.07
1 parent 083cd9c commit e45d91d

File tree

180 files changed

+43424
-38084
lines changed

Some content is hidden

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

180 files changed

+43424
-38084
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Release 550 Entries
44

5+
### [550.90.07] 2024-06-04
6+
57
### [550.78] 2024-04-25
68

79
### [550.76] 2024-04-17

README.md

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

@@ -188,7 +188,7 @@ encountered specific to them.
188188
For details on feature support and limitations, see the NVIDIA GPU driver
189189
end user README here:
190190

191-
https://us.download.nvidia.com/XFree86/Linux-x86_64/550.78/README/kernel_open.html
191+
https://us.download.nvidia.com/XFree86/Linux-x86_64/550.90.07/README/kernel_open.html
192192

193193
For vGPU support, please refer to the README.vgpu packaged in the vGPU Host
194194
Package for more details.
@@ -757,6 +757,8 @@ Subsystem Device ID.
757757
| NVIDIA H100 80GB HBM3 | 2330 10DE 16C0 |
758758
| NVIDIA H100 80GB HBM3 | 2330 10DE 16C1 |
759759
| NVIDIA H100 PCIe | 2331 10DE 1626 |
760+
| NVIDIA H200 | 2335 10DE 18BE |
761+
| NVIDIA H200 | 2335 10DE 18BF |
760762
| NVIDIA H100 | 2339 10DE 17FC |
761763
| NVIDIA H800 NVL | 233A 10DE 183A |
762764
| NVIDIA GH200 120GB | 2342 10DE 16EB |
@@ -873,6 +875,7 @@ Subsystem Device ID.
873875
| NVIDIA L40S | 26B9 10DE 1851 |
874876
| NVIDIA L40S | 26B9 10DE 18CF |
875877
| NVIDIA L20 | 26BA 10DE 1957 |
878+
| NVIDIA L20 | 26BA 10DE 1990 |
876879
| NVIDIA GeForce RTX 4080 SUPER | 2702 |
877880
| NVIDIA GeForce RTX 4080 | 2704 |
878881
| NVIDIA GeForce RTX 4070 Ti SUPER | 2705 |

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-format-extra-args
7474
EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
75-
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"550.78\"
75+
EXTRA_CFLAGS += -DNV_VERSION_STRING=\"550.90.07\"
7676

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

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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,10 @@ typedef struct nv_linux_state_s {
16141614
nv_kthread_q_t open_q;
16151615
NvBool is_accepting_opens;
16161616
struct semaphore open_q_lock;
1617+
#if defined(NV_VGPU_KVM_BUILD)
1618+
wait_queue_head_t wait;
1619+
NvS32 return_status;
1620+
#endif
16171621
} nv_linux_state_t;
16181622

16191623
extern nv_linux_state_t *nv_linux_devices;

kernel-open/common/inc/nv.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,13 +1041,12 @@ NV_STATUS NV_API_CALL nv_vgpu_create_request(nvidia_stack_t *, nv_state_t *, c
10411041
NV_STATUS NV_API_CALL nv_vgpu_delete(nvidia_stack_t *, const NvU8 *, NvU16);
10421042
NV_STATUS NV_API_CALL nv_vgpu_get_type_ids(nvidia_stack_t *, nv_state_t *, NvU32 *, NvU32 *, NvBool, NvU8, NvBool);
10431043
NV_STATUS NV_API_CALL nv_vgpu_get_type_info(nvidia_stack_t *, nv_state_t *, NvU32, char *, int, NvU8);
1044-
NV_STATUS NV_API_CALL nv_vgpu_get_bar_info(nvidia_stack_t *, nv_state_t *, const NvU8 *, NvU64 *, NvU32, void *, NvBool *);
1044+
NV_STATUS NV_API_CALL nv_vgpu_get_bar_info(nvidia_stack_t *, nv_state_t *, const NvU8 *, NvU64 *,
1045+
NvU64 *, NvU64 *, NvU32 *, NvBool *, NvU8 *);
10451046
NV_STATUS NV_API_CALL nv_vgpu_get_hbm_info(nvidia_stack_t *, nv_state_t *, const NvU8 *, NvU64 *, NvU64 *);
1046-
NV_STATUS NV_API_CALL nv_vgpu_start(nvidia_stack_t *, const NvU8 *, void *, NvS32 *, NvU8 *, NvU32);
1047-
NV_STATUS NV_API_CALL nv_vgpu_get_sparse_mmap(nvidia_stack_t *, nv_state_t *, const NvU8 *, NvU64 **, NvU64 **, NvU32 *);
10481047
NV_STATUS NV_API_CALL nv_vgpu_process_vf_info(nvidia_stack_t *, nv_state_t *, NvU8, NvU32, NvU8, NvU8, NvU8, NvBool, void *);
1049-
NV_STATUS NV_API_CALL nv_vgpu_update_request(nvidia_stack_t *, const NvU8 *, NvU32, NvU64 *, NvU64 *, const char *);
10501048
NV_STATUS NV_API_CALL nv_gpu_bind_event(nvidia_stack_t *);
1049+
NV_STATUS NV_API_CALL nv_gpu_unbind_event(nvidia_stack_t *, NvU32, NvBool *);
10511050

10521051
NV_STATUS NV_API_CALL nv_get_usermap_access_params(nv_state_t*, nv_usermap_access_params_t*);
10531052
nv_soc_irq_type_t NV_API_CALL nv_get_current_irq_type(nv_state_t*);

kernel-open/common/inc/nv_uvm_interface.h

Lines changed: 72 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2013-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2013-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
@@ -1505,41 +1505,49 @@ NV_STATUS nvUvmInterfaceCslInitContext(UvmCslContext *uvmCslContext,
15051505
void nvUvmInterfaceDeinitCslContext(UvmCslContext *uvmCslContext);
15061506

15071507
/*******************************************************************************
1508-
nvUvmInterfaceCslUpdateContext
1508+
nvUvmInterfaceCslRotateKey
15091509
1510-
Updates a context after a key rotation event and can only be called once per
1511-
key rotation event. Following a key rotation event, and before
1512-
nvUvmInterfaceCslUpdateContext is called, data encrypted by the GPU with the
1513-
previous key can be decrypted with nvUvmInterfaceCslDecrypt.
1510+
Disables channels and rotates keys.
15141511
1515-
Locking: This function acquires an API lock.
1516-
Memory : This function does not dynamically allocate memory.
1512+
This function disables channels and rotates associated keys. The channels
1513+
associated with the given CSL contexts must be idled before this function is
1514+
called. To trigger key rotation all allocated channels for a given key must
1515+
be present in the list. If the function returns successfully then the CSL
1516+
contexts have been updated with the new key.
15171517
1518-
Arguments:
1519-
uvmCslContext[IN] - The CSL context associated with a channel.
1518+
Locking: This function attempts to acquire the GPU lock. In case of failure
1519+
to acquire the return code is NV_ERR_STATE_IN_USE. The caller must
1520+
guarantee that no CSL function, including this one, is invoked
1521+
concurrently with the CSL contexts in contextList.
1522+
Memory : This function dynamically allocates memory.
15201523
1524+
Arguments:
1525+
contextList[IN/OUT] - An array of pointers to CSL contexts.
1526+
contextListCount[IN] - Number of CSL contexts in contextList. Its value
1527+
must be greater than 0.
15211528
Error codes:
1522-
NV_ERR_INVALID_ARGUMENT - The CSL context is not associated with a channel.
1529+
NV_ERR_INVALID_ARGUMENT - contextList is NULL or contextListCount is 0.
1530+
NV_ERR_STATE_IN_USE - Unable to acquire lock / resource. Caller
1531+
can retry at a later time.
1532+
NV_ERR_GENERIC - A failure other than _STATE_IN_USE occurred
1533+
when attempting to acquire a lock.
15231534
*/
1524-
NV_STATUS nvUvmInterfaceCslUpdateContext(UvmCslContext *uvmCslContext);
1535+
NV_STATUS nvUvmInterfaceCslRotateKey(UvmCslContext *contextList[],
1536+
NvU32 contextListCount);
15251537

15261538
/*******************************************************************************
15271539
nvUvmInterfaceCslRotateIv
15281540
15291541
Rotates the IV for a given channel and operation.
15301542
15311543
This function will rotate the IV on both the CPU and the GPU.
1532-
Outstanding messages that have been encrypted by the GPU should first be
1533-
decrypted before calling this function with operation equal to
1534-
UVM_CSL_OPERATION_DECRYPT. Similarly, outstanding messages that have been
1535-
encrypted by the CPU should first be decrypted before calling this function
1536-
with operation equal to UVM_CSL_OPERATION_ENCRYPT. For a given operation
1537-
the channel must be idle before calling this function. This function can be
1538-
called regardless of the value of the IV's message counter.
1539-
1540-
Locking: This function attempts to acquire the GPU lock.
1541-
In case of failure to acquire the return code
1542-
is NV_ERR_STATE_IN_USE.
1544+
For a given operation the channel must be idle before calling this function.
1545+
This function can be called regardless of the value of the IV's message counter.
1546+
1547+
Locking: This function attempts to acquire the GPU lock. In case of failure to
1548+
acquire the return code is NV_ERR_STATE_IN_USE. The caller must guarantee
1549+
that no CSL function, including this one, is invoked concurrently with
1550+
the same CSL context.
15431551
Memory : This function does not dynamically allocate memory.
15441552
15451553
Arguments:
@@ -1573,8 +1581,8 @@ NV_STATUS nvUvmInterfaceCslRotateIv(UvmCslContext *uvmCslContext,
15731581
However, it is optional. If it is NULL, the next IV in line will be used.
15741582
15751583
Locking: This function does not acquire an API or GPU lock.
1576-
If called concurrently in different threads with the same UvmCslContext
1577-
the caller must guarantee exclusion.
1584+
The caller must guarantee that no CSL function, including this one,
1585+
is invoked concurrently with the same CSL context.
15781586
Memory : This function does not dynamically allocate memory.
15791587
15801588
Arguments:
@@ -1610,9 +1618,14 @@ NV_STATUS nvUvmInterfaceCslEncrypt(UvmCslContext *uvmCslContext,
16101618
maximized when the input and output buffers are 16-byte aligned. This is
16111619
natural alignment for AES block.
16121620
1621+
During a key rotation event the previous key is stored in the CSL context.
1622+
This allows data encrypted by the GPU to be decrypted with the previous key.
1623+
The keyRotationId parameter identifies which key is used. The first key rotation
1624+
ID has a value of 0 that increments by one for each key rotation event.
1625+
16131626
Locking: This function does not acquire an API or GPU lock.
1614-
If called concurrently in different threads with the same UvmCslContext
1615-
the caller must guarantee exclusion.
1627+
The caller must guarantee that no CSL function, including this one,
1628+
is invoked concurrently with the same CSL context.
16161629
Memory : This function does not dynamically allocate memory.
16171630
16181631
Arguments:
@@ -1622,6 +1635,8 @@ NV_STATUS nvUvmInterfaceCslEncrypt(UvmCslContext *uvmCslContext,
16221635
decryptIv[IN] - IV used to decrypt the ciphertext. Its value can either be given by
16231636
nvUvmInterfaceCslIncrementIv, or, if NULL, the CSL context's
16241637
internal counter is used.
1638+
keyRotationId[IN] - Specifies the key that is used for decryption.
1639+
A value of NV_U32_MAX specifies the current key.
16251640
inputBuffer[IN] - Address of ciphertext input buffer.
16261641
outputBuffer[OUT] - Address of plaintext output buffer.
16271642
addAuthData[IN] - Address of the plaintext additional authenticated data used to
@@ -1642,6 +1657,7 @@ NV_STATUS nvUvmInterfaceCslDecrypt(UvmCslContext *uvmCslContext,
16421657
NvU32 bufferSize,
16431658
NvU8 const *inputBuffer,
16441659
UvmCslIv const *decryptIv,
1660+
NvU32 keyRotationId,
16451661
NvU8 *outputBuffer,
16461662
NvU8 const *addAuthData,
16471663
NvU32 addAuthDataSize,
@@ -1656,8 +1672,8 @@ NV_STATUS nvUvmInterfaceCslDecrypt(UvmCslContext *uvmCslContext,
16561672
undefined behavior.
16571673
16581674
Locking: This function does not acquire an API or GPU lock.
1659-
If called concurrently in different threads with the same UvmCslContext
1660-
the caller must guarantee exclusion.
1675+
The caller must guarantee that no CSL function, including this one,
1676+
is invoked concurrently with the same CSL context.
16611677
Memory : This function does not dynamically allocate memory.
16621678
16631679
Arguments:
@@ -1685,8 +1701,8 @@ NV_STATUS nvUvmInterfaceCslSign(UvmCslContext *uvmCslContext,
16851701
16861702
Locking: This function does not acquire an API or GPU lock.
16871703
Memory : This function does not dynamically allocate memory.
1688-
If called concurrently in different threads with the same UvmCslContext
1689-
the caller must guarantee exclusion.
1704+
The caller must guarantee that no CSL function, including this one,
1705+
is invoked concurrently with the same CSL context.
16901706
16911707
Arguments:
16921708
uvmCslContext[IN/OUT] - The CSL context.
@@ -1711,8 +1727,8 @@ NV_STATUS nvUvmInterfaceCslQueryMessagePool(UvmCslContext *uvmCslContext,
17111727
the returned IV can be used in nvUvmInterfaceCslDecrypt.
17121728
17131729
Locking: This function does not acquire an API or GPU lock.
1714-
If called concurrently in different threads with the same UvmCslContext
1715-
the caller must guarantee exclusion.
1730+
The caller must guarantee that no CSL function, including this one,
1731+
is invoked concurrently with the same CSL context.
17161732
Memory : This function does not dynamically allocate memory.
17171733
17181734
Arguments:
@@ -1734,28 +1750,41 @@ NV_STATUS nvUvmInterfaceCslIncrementIv(UvmCslContext *uvmCslContext,
17341750
UvmCslIv *iv);
17351751

17361752
/*******************************************************************************
1737-
nvUvmInterfaceCslLogExternalEncryption
1753+
nvUvmInterfaceCslLogEncryption
1754+
1755+
Checks and logs information about encryptions associated with the given
1756+
CSL context.
17381757
1739-
Checks and logs information about non-CSL encryptions, such as those that
1740-
originate from the GPU.
1758+
For contexts associated with channels, this function does not modify elements of
1759+
the UvmCslContext, and must be called for every CPU/GPU encryption.
17411760
1742-
This function does not modify elements of the UvmCslContext.
1761+
For the context associated with fault buffers, bufferSize can encompass multiple
1762+
encryption invocations, and the UvmCslContext will be updated following a key
1763+
rotation event.
1764+
1765+
In either case the IV remains unmodified after this function is called.
17431766
17441767
Locking: This function does not acquire an API or GPU lock.
17451768
Memory : This function does not dynamically allocate memory.
1746-
If called concurrently in different threads with the same UvmCslContext
1747-
the caller must guarantee exclusion.
1769+
The caller must guarantee that no CSL function, including this one,
1770+
is invoked concurrently with the same CSL context.
17481771
17491772
Arguments:
17501773
uvmCslContext[IN/OUT] - The CSL context.
1751-
bufferSize[OUT] - The size of the buffer encrypted by the
1774+
operation[IN] - If the CSL context is associated with a fault
1775+
buffer, this argument is ignored. If it is
1776+
associated with a channel, it must be either
1777+
- UVM_CSL_OPERATION_ENCRYPT
1778+
- UVM_CSL_OPERATION_DECRYPT
1779+
bufferSize[IN] - The size of the buffer(s) encrypted by the
17521780
external entity in units of bytes.
17531781
17541782
Error codes:
1755-
NV_ERR_INSUFFICIENT_RESOURCES - The device encryption would cause a counter
1783+
NV_ERR_INSUFFICIENT_RESOURCES - The encryption would cause a counter
17561784
to overflow.
17571785
*/
1758-
NV_STATUS nvUvmInterfaceCslLogExternalEncryption(UvmCslContext *uvmCslContext,
1759-
NvU32 bufferSize);
1786+
NV_STATUS nvUvmInterfaceCslLogEncryption(UvmCslContext *uvmCslContext,
1787+
UvmCslOperation operation,
1788+
NvU32 bufferSize);
17601789

17611790
#endif // _NV_UVM_INTERFACE_H_

kernel-open/common/inc/nv_uvm_types.h

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ typedef struct UvmGpuChannelInfo_tag
267267

268268
// The errorNotifier is filled out when the channel hits an RC error.
269269
NvNotification *errorNotifier;
270+
NvNotification *keyRotationNotifier;
270271

271272
NvU32 hwRunlistId;
272273
NvU32 hwChannelId;
@@ -292,13 +293,13 @@ typedef struct UvmGpuChannelInfo_tag
292293

293294
// GPU VAs of both GPFIFO and GPPUT are needed in Confidential Computing
294295
// so a channel can be controlled via another channel (SEC2 or WLC/LCIC)
295-
NvU64 gpFifoGpuVa;
296-
NvU64 gpPutGpuVa;
297-
NvU64 gpGetGpuVa;
296+
NvU64 gpFifoGpuVa;
297+
NvU64 gpPutGpuVa;
298+
NvU64 gpGetGpuVa;
298299
// GPU VA of work submission offset is needed in Confidential Computing
299300
// so CE channels can ring doorbell of other channels as required for
300301
// WLC/LCIC work submission
301-
NvU64 workSubmissionOffsetGpuVa;
302+
NvU64 workSubmissionOffsetGpuVa;
302303
} UvmGpuChannelInfo;
303304

304305
typedef enum
@@ -604,6 +605,8 @@ typedef struct UvmGpuConfComputeCaps_tag
604605
{
605606
// Out: GPU's confidential compute mode
606607
UvmGpuConfComputeMode mode;
608+
// Is key rotation enabled for UVM keys
609+
NvBool bKeyRotationEnabled;
607610
} UvmGpuConfComputeCaps;
608611

609612
#define UVM_GPU_NAME_LENGTH 0x40
@@ -1086,4 +1089,21 @@ typedef enum UvmCslOperation
10861089
UVM_CSL_OPERATION_DECRYPT
10871090
} UvmCslOperation;
10881091

1092+
typedef enum UVM_KEY_ROTATION_STATUS {
1093+
// Key rotation complete/not in progress
1094+
UVM_KEY_ROTATION_STATUS_IDLE = 0,
1095+
// RM is waiting for clients to report their channels are idle for key rotation
1096+
UVM_KEY_ROTATION_STATUS_PENDING = 1,
1097+
// Key rotation is in progress
1098+
UVM_KEY_ROTATION_STATUS_IN_PROGRESS = 2,
1099+
// Key rotation timeout failure, RM will RC non-idle channels.
1100+
// UVM should never see this status value.
1101+
UVM_KEY_ROTATION_STATUS_FAILED_TIMEOUT = 3,
1102+
// Key rotation failed because upper threshold was crossed, RM will RC non-idle channels
1103+
UVM_KEY_ROTATION_STATUS_FAILED_THRESHOLD = 4,
1104+
// Internal RM failure while rotating keys for a certain channel, RM will RC the channel.
1105+
UVM_KEY_ROTATION_STATUS_FAILED_ROTATION = 5,
1106+
UVM_KEY_ROTATION_STATUS_MAX_COUNT = 6,
1107+
} UVM_KEY_ROTATION_STATUS;
1108+
10891109
#endif // _NV_UVM_TYPES_H_

0 commit comments

Comments
 (0)