1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2014-2015 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 #pragma once
25 
26 #include <nvtypes.h>
27 
28 //
29 // This file was generated with FINN, an NVIDIA coding tool.
30 // Source file:      ctrl/ctrl0000/ctrl0000proc.finn
31 //
32 
33 #include "ctrl/ctrl0000/ctrl0000base.h"
34 #include "nvlimits.h"
35 
36 /*
37  * NV0000_CTRL_CMD_SET_SUB_PROCESS_ID
38  *
39  * Save the sub process ID and sub process name in client database
40  *  subProcID
41  *     Sub process ID
42  *  subProcessName
43  *     Sub process name
44  *
45  *     In vGPU environment, sub process means the guest user/kernel process running
46  *     within a single VM. It also refers to any sub process (or sub-sub process)
47  *     within a parent process.
48  *
49  *     Please refer to the wiki for more details about sub process concept: Resource_Server
50  *
51  * Possible return values are:
52  *   NV_OK
53  */
54 #define NV0000_CTRL_SET_SUB_PROCESS_ID_PARAMS_MESSAGE_ID (0x1U)
55 
56 typedef struct NV0000_CTRL_SET_SUB_PROCESS_ID_PARAMS {
57     NvU32 subProcessID;
58     char  subProcessName[NV_PROC_NAME_MAX_LENGTH];
59 } NV0000_CTRL_SET_SUB_PROCESS_ID_PARAMS;
60 
61 /*
62  * NV0000_CTRL_CMD_DISABLE_SUB_PROCESS_USERD_ISOLATION
63  *
64  * Disable sub process USERD isolation.
65  *  bIsSubProcIsolated
66  *     NV_TRUE to disable sub process USERD isolation
67  *
68  *     USERD allocated by different domains should not be put into the same physical page.
69  *     This provides the basic security isolation because a physical page is the unit of
70  *     granularity at which OS can provide isolation between processes.
71  *
72  *     GUEST_USER:     USERD allocated by guest user process
73  *     GUEST_KERNEL:   USERD allocated by guest kernel process
74  *     GUEST_INSECURE: USERD allocated by guest/kernel process,
75  *                     INSECURE means there is no isolation between guest user and guest kernel
76  *     HOST_USER:      USERD allocated by host user process
77  *     HOST_KERNEL:    USERD allocated by host kernel process
78  *
79  *     When sub process USERD isolation is disabled, we won't distinguish USERD allocated by guest
80  *     user and guest kernel. They all belong to the GUEST_INSECURE domain.
81  *
82  *     Please refer to wiki for more details: RM_USERD_Isolation
83  *
84  * Possible return values are:
85  *   NV_OK
86  */
87 #define NV0000_CTRL_DISABLE_SUB_PROCESS_USERD_ISOLATION_PARAMS_MESSAGE_ID (0x2U)
88 
89 typedef struct NV0000_CTRL_DISABLE_SUB_PROCESS_USERD_ISOLATION_PARAMS {
90     NvBool bIsSubProcessDisabled;
91 } NV0000_CTRL_DISABLE_SUB_PROCESS_USERD_ISOLATION_PARAMS;
92 
93 #define NV0000_CTRL_CMD_SET_SUB_PROCESS_ID                  (0x901) /* finn: Evaluated from "(FINN_NV01_ROOT_PROC_INTERFACE_ID << 8) | NV0000_CTRL_SET_SUB_PROCESS_ID_PARAMS_MESSAGE_ID" */
94 
95 #define NV0000_CTRL_CMD_DISABLE_SUB_PROCESS_USERD_ISOLATION (0x902) /* finn: Evaluated from "(FINN_NV01_ROOT_PROC_INTERFACE_ID << 8) | NV0000_CTRL_DISABLE_SUB_PROCESS_USERD_ISOLATION_PARAMS_MESSAGE_ID" */
96 
97 /* _ctrl0000proc_h_ */
98 
99