linux/include/uapi/linux/sev-guest.h

/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
 * Userspace interface for AMD SEV and SNP guest driver.
 *
 * Copyright (C) 2021 Advanced Micro Devices, Inc.
 *
 * Author: Brijesh Singh <[email protected]>
 *
 * SEV API specification is available at: https://developer.amd.com/sev/
 */

#ifndef __UAPI_LINUX_SEV_GUEST_H_
#define __UAPI_LINUX_SEV_GUEST_H_

#include <linux/types.h>

#define SNP_REPORT_USER_DATA_SIZE

struct snp_report_req {};

struct snp_report_resp {};

struct snp_derived_key_req {};

struct snp_derived_key_resp {};

struct snp_guest_request_ioctl {};

struct snp_ext_report_req {};

#define SNP_GUEST_REQ_IOC_TYPE

/* Get SNP attestation report */
#define SNP_GET_REPORT

/* Get a derived key from the root */
#define SNP_GET_DERIVED_KEY

/* Get SNP extended report as defined in the GHCB specification version 2. */
#define SNP_GET_EXT_REPORT

/* Guest message request EXIT_INFO_2 constants */
#define SNP_GUEST_FW_ERR_MASK
#define SNP_GUEST_VMM_ERR_SHIFT
#define SNP_GUEST_VMM_ERR(x)
#define SNP_GUEST_FW_ERR(x)
#define SNP_GUEST_ERR(vmm_err, fw_err)

#define SNP_GUEST_VMM_ERR_INVALID_LEN
#define SNP_GUEST_VMM_ERR_BUSY

#endif /* __UAPI_LINUX_SEV_GUEST_H_ */