aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/sev-common.h
diff options
context:
space:
mode:
authorGravatar Brijesh Singh <brijesh.singh@amd.com> 2022-03-07 15:33:51 -0600
committerGravatar Borislav Petkov <bp@suse.de> 2022-04-07 16:47:12 +0200
commitd5af44dde5461d125d1602ac913ab5c6bdf09b8b (patch)
tree37b7a764183747cb3a64700efe4b9ea5eac913e6 /arch/x86/include/asm/sev-common.h
parentx86/sev: Add a sev= cmdline option (diff)
downloadlinux-d5af44dde5461d125d1602ac913ab5c6bdf09b8b.tar.gz
linux-d5af44dde5461d125d1602ac913ab5c6bdf09b8b.tar.bz2
linux-d5af44dde5461d125d1602ac913ab5c6bdf09b8b.zip
x86/sev: Provide support for SNP guest request NAEs
Version 2 of GHCB specification provides SNP_GUEST_REQUEST and SNP_EXT_GUEST_REQUEST NAE that can be used by the SNP guest to communicate with the PSP. While at it, add a snp_issue_guest_request() helper that will be used by driver or other subsystem to issue the request to PSP. See SEV-SNP firmware and GHCB spec for more details. Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220307213356.2797205-42-brijesh.singh@amd.com
Diffstat (limited to 'arch/x86/include/asm/sev-common.h')
-rw-r--r--arch/x86/include/asm/sev-common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/sev-common.h b/arch/x86/include/asm/sev-common.h
index 0759af9b1acf..b8357d6ecd47 100644
--- a/arch/x86/include/asm/sev-common.h
+++ b/arch/x86/include/asm/sev-common.h
@@ -128,6 +128,9 @@ struct snp_psc_desc {
struct psc_entry entries[VMGEXIT_PSC_MAX_ENTRY];
} __packed;
+/* Guest message request error code */
+#define SNP_GUEST_REQ_INVALID_LEN BIT_ULL(32)
+
#define GHCB_MSR_TERM_REQ 0x100
#define GHCB_MSR_TERM_REASON_SET_POS 12
#define GHCB_MSR_TERM_REASON_SET_MASK 0xf