1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
|
/*
* SPDX-FileCopyrightText: Copyright (c) 2004-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include <nvtypes.h>
//
// This file was generated with FINN, an NVIDIA coding tool.
// Source file: ctrl/ctrl0080/ctrl0080gpu.finn
//
#include "ctrl/ctrl0080/ctrl0080base.h"
#include "nvlimits.h"
/* NV01_DEVICE_XX/NV03_DEVICE gpu control commands and parameters */
/*
* NV0080_CTRL_CMD_GPU_GET_CLASSLIST
*
* This command returns supported class information for the specified device.
* If the device is comprised of more than one GPU, the class list represents
* the set of supported classes common to all GPUs within the device.
*
* It has two modes:
*
* If the classList pointer is NULL, then this command returns the number
* of classes supported by the device in the numClasses field. The value
* should then be used by the client to allocate a classList buffer
* large enough to hold one 32bit value per numClasses entry.
*
* If the classList pointer is non-NULL, then this command returns the
* set of supported class numbers in the specified buffer.
*
* numClasses
* If classList is NULL, then this parameter will return the
* number of classes supported by the device. If classList is non-NULL,
* then this parameter indicates the number of entries in classList.
* classList
* This parameter specifies a pointer to the client's buffer into
* which the supported class numbers should be returned.
*
* Possible status values returned are:
* NV_OK
* NV_ERR_INVALID_PARAM_STRUCT
* NV_ERR_INVALID_ARGUMENT
* NV_ERR_OPERATING_SYSTEM
*/
#define NV0080_CTRL_CMD_GPU_GET_CLASSLIST (0x800201) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_CLASSLIST_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_GET_CLASSLIST_PARAMS_MESSAGE_ID (0x1U)
typedef struct NV0080_CTRL_GPU_GET_CLASSLIST_PARAMS {
NvU32 numClasses;
NV_DECLARE_ALIGNED(NvP64 classList, 8);
} NV0080_CTRL_GPU_GET_CLASSLIST_PARAMS;
/**
* NV0080_CTRL_CMD_GPU_GET_NUM_SUBDEVICES
*
* This command returns the number of subdevices for the device.
*
* numSubDevices
* This parameter returns the number of subdevices within the device.
*
* Possible status values returned are:
* NV_OK
* NV_ERR_INVALID_PARAM_STRUCT
*/
#define NV0080_CTRL_CMD_GPU_GET_NUM_SUBDEVICES (0x800280) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_NUM_SUBDEVICES_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_GET_NUM_SUBDEVICES_PARAMS_MESSAGE_ID (0x80U)
typedef struct NV0080_CTRL_GPU_GET_NUM_SUBDEVICES_PARAMS {
NvU32 numSubDevices;
} NV0080_CTRL_GPU_GET_NUM_SUBDEVICES_PARAMS;
/*
* NV0080_CTRL_CMD_GPU_GET_VIDLINK_ORDER
*
* This command returns the video link order of each subdevice id inside the
* device. This call can only be made after SLI is enabled. This call is
* intended for 3D clients to use to determine the vidlink order of the
* devices. The Display Output Parent will always be the first subdevice
* mask listed in the array. Note that this command should not be used in
* case of bridgeless SLI. The order of the subdevices returned by this
* command will not be correct in case of bridgeless SLI.
*
* ConnectionCount
* Each HW can provide 1 or 2 links between all GPUs in a device. This
* number tells how many links are available between GPUs. This data
* also represents the number of concurrent SLI heads that can run at
* the same time over this one device.
*
* Order
* This array returns the order of subdevices that are used through
* the vidlink for display output.
*
* Possible status values returned are:
* NV_OK
* NV_ERR_INVALID_ARGUMENT
* NV_ERR_INVALID_PARAM_STRUCT
*/
#define NV0080_CTRL_CMD_GPU_GET_VIDLINK_ORDER (0x800281) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_VIDLINK_ORDER_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_GET_VIDLINK_ORDER_PARAMS_MESSAGE_ID (0x81U)
typedef struct NV0080_CTRL_GPU_GET_VIDLINK_ORDER_PARAMS {
NvU32 ConnectionCount;
NvU32 Order[NV_MAX_SUBDEVICES];
} NV0080_CTRL_GPU_GET_VIDLINK_ORDER_PARAMS;
/*
* NV0080_CTRL_CMD_GPU_SET_DISPLAY_OWNER
*
* This command sets display ownership within the device to the specified
* subdevice instance. The actual transfer of display ownership will take
* place at the next modeset.
*
* subDeviceInstance
* This member specifies the subdevice instance of the new display
* owner. The subdevice instance must be in the legal range
* indicated by the NV0080_CTRL_CMD_GPU_GET_NUM_SUBDEVICES command.
*
* Possible status values returned are:
* NV_OK
* NV_ERR_INVALID_ARGUMENT
* NV_ERR_INVALID_PARAM_STRUCT
*/
#define NV0080_CTRL_CMD_GPU_SET_DISPLAY_OWNER (0x800282) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_SET_DISPLAY_OWNER_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_SET_DISPLAY_OWNER_PARAMS_MESSAGE_ID (0x82U)
typedef struct NV0080_CTRL_GPU_SET_DISPLAY_OWNER_PARAMS {
NvU32 subDeviceInstance;
} NV0080_CTRL_GPU_SET_DISPLAY_OWNER_PARAMS;
/*
* NV0080_CTRL_CMD_GPU_GET_DISPLAY_OWNER
*
* This command returns the subdevice instance of the current display owner
* within the device.
*
* subDeviceInstance
* This member returns the subdevice instance of the current display
* owner. The subdevice instance will be in the legal range
* indicated by the NV0080_CTRL_CMD_GPU_GET_NUM_SUBDEVICES command.
*
* Possible status values returned are:
* NV_OK
* NV_ERR_INVALID_PARAM_STRUCT
*/
#define NV0080_CTRL_CMD_GPU_GET_DISPLAY_OWNER (0x800283) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_DISPLAY_OWNER_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_GET_DISPLAY_OWNER_PARAMS_MESSAGE_ID (0x83U)
typedef struct NV0080_CTRL_GPU_GET_DISPLAY_OWNER_PARAMS {
NvU32 subDeviceInstance;
} NV0080_CTRL_GPU_GET_DISPLAY_OWNER_PARAMS;
/*
* NV0080_CTRL_CMD_GPU_SET_VIDLINK
*
* This command enables or disables the VIDLINK of all subdevices in the
* current SLI configuration.
*
* enable
* Enables or disables the vidlink
*
* Possible status values returned are:
* NV_OK
* NV_ERR_NOT_SUPPORTED
*/
#define NV0080_CTRL_CMD_GPU_SET_VIDLINK (0x800285) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_SET_VIDLINK_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_SET_VIDLINK_PARAMS_MESSAGE_ID (0x85U)
typedef struct NV0080_CTRL_GPU_SET_VIDLINK_PARAMS {
NvU32 enable;
} NV0080_CTRL_GPU_SET_VIDLINK_PARAMS;
#define NV0080_CTRL_GPU_SET_VIDLINK_ENABLE_FALSE (0x00000000)
#define NV0080_CTRL_GPU_SET_VIDLINK_ENABLE_TRUE (0x00000001)
/* commands */
#define NV0080_CTRL_CMD_GPU_VIDEO_POWERGATE_GET_STATUS 0
#define NV0080_CTRL_CMD_GPU_VIDEO_POWERGATE_POWERDOWN 1
#define NV0080_CTRL_CMD_GPU_VIDEO_POWERGATE_POWERUP 2
/* status */
#define NV0080_CTRL_CMD_GPU_VIDEO_POWERGATE_STATUS_POWER_ON 0
#define NV0080_CTRL_CMD_GPU_VIDEO_POWERGATE_STATUS_POWERING_DOWN 1
#define NV0080_CTRL_CMD_GPU_VIDEO_POWERGATE_STATUS_GATED 2
#define NV0080_CTRL_CMD_GPU_VIDEO_POWERGATE_STATUS_POWERING_UP 3
/*
* NV0080_CTRL_CMD_GPU_MODIFY_SW_STATE_PERSISTENCE
*
* This command is used to enable or disable the persistence of a GPU's
* software state when no clients exist. With persistent software state enabled
* the GPU's software state is not torn down when the last client exits, but is
* retained until either the kernel module unloads or persistent software state
* is disabled.
*
* newState
* This input parameter is used to enable or disable the persistence of the
* software state of all subdevices within the device.
* Possible values are:
* NV0080_CTRL_GPU_SW_STATE_PERSISTENCE_ENABLED
* NV0080_CTRL_GPU_SW_STATE_PERSISTENCE_DISABLED
*
* Possible status values returned are:
* NV_OK
* NV_ERR_INVALID_ARGUMENT
*/
#define NV0080_CTRL_CMD_GPU_MODIFY_SW_STATE_PERSISTENCE (0x800287) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_MODIFY_SW_STATE_PERSISTENCE_PARAMS_MESSAGE_ID" */
/* Possible values of persistentSwState */
#define NV0080_CTRL_GPU_SW_STATE_PERSISTENCE_ENABLED (0x00000000)
#define NV0080_CTRL_GPU_SW_STATE_PERSISTENCE_DISABLED (0x00000001)
#define NV0080_CTRL_GPU_MODIFY_SW_STATE_PERSISTENCE_PARAMS_MESSAGE_ID (0x87U)
typedef struct NV0080_CTRL_GPU_MODIFY_SW_STATE_PERSISTENCE_PARAMS {
NvU32 newState;
} NV0080_CTRL_GPU_MODIFY_SW_STATE_PERSISTENCE_PARAMS;
/*
* NV0080_CTRL_CMD_GPU_QUERY_SW_STATE_PERSISTENCE
*
* swStatePersistence
* This parameter returns a value indicating if persistent software
* state is currently enabled or not for the specified GPU. See the
* description of NV0080_CTRL_CMD_GPU_MODIFY_SW_STATE_PERSISTENCE.
* Possible values are:
* NV0080_CTRL_GPU_SW_STATE_PERSISTENCE_ENABLED
* NV0080_CTRL_GPU_SW_STATE_PERSISTENCE_DISABLED
*
* Possible status values returned are:
* NV_OK
* NV_ERR_INVALID_ARGUMENT
*/
#define NV0080_CTRL_CMD_GPU_QUERY_SW_STATE_PERSISTENCE (0x800288) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_QUERY_SW_STATE_PERSISTENCE_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_QUERY_SW_STATE_PERSISTENCE_PARAMS_MESSAGE_ID (0x88U)
typedef struct NV0080_CTRL_GPU_QUERY_SW_STATE_PERSISTENCE_PARAMS {
NvU32 swStatePersistence;
} NV0080_CTRL_GPU_QUERY_SW_STATE_PERSISTENCE_PARAMS;
/**
* NV0080_CTRL_CMD_GPU_GET_VIRTUALIZATION_MODE
*
* This command returns a value indicating virtualization mode in
* which the GPU is running.
*
* virtualizationMode
* This parameter returns the virtualization mode of the device.
* Possible values are:
* NV0080_CTRL_GPU_VIRTUALIZATION_MODE_NONE
* This value indicates that there is no virtualization mode associated with the
* device (i.e. it's a baremetal GPU).
* NV0080_CTRL_GPU_VIRTUALIZATION_MODE_NMOS
* This value indicates that the device is associated with the NMOS.
* NV0080_CTRL_GPU_VIRTUALIZATION_MODE_VGX
* This value indicates that the device is associated with VGX(guest GPU).
* NV0080_CTRL_GPU_VIRTUALIZATION_MODE_HOST
* NV0080_CTRL_GPU_VIRTUALIZATION_MODE_HOST_VGPU
* This value indicates that the device is associated with vGPU(host GPU).
* NV0080_CTRL_GPU_VIRTUALIZATION_MODE_HOST_VSGA
* This value indicates that the device is associated with vSGA(host GPU).
*
* Possible status values returned are:
* NV_OK
* NV_ERR_INVALID_ARGUMENT
*/
#define NV0080_CTRL_CMD_GPU_GET_VIRTUALIZATION_MODE (0x800289) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_VIRTUALIZATION_MODE_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_VIRTUALIZATION_MODE_NONE (0x00000000)
#define NV0080_CTRL_GPU_VIRTUALIZATION_MODE_NMOS (0x00000001)
#define NV0080_CTRL_GPU_VIRTUALIZATION_MODE_VGX (0x00000002)
#define NV0080_CTRL_GPU_VIRTUALIZATION_MODE_HOST (0x00000003)
#define NV0080_CTRL_GPU_VIRTUALIZATION_MODE_HOST_VGPU NV0080_CTRL_GPU_VIRTUALIZATION_MODE_HOST
#define NV0080_CTRL_GPU_VIRTUALIZATION_MODE_HOST_VSGA (0x00000004)
#define NV0080_CTRL_GPU_GET_VIRTUALIZATION_MODE_PARAMS_MESSAGE_ID (0x89U)
typedef struct NV0080_CTRL_GPU_GET_VIRTUALIZATION_MODE_PARAMS {
NvU32 virtualizationMode;
} NV0080_CTRL_GPU_GET_VIRTUALIZATION_MODE_PARAMS;
/*
* NV0080_CTRL_CMD_GPU_GET_SPARSE_TEXTURE_COMPUTE_MODE
*
* This command returns the setting information for sparse texture compute
* mode optimization on the associated GPU. This setting indicates how the
* large page size should be selected by the RM for the GPU.
*
* defaultSetting
* This field specifies what the OS default setting is for the associated
* GPU. See NV0080_CTRL_CMD_GPU_SET_SPARSE_TEXTURE_COMPUTE_MODE for a list
* of possible values.
* currentSetting
* This field specifies which optimization mode was applied when the
* driver was loaded. See
* NV0080_CTRL_CMD_GPU_SET_SPARSE_TEXTURE_COMPUTE_MODE for a list of
* possible values.
* pendingSetting
* This field specifies which optimization mode will be applied on the
* next driver reload. See
* NV0080_CTRL_CMD_GPU_SET_SPARSE_TEXTURE_COMPUTE_MODE for a list of
* possible values.
*
* Possible status values returned are:
* NV_OK
*/
#define NV0080_CTRL_CMD_GPU_GET_SPARSE_TEXTURE_COMPUTE_MODE (0x80028c) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_SPARSE_TEXTURE_COMPUTE_MODE_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_GET_SPARSE_TEXTURE_COMPUTE_MODE_PARAMS_MESSAGE_ID (0x8CU)
typedef struct NV0080_CTRL_GPU_GET_SPARSE_TEXTURE_COMPUTE_MODE_PARAMS {
NvU32 defaultSetting;
NvU32 currentSetting;
NvU32 pendingSetting;
} NV0080_CTRL_GPU_GET_SPARSE_TEXTURE_COMPUTE_MODE_PARAMS;
/*
* NV0080_CTRL_CMD_GPU_SET_SPARSE_TEXTURE_COMPUTE_MODE
*
* This command sets the pending setting for sparse texture compute mode. This
* setting indicates how the large page size should be selected by the RM for
* the GPU on the next driver reload.
*
* setting
* This field specifies which use case the RM should optimize the large
* page size for on the next driver reload. Possible values for this
* field are:
* NV0080_CTRL_GPU_SPARSE_TEXTURE_COMPUTE_MODE_DEFAULT
* This value indicates that the RM should use the default setting for
* the GPU's large page size. The default setting is reported by
* NV0080_CTRL_CMD_GPU_GET_SPARSE_TEXTURE_COMPUTE_MODE.
* NV0080_CTRL_GPU_SPARSE_TEXTURE_COMPUTE_MODE_OPTIMIZE_COMPUTE
* This value indicates that the RM should select the GPU's large page
* size to optimize for compute use cases.
* NV0080_CTRL_GPU_SPARSE_TEXTURE_COMPUTE_MODE_OPTIMIZE_SPARSE_TEXTURE
* This value indicates that the RM should select the GPU's large page
* size to optimize for sparse texture use cases.
*
* Possible status values returned are:
* NV_OK
* NV_ERR_INVALID_ARGUMENT
* NV_ERR_INSUFFICIENT_PERMISSIONS
*/
#define NV0080_CTRL_CMD_GPU_SET_SPARSE_TEXTURE_COMPUTE_MODE (0x80028d) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_SET_SPARSE_TEXTURE_COMPUTE_MODE_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_SET_SPARSE_TEXTURE_COMPUTE_MODE_PARAMS_MESSAGE_ID (0x8DU)
typedef struct NV0080_CTRL_GPU_SET_SPARSE_TEXTURE_COMPUTE_MODE_PARAMS {
NvU32 setting;
} NV0080_CTRL_GPU_SET_SPARSE_TEXTURE_COMPUTE_MODE_PARAMS;
/* Possible sparse texture compute mode setting values */
#define NV0080_CTRL_GPU_SPARSE_TEXTURE_COMPUTE_MODE_DEFAULT 0
#define NV0080_CTRL_GPU_SPARSE_TEXTURE_COMPUTE_MODE_OPTIMIZE_COMPUTE 1
#define NV0080_CTRL_GPU_SPARSE_TEXTURE_COMPUTE_MODE_OPTIMIZE_SPARSE_TEXTURE 2
/*
* NV0080_CTRL_CMD_GPU_GET_VGX_CAPS
*
* This command gets the VGX capability of the GPU depending on the status of
* the VGX hardware fuse.
*
* isVgx
* This field is set to NV_TRUE is VGX fuse is enabled for the GPU otherwise
* it is set to NV_FALSE.
*
* Possible status values returned are:
* NVOS_STATUS_SUCCESS
* NVOS_STATUS_ERROR_NOT_SUPPORTED
*/
#define NV0080_CTRL_CMD_GPU_GET_VGX_CAPS (0x80028e) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_VGX_CAPS_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_GET_VGX_CAPS_PARAMS_MESSAGE_ID (0x8EU)
typedef struct NV0080_CTRL_GPU_GET_VGX_CAPS_PARAMS {
NvBool isVgx;
} NV0080_CTRL_GPU_GET_VGX_CAPS_PARAMS;
/*
* NV0080_CTRL_CMD_GPU_GET_SRIOV_CAPS
*
* This command is used to query GPU SRIOV capabilities
* totalVFs
* Total number of virtual functions supported.
*
* firstVfOffset
* Offset of the first VF.
*
* vfFeatureMask
* Bitmask of features managed by the guest
*
* FirstVFBar0Address
* Address of BAR0 region of first VF.
*
* FirstVFBar1Address
* Address of BAR1 region of first VF.
*
* FirstVFBar2Address
* Address of BAR2 region of first VF.
*
* bar0Size
* Size of BAR0 region on VF.
*
* bar1Size
* Size of BAR1 region on VF.
*
* bar2Size
* Size of BAR2 region on VF.
*
* b64bitBar0
* If the VF BAR0 is 64-bit addressable.
*
* b64bitBar1
* If the VF BAR1 is 64-bit addressable.
*
* b64bitBar2
* If the VF BAR2 is 64-bit addressable.
*
* bSriovEnabled
* Flag for SR-IOV enabled or not.
*
* bSriovHeavyEnabled
* Flag for whether SR-IOV is enabled in standard or heavy mode.
*
* bEmulateVFBar0TlbInvalidationRegister
* Flag for whether VF's TLB Invalidate Register region needs emulation.
*
* bClientRmAllocatedCtxBuffer
* Flag for whether engine ctx buffer is managed by client RM.
*
* Possible status values returned are:
* NV_OK
* NV_ERR_NOT_SUPPORTED
*/
#define NV0080_CTRL_CMD_GPU_GET_SRIOV_CAPS (0x800291) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_SRIOV_CAPS_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_GET_SRIOV_CAPS_PARAMS_MESSAGE_ID (0x91U)
typedef struct NV0080_CTRL_GPU_GET_SRIOV_CAPS_PARAMS {
NvU32 totalVFs;
NvU32 firstVfOffset;
NvU32 vfFeatureMask;
NV_DECLARE_ALIGNED(NvU64 FirstVFBar0Address, 8);
NV_DECLARE_ALIGNED(NvU64 FirstVFBar1Address, 8);
NV_DECLARE_ALIGNED(NvU64 FirstVFBar2Address, 8);
NV_DECLARE_ALIGNED(NvU64 bar0Size, 8);
NV_DECLARE_ALIGNED(NvU64 bar1Size, 8);
NV_DECLARE_ALIGNED(NvU64 bar2Size, 8);
NvBool b64bitBar0;
NvBool b64bitBar1;
NvBool b64bitBar2;
NvBool bSriovEnabled;
NvBool bSriovHeavyEnabled;
NvBool bEmulateVFBar0TlbInvalidationRegister;
NvBool bClientRmAllocatedCtxBuffer;
} NV0080_CTRL_GPU_GET_SRIOV_CAPS_PARAMS;
// Update this macro if new HW exceeds GPU Classlist MAX_SIZE
#define NV0080_CTRL_GPU_CLASSLIST_MAX_SIZE 160
#define NV0080_CTRL_CMD_GPU_GET_CLASSLIST_V2 (0x800292) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_CLASSLIST_V2_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_GET_CLASSLIST_V2_PARAMS_MESSAGE_ID (0x92U)
typedef struct NV0080_CTRL_GPU_GET_CLASSLIST_V2_PARAMS {
NvU32 numClasses; // __OUT__
NvU32 classList[NV0080_CTRL_GPU_CLASSLIST_MAX_SIZE]; // __OUT__
} NV0080_CTRL_GPU_GET_CLASSLIST_V2_PARAMS;
/*
* NV0080_CTRL_CMD_GPU_FIND_SUBDEVICE_HANDLE
*
* Find a subdevice handle allocated under this device
*/
#define NV0080_CTRL_CMD_GPU_FIND_SUBDEVICE_HANDLE (0x800293) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_FIND_SUBDEVICE_HANDLE_PARAM_MESSAGE_ID" */
#define NV0080_CTRL_GPU_FIND_SUBDEVICE_HANDLE_PARAM_MESSAGE_ID (0x93U)
typedef struct NV0080_CTRL_GPU_FIND_SUBDEVICE_HANDLE_PARAM {
NvU32 subDeviceInst; // [in]
NvHandle hSubDevice; // [out]
} NV0080_CTRL_GPU_FIND_SUBDEVICE_HANDLE_PARAM;
/*
* NV0080_CTRL_CMD_GPU_GET_BRAND_CAPS
*
* This command gets branding information for the device.
*
* brands
* Mask containing branding information. A bit in this
* mask is set if the GPU has particular branding.
*
* Possible status values returned are:
* NV_OK
*/
#define NV0080_CTRL_GPU_GET_BRAND_CAPS_QUADRO NVBIT(0)
#define NV0080_CTRL_GPU_GET_BRAND_CAPS_NVS NVBIT(1)
#define NV0080_CTRL_GPU_GET_BRAND_CAPS_TITAN NVBIT(2)
#define NV0080_CTRL_CMD_GPU_GET_BRAND_CAPS (0x800294) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_GET_BRAND_CAPS_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_GET_BRAND_CAPS_PARAMS_MESSAGE_ID (0x94U)
typedef struct NV0080_CTRL_GPU_GET_BRAND_CAPS_PARAMS {
NvU32 brands;
} NV0080_CTRL_GPU_GET_BRAND_CAPS_PARAMS;
/*
* These are the per-VF BAR1 sizes that we support in MB.
* They are used with the NV0080_CTRL_GPU_SET_VGPU_VF_BAR1_SIZE control call and
* should match the NV_XVE_BAR1_CONFIG_SIZE register defines.
*/
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_64M 64
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_128M 128
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_256M 256
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_512M 512
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_1G 1024
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_2G 2048
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_4G 4096
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_8G 8192
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_16G 16384
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_32G 32768
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_64G 65536
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_128G 131072
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_MIN NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_64M
#define NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_MAX NV0080_CTRL_GPU_VGPU_VF_BAR1_SIZE_128G
#define NV0080_CTRL_GPU_VGPU_NUM_VFS_INVALID NV_U32_MAX
/*
* NV0080_CTRL_GPU_SET_VGPU_VF_BAR1_SIZE
*
* @brief Resize BAR1 per-VF on the given GPU
* vfBar1SizeMB[in] size of per-VF BAR1 size in MB
* numVfs[out] number of VFs that can be created given the new BAR1 size
*/
#define NV0080_CTRL_GPU_SET_VGPU_VF_BAR1_SIZE (0x800296) /* finn: Evaluated from "(FINN_NV01_DEVICE_0_GPU_INTERFACE_ID << 8) | NV0080_CTRL_GPU_SET_VGPU_VF_BAR1_SIZE_PARAMS_MESSAGE_ID" */
#define NV0080_CTRL_GPU_SET_VGPU_VF_BAR1_SIZE_PARAMS_MESSAGE_ID (0x96U)
typedef struct NV0080_CTRL_GPU_SET_VGPU_VF_BAR1_SIZE_PARAMS {
NvU32 vfBar1SizeMB;
NvU32 numVfs;
} NV0080_CTRL_GPU_SET_VGPU_VF_BAR1_SIZE_PARAMS;
/* _ctrl0080gpu_h_ */
|