summaryrefslogtreecommitdiff
path: root/arch/x86/hyperv/hv_init.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-07-25 06:49:22 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2022-07-25 06:49:22 +0300
commit3c69a99b62fde9de86a612ef1daaa07d95f0a773 (patch)
tree2a82c3ba8926092d35a9ef1ddc62a08cf19ac981 /arch/x86/hyperv/hv_init.c
parentbe640317a1d0b9cf42fedb2debc2887a7cfa38de (diff)
parentff6992735ade75aae3e35d16b17da1008d753d28 (diff)
downloadlinux-3c69a99b62fde9de86a612ef1daaa07d95f0a773.tar.xz
Merge tag 'v5.19-rc7' into fixes
Merge v5.19-rc7 into fixes to bring in: d11219ad53dc ("amdgpu: disable powerpc support for the newer display engine")
Diffstat (limited to 'arch/x86/hyperv/hv_init.c')
-rw-r--r--arch/x86/hyperv/hv_init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
index 8b392b6b7b93..3de6d8b53367 100644
--- a/arch/x86/hyperv/hv_init.c
+++ b/arch/x86/hyperv/hv_init.c
@@ -13,6 +13,7 @@
#include <linux/io.h>
#include <asm/apic.h>
#include <asm/desc.h>
+#include <asm/sev.h>
#include <asm/hypervisor.h>
#include <asm/hyperv-tlfs.h>
#include <asm/mshyperv.h>
@@ -405,6 +406,11 @@ void __init hyperv_init(void)
}
if (hv_isolation_type_snp()) {
+ /* Negotiate GHCB Version. */
+ if (!hv_ghcb_negotiate_protocol())
+ hv_ghcb_terminate(SEV_TERM_SET_GEN,
+ GHCB_SEV_ES_PROT_UNSUPPORTED);
+
hv_ghcb_pg = alloc_percpu(union hv_ghcb *);
if (!hv_ghcb_pg)
goto free_vp_assist_page;