/* SPDX-License-Identifier: GPL-2.0 */ /* * AMD SEV header common between the guest and the hypervisor. * * Author: Brijesh Singh <brijesh.singh@amd.com>
*/
/* * SNP Page State Change NAE event * The VMGEXIT_PSC_MAX_ENTRY determines the size of the PSC structure, which * is a local stack variable in set_pages_state(). Do not increase this value * without evaluating the impact to stack usage. * * Use VMGEXIT_PSC_MAX_COUNT in cases where the actual GHCB-defined max value * is needed, such as when processing GHCB requests on the hypervisor side.
*/ #define VMGEXIT_PSC_MAX_ENTRY 64 #define VMGEXIT_PSC_MAX_COUNT 253
/* Error codes from reason set 0 */ #define SEV_TERM_SET_GEN 0 #define GHCB_SEV_ES_GEN_REQ 0 #define GHCB_SEV_ES_PROT_UNSUPPORTED 1 #define GHCB_SNP_UNSUPPORTED 2
/* Linux-specific reason codes (used with reason set 1) */ #define SEV_TERM_SET_LINUX 1 #define GHCB_TERM_REGISTER 0/* GHCB GPA registration failure */ #define GHCB_TERM_PSC 1/* Page State Change failure */ #define GHCB_TERM_PVALIDATE 2/* Pvalidate failure */ #define GHCB_TERM_NOT_VMPL0 3/* SNP guest is not running at VMPL-0 */ #define GHCB_TERM_CPUID 4/* CPUID-validation failure */ #define GHCB_TERM_CPUID_HV 5/* CPUID failure during hypervisor fallback */ #define GHCB_TERM_SECRETS_PAGE 6/* Secrets page failure */ #define GHCB_TERM_NO_SVSM 7/* SVSM is not advertised in the secrets page */ #define GHCB_TERM_SVSM_VMPL0 8/* SVSM is present but has set VMPL to 0 */ #define GHCB_TERM_SVSM_CAA 9/* SVSM is present but CAA is not page aligned */ #define GHCB_TERM_SECURE_TSC 10/* Secure TSC initialization failed */ #define GHCB_TERM_SVSM_CA_REMAP_FAIL 11/* SVSM is present but CA could not be remapped */
/* * GHCB-defined return codes that are communicated back to the guest via * SW_EXITINFO1.
*/ #define GHCB_HV_RESP_NO_ACTION 0 #define GHCB_HV_RESP_ISSUE_EXCEPTION 1 #define GHCB_HV_RESP_MALFORMED_INPUT 2
/* * GHCB-defined sub-error codes for malformed input (see above) that are * communicated back to the guest via SW_EXITINFO2[31:0].
*/ #define GHCB_ERR_NOT_REGISTERED 1 #define GHCB_ERR_INVALID_USAGE 2 #define GHCB_ERR_INVALID_SCRATCH_AREA 3 #define GHCB_ERR_MISSING_INPUT 4 #define GHCB_ERR_INVALID_INPUT 5 #define GHCB_ERR_INVALID_EVENT 6
struct sev_config {
__u64 debug : 1,
/* * Indicates when the per-CPU GHCB has been created and registered * and thus can be used by the BSP instead of the early boot GHCB. * * For APs, the per-CPU GHCB is created before they are started * and registered upon startup, so this flag can be used globally * for the BSP and APs.
*/
ghcbs_initialized : 1,
/* * Indicates when the per-CPU SVSM CA is to be used instead of the * boot SVSM CA. * * For APs, the per-CPU SVSM CA is created as part of the AP * bringup, so this flag can be used globally for the BSP and APs.
*/
use_cas : 1,
__reserved : 61;
};
externstruct sev_config sev_cfg;
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-06-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.