Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame^] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef __UAPI_LINUX_SEV_GUEST_H_ |
| 20 | #define __UAPI_LINUX_SEV_GUEST_H_ |
| 21 | #include <linux/types.h> |
| 22 | struct snp_report_req { |
| 23 | __u8 user_data[64]; |
| 24 | __u32 vmpl; |
| 25 | __u8 rsvd[28]; |
| 26 | }; |
| 27 | struct snp_report_resp { |
| 28 | __u8 data[4000]; |
| 29 | }; |
| 30 | struct snp_derived_key_req { |
| 31 | __u32 root_key_select; |
| 32 | __u32 rsvd; |
| 33 | __u64 guest_field_select; |
| 34 | __u32 vmpl; |
| 35 | __u32 guest_svn; |
| 36 | __u64 tcb_version; |
| 37 | }; |
| 38 | struct snp_derived_key_resp { |
| 39 | __u8 data[64]; |
| 40 | }; |
| 41 | struct snp_guest_request_ioctl { |
| 42 | __u8 msg_version; |
| 43 | __u64 req_data; |
| 44 | __u64 resp_data; |
| 45 | __u64 fw_err; |
| 46 | }; |
| 47 | struct snp_ext_report_req { |
| 48 | struct snp_report_req data; |
| 49 | __u64 certs_address; |
| 50 | __u32 certs_len; |
| 51 | }; |
| 52 | #define SNP_GUEST_REQ_IOC_TYPE 'S' |
| 53 | #define SNP_GET_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x0, struct snp_guest_request_ioctl) |
| 54 | #define SNP_GET_DERIVED_KEY _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x1, struct snp_guest_request_ioctl) |
| 55 | #define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl) |
| 56 | #endif |