summaryrefslogtreecommitdiff
path: root/drivers/hv/hv_common.c
diff options
context:
space:
mode:
authorDexuan Cui <decui@microsoft.com>2023-08-24 01:07:11 -0700
committerWei Liu <wei.liu@kernel.org>2023-08-25 00:04:57 +0000
commite3131f1c81448a87e08dffd21867312a5ce563d9 (patch)
treefff8b96a8664d6478e41917a305c53bcc7a79048 /drivers/hv/hv_common.c
parentb9b4fe3a72b60c8d74a9ffb61aa778f04eaddd87 (diff)
x86/hyperv: Remove hv_isolation_type_en_snp
In ms_hyperv_init_platform(), do not distinguish between a SNP VM with the paravisor and a SNP VM without the paravisor. Replace hv_isolation_type_en_snp() with !ms_hyperv.paravisor_present && hv_isolation_type_snp(). The hv_isolation_type_en_snp() in drivers/hv/hv.c and drivers/hv/hv_common.c can be changed to hv_isolation_type_snp() since we know !ms_hyperv.paravisor_present is true there. Signed-off-by: Dexuan Cui <decui@microsoft.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Reviewed-by: Tianyu Lan <tiala@microsoft.com> Signed-off-by: Wei Liu <wei.liu@kernel.org> Link: https://lore.kernel.org/r/20230824080712.30327-10-decui@microsoft.com
Diffstat (limited to 'drivers/hv/hv_common.c')
-rw-r--r--drivers/hv/hv_common.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
index e62d64753902..81aa8be3e0df 100644
--- a/drivers/hv/hv_common.c
+++ b/drivers/hv/hv_common.c
@@ -383,7 +383,7 @@ int hv_common_cpu_init(unsigned int cpu)
}
if (!ms_hyperv.paravisor_present &&
- (hv_isolation_type_en_snp() || hv_isolation_type_tdx())) {
+ (hv_isolation_type_snp() || hv_isolation_type_tdx())) {
ret = set_memory_decrypted((unsigned long)mem, pgcount);
if (ret) {
/* It may be unsafe to free 'mem' */
@@ -532,12 +532,6 @@ bool __weak hv_isolation_type_snp(void)
}
EXPORT_SYMBOL_GPL(hv_isolation_type_snp);
-bool __weak hv_isolation_type_en_snp(void)
-{
- return false;
-}
-EXPORT_SYMBOL_GPL(hv_isolation_type_en_snp);
-
bool __weak hv_isolation_type_tdx(void)
{
return false;