summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/mshyperv.h
diff options
context:
space:
mode:
authorTianyu Lan <Tianyu.Lan@microsoft.com>2021-10-25 08:21:06 -0400
committerWei Liu <wei.liu@kernel.org>2021-10-28 10:47:52 +0000
commit0cc4f6d9f0b9f20f3f1e1149bdb6737c0b4e134a (patch)
tree6b38683b18f98bd2a5950149d5d2d29793833cdb /arch/x86/include/asm/mshyperv.h
parente82f2069b52fb350f4ea568957dcc5c9f3649999 (diff)
downloadlinux-0cc4f6d9f0b9f20f3f1e1149bdb6737c0b4e134a.tar.bz2
x86/hyperv: Initialize GHCB page in Isolation VM
Hyperv exposes GHCB page via SEV ES GHCB MSR for SNP guest to communicate with hypervisor. Map GHCB page for all cpus to read/write MSR register and submit hvcall request via ghcb page. Reviewed-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com> Link: https://lore.kernel.org/r/20211025122116.264793-2-ltykernel@gmail.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/mshyperv.h')
-rw-r--r--arch/x86/include/asm/mshyperv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index adccbc209169..37739a277ac6 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -11,6 +11,8 @@
#include <asm/paravirt.h>
#include <asm/mshyperv.h>
+DECLARE_STATIC_KEY_FALSE(isolation_type_snp);
+
typedef int (*hyperv_fill_flush_list_func)(
struct hv_guest_mapping_flush_list *flush,
void *data);
@@ -39,6 +41,8 @@ extern void *hv_hypercall_pg;
extern u64 hv_current_partition_id;
+extern void __percpu **hv_ghcb_pg;
+
int hv_call_deposit_pages(int node, u64 partition_id, u32 num_pages);
int hv_call_add_logical_proc(int node, u32 lp_index, u32 acpi_id);
int hv_call_create_vp(int node, u64 partition_id, u32 vp_index, u32 flags);