Message ID | 20240311161727.14916-4-vsntk18@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/sev: KEXEC/KDUMP support for SEV-ES guests | expand |
diff --git a/arch/x86/include/asm/sev.h b/arch/x86/include/asm/sev.h index 5b4a1ce3d368..c48db0bfb707 100644 --- a/arch/x86/include/asm/sev.h +++ b/arch/x86/include/asm/sev.h @@ -20,6 +20,9 @@ #define GHCB_PROTOCOL_MAX 2ULL #define GHCB_DEFAULT_USAGE 0ULL +/* Version of the GHCB data structure */ +#define GHCB_VERSION 1 + #define VMGEXIT() { asm volatile("rep; vmmcall\n\r"); } enum es_result { diff --git a/arch/x86/kernel/sev-shared.c b/arch/x86/kernel/sev-shared.c index c02a087c7945..6adae48c501f 100644 --- a/arch/x86/kernel/sev-shared.c +++ b/arch/x86/kernel/sev-shared.c @@ -257,7 +257,7 @@ static enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb, u64 exit_info_2) { /* Fill in protocol and format specifiers */ - ghcb->protocol_version = ghcb_version; + ghcb->protocol_version = GHCB_VERSION; ghcb->ghcb_usage = GHCB_DEFAULT_USAGE; ghcb_set_sw_exit_code(ghcb, exit_code);