~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/sev-guest.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/sev-guest.h (Architecture sparc) and /include/uapi/linux/sev-guest.h (Architecture i386)


  1 /* SPDX-License-Identifier: GPL-2.0-only WITH       1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
  2 /*                                                  2 /*
  3  * Userspace interface for AMD SEV and SNP gue      3  * Userspace interface for AMD SEV and SNP guest driver.
  4  *                                                  4  *
  5  * Copyright (C) 2021 Advanced Micro Devices,       5  * Copyright (C) 2021 Advanced Micro Devices, Inc.
  6  *                                                  6  *
  7  * Author: Brijesh Singh <brijesh.singh@amd.co      7  * Author: Brijesh Singh <brijesh.singh@amd.com>
  8  *                                                  8  *
  9  * SEV API specification is available at: http      9  * SEV API specification is available at: https://developer.amd.com/sev/
 10  */                                                10  */
 11                                                    11 
 12 #ifndef __UAPI_LINUX_SEV_GUEST_H_                  12 #ifndef __UAPI_LINUX_SEV_GUEST_H_
 13 #define __UAPI_LINUX_SEV_GUEST_H_                  13 #define __UAPI_LINUX_SEV_GUEST_H_
 14                                                    14 
 15 #include <linux/types.h>                           15 #include <linux/types.h>
 16                                                    16 
 17 #define SNP_REPORT_USER_DATA_SIZE 64               17 #define SNP_REPORT_USER_DATA_SIZE 64
 18                                                    18 
 19 struct snp_report_req {                            19 struct snp_report_req {
 20         /* user data that should be included i     20         /* user data that should be included in the report */
 21         __u8 user_data[SNP_REPORT_USER_DATA_SI     21         __u8 user_data[SNP_REPORT_USER_DATA_SIZE];
 22                                                    22 
 23         /* The vmpl level to be included in th     23         /* The vmpl level to be included in the report */
 24         __u32 vmpl;                                24         __u32 vmpl;
 25                                                    25 
 26         /* Must be zero filled */                  26         /* Must be zero filled */
 27         __u8 rsvd[28];                             27         __u8 rsvd[28];
 28 };                                                 28 };
 29                                                    29 
 30 struct snp_report_resp {                           30 struct snp_report_resp {
 31         /* response data, see SEV-SNP spec for     31         /* response data, see SEV-SNP spec for the format */
 32         __u8 data[4000];                           32         __u8 data[4000];
 33 };                                                 33 };
 34                                                    34 
 35 struct snp_derived_key_req {                       35 struct snp_derived_key_req {
 36         __u32 root_key_select;                     36         __u32 root_key_select;
 37         __u32 rsvd;                                37         __u32 rsvd;
 38         __u64 guest_field_select;                  38         __u64 guest_field_select;
 39         __u32 vmpl;                                39         __u32 vmpl;
 40         __u32 guest_svn;                           40         __u32 guest_svn;
 41         __u64 tcb_version;                         41         __u64 tcb_version;
 42 };                                                 42 };
 43                                                    43 
 44 struct snp_derived_key_resp {                      44 struct snp_derived_key_resp {
 45         /* response data, see SEV-SNP spec for     45         /* response data, see SEV-SNP spec for the format */
 46         __u8 data[64];                             46         __u8 data[64];
 47 };                                                 47 };
 48                                                    48 
 49 struct snp_guest_request_ioctl {                   49 struct snp_guest_request_ioctl {
 50         /* message version number (must be non     50         /* message version number (must be non-zero) */
 51         __u8 msg_version;                          51         __u8 msg_version;
 52                                                    52 
 53         /* Request and response structure addr     53         /* Request and response structure address */
 54         __u64 req_data;                            54         __u64 req_data;
 55         __u64 resp_data;                           55         __u64 resp_data;
 56                                                    56 
 57         /* bits[63:32]: VMM error code, bits[3     57         /* bits[63:32]: VMM error code, bits[31:0] firmware error code (see psp-sev.h) */
 58         union {                                    58         union {
 59                 __u64 exitinfo2;                   59                 __u64 exitinfo2;
 60                 struct {                           60                 struct {
 61                         __u32 fw_error;            61                         __u32 fw_error;
 62                         __u32 vmm_error;           62                         __u32 vmm_error;
 63                 };                                 63                 };
 64         };                                         64         };
 65 };                                                 65 };
 66                                                    66 
 67 struct snp_ext_report_req {                        67 struct snp_ext_report_req {
 68         struct snp_report_req data;                68         struct snp_report_req data;
 69                                                    69 
 70         /* where to copy the certificate blob      70         /* where to copy the certificate blob */
 71         __u64 certs_address;                       71         __u64 certs_address;
 72                                                    72 
 73         /* length of the certificate blob */       73         /* length of the certificate blob */
 74         __u32 certs_len;                           74         __u32 certs_len;
 75 };                                                 75 };
 76                                                    76 
 77 #define SNP_GUEST_REQ_IOC_TYPE  'S'                77 #define SNP_GUEST_REQ_IOC_TYPE  'S'
 78                                                    78 
 79 /* Get SNP attestation report */                   79 /* Get SNP attestation report */
 80 #define SNP_GET_REPORT _IOWR(SNP_GUEST_REQ_IOC     80 #define SNP_GET_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x0, struct snp_guest_request_ioctl)
 81                                                    81 
 82 /* Get a derived key from the root */              82 /* Get a derived key from the root */
 83 #define SNP_GET_DERIVED_KEY _IOWR(SNP_GUEST_RE     83 #define SNP_GET_DERIVED_KEY _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x1, struct snp_guest_request_ioctl)
 84                                                    84 
 85 /* Get SNP extended report as defined in the G     85 /* Get SNP extended report as defined in the GHCB specification version 2. */
 86 #define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ     86 #define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl)
 87                                                    87 
 88 /* Guest message request EXIT_INFO_2 constants     88 /* Guest message request EXIT_INFO_2 constants */
 89 #define SNP_GUEST_FW_ERR_MASK           GENMAS     89 #define SNP_GUEST_FW_ERR_MASK           GENMASK_ULL(31, 0)
 90 #define SNP_GUEST_VMM_ERR_SHIFT         32         90 #define SNP_GUEST_VMM_ERR_SHIFT         32
 91 #define SNP_GUEST_VMM_ERR(x)            (((u64     91 #define SNP_GUEST_VMM_ERR(x)            (((u64)x) << SNP_GUEST_VMM_ERR_SHIFT)
 92 #define SNP_GUEST_FW_ERR(x)             ((x) &     92 #define SNP_GUEST_FW_ERR(x)             ((x) & SNP_GUEST_FW_ERR_MASK)
 93 #define SNP_GUEST_ERR(vmm_err, fw_err)  (SNP_G     93 #define SNP_GUEST_ERR(vmm_err, fw_err)  (SNP_GUEST_VMM_ERR(vmm_err) | \
 94                                          SNP_G     94                                          SNP_GUEST_FW_ERR(fw_err))
 95                                                    95 
 96 #define SNP_GUEST_VMM_ERR_INVALID_LEN   1          96 #define SNP_GUEST_VMM_ERR_INVALID_LEN   1
 97 #define SNP_GUEST_VMM_ERR_BUSY          2          97 #define SNP_GUEST_VMM_ERR_BUSY          2
 98                                                    98 
 99 #endif /* __UAPI_LINUX_SEV_GUEST_H_ */             99 #endif /* __UAPI_LINUX_SEV_GUEST_H_ */
100                                                   100 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php