.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Userspace interface for AMD Secure Encrypted Virtualization (SEV) |
---|
3 | 4 | * platform management commands. |
---|
.. | .. |
---|
6 | 7 | * |
---|
7 | 8 | * Author: Brijesh Singh <brijesh.singh@amd.com> |
---|
8 | 9 | * |
---|
9 | | - * SEV spec 0.14 is available at: |
---|
10 | | - * http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf |
---|
11 | | - * |
---|
12 | | - * This program is free software; you can redistribute it and/or modify |
---|
13 | | - * it under the terms of the GNU General Public License version 2 as |
---|
14 | | - * published by the Free Software Foundation. |
---|
| 10 | + * SEV API specification is available at: https://developer.amd.com/sev/ |
---|
15 | 11 | */ |
---|
16 | 12 | |
---|
17 | 13 | #ifndef __PSP_SEV_USER_H__ |
---|
.. | .. |
---|
30 | 26 | SEV_PDH_GEN, |
---|
31 | 27 | SEV_PDH_CERT_EXPORT, |
---|
32 | 28 | SEV_PEK_CERT_IMPORT, |
---|
33 | | - SEV_GET_ID, |
---|
| 29 | + SEV_GET_ID, /* This command is deprecated, use SEV_GET_ID2 */ |
---|
| 30 | + SEV_GET_ID2, |
---|
34 | 31 | |
---|
35 | 32 | SEV_MAX, |
---|
36 | 33 | }; |
---|
.. | .. |
---|
61 | 58 | SEV_RET_HWSEV_RET_PLATFORM, |
---|
62 | 59 | SEV_RET_HWSEV_RET_UNSAFE, |
---|
63 | 60 | SEV_RET_UNSUPPORTED, |
---|
| 61 | + SEV_RET_INVALID_PARAM, |
---|
| 62 | + SEV_RET_RESOURCE_LIMIT, |
---|
| 63 | + SEV_RET_SECURE_DATA_INVALID, |
---|
64 | 64 | SEV_RET_MAX, |
---|
65 | 65 | } sev_ret_code; |
---|
66 | 66 | |
---|
.. | .. |
---|
82 | 82 | __u8 build; /* Out */ |
---|
83 | 83 | __u32 guest_count; /* Out */ |
---|
84 | 84 | } __packed; |
---|
| 85 | + |
---|
| 86 | +#define SEV_STATUS_FLAGS_CONFIG_ES 0x0100 |
---|
85 | 87 | |
---|
86 | 88 | /** |
---|
87 | 89 | * struct sev_user_data_pek_csr - PEK_CSR command parameters |
---|
.. | .. |
---|
125 | 127 | } __packed; |
---|
126 | 128 | |
---|
127 | 129 | /** |
---|
128 | | - * struct sev_user_data_get_id - GET_ID command parameters |
---|
| 130 | + * struct sev_user_data_get_id - GET_ID command parameters (deprecated) |
---|
129 | 131 | * |
---|
130 | 132 | * @socket1: Buffer to pass unique ID of first socket |
---|
131 | 133 | * @socket2: Buffer to pass unique ID of second socket |
---|
.. | .. |
---|
136 | 138 | } __packed; |
---|
137 | 139 | |
---|
138 | 140 | /** |
---|
| 141 | + * struct sev_user_data_get_id2 - GET_ID command parameters |
---|
| 142 | + * @address: Buffer to store unique ID |
---|
| 143 | + * @length: length of the unique ID |
---|
| 144 | + */ |
---|
| 145 | +struct sev_user_data_get_id2 { |
---|
| 146 | + __u64 address; /* In */ |
---|
| 147 | + __u32 length; /* In/Out */ |
---|
| 148 | +} __packed; |
---|
| 149 | + |
---|
| 150 | +/** |
---|
139 | 151 | * struct sev_issue_cmd - SEV ioctl parameters |
---|
140 | 152 | * |
---|
141 | 153 | * @cmd: SEV commands to execute |
---|