diff options
author | Tianyu Lan | 2021-10-25 08:21:06 -0400 |
---|---|---|
committer | Wei Liu | 2021-10-28 10:47:52 +0000 |
commit | 0cc4f6d9f0b9f20f3f1e1149bdb6737c0b4e134a (patch) | |
tree | 6b38683b18f98bd2a5950149d5d2d29793833cdb /include/asm-generic | |
parent | e82f2069b52fb350f4ea568957dcc5c9f3649999 (diff) |
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 'include/asm-generic')
-rw-r--r-- | include/asm-generic/mshyperv.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h index d3eae6cdbacb..2d88aa855f7e 100644 --- a/include/asm-generic/mshyperv.h +++ b/include/asm-generic/mshyperv.h @@ -254,12 +254,18 @@ bool hv_is_hyperv_initialized(void); bool hv_is_hibernation_supported(void); enum hv_isolation_type hv_get_isolation_type(void); bool hv_is_isolation_supported(void); +bool hv_isolation_type_snp(void); void hyperv_cleanup(void); bool hv_query_ext_cap(u64 cap_query); #else /* CONFIG_HYPERV */ static inline bool hv_is_hyperv_initialized(void) { return false; } static inline bool hv_is_hibernation_supported(void) { return false; } static inline void hyperv_cleanup(void) {} +static inline bool hv_is_isolation_supported(void) { return false; } +static inline enum hv_isolation_type hv_get_isolation_type(void) +{ + return HV_ISOLATION_TYPE_NONE; +} #endif /* CONFIG_HYPERV */ #endif |