summaryrefslogtreecommitdiff
path: root/include/asm-generic/mshyperv.h
diff options
context:
space:
mode:
authorTianyu Lan <Tianyu.Lan@microsoft.com>2021-10-25 15:21:07 +0300
committerWei Liu <wei.liu@kernel.org>2021-10-28 13:47:52 +0300
commitaf788f355e343373490b7d2e361016e7c24a0ffa (patch)
treed3f24c0227d4f309c4428a24791700f9c3f8a725 /include/asm-generic/mshyperv.h
parent0cc4f6d9f0b9f20f3f1e1149bdb6737c0b4e134a (diff)
downloadlinux-af788f355e343373490b7d2e361016e7c24a0ffa.tar.xz
x86/hyperv: Initialize shared memory boundary in the Isolation VM.
Hyper-V exposes shared memory boundary via cpuid HYPERV_CPUID_ISOLATION_CONFIG and store it in the shared_gpa_boundary of ms_hyperv struct. This prepares to share memory with host for SNP guest. Reviewed-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com> Link: https://lore.kernel.org/r/20211025122116.264793-3-ltykernel@gmail.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'include/asm-generic/mshyperv.h')
-rw-r--r--include/asm-generic/mshyperv.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h
index 2d88aa855f7e..a8ac497167d2 100644
--- a/include/asm-generic/mshyperv.h
+++ b/include/asm-generic/mshyperv.h
@@ -35,7 +35,17 @@ struct ms_hyperv_info {
u32 max_vp_index;
u32 max_lp_index;
u32 isolation_config_a;
- u32 isolation_config_b;
+ union {
+ u32 isolation_config_b;
+ struct {
+ u32 cvm_type : 4;
+ u32 reserved1 : 1;
+ u32 shared_gpa_boundary_active : 1;
+ u32 shared_gpa_boundary_bits : 6;
+ u32 reserved2 : 20;
+ };
+ };
+ u64 shared_gpa_boundary;
};
extern struct ms_hyperv_info ms_hyperv;