summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/mshyperv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 26b9fcabd7d9..c8d3ca2b0e0e 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -413,10 +413,11 @@ static void __init ms_hyperv_init_platform(void)
ms_hyperv.isolation_config_a, ms_hyperv.isolation_config_b);
- if (cc_platform_has(CC_ATTR_GUEST_SEV_SNP)) {
- static_branch_enable(&isolation_type_en_snp);
- } else if (hv_get_isolation_type() == HV_ISOLATION_TYPE_SNP) {
- static_branch_enable(&isolation_type_snp);
+ if (hv_get_isolation_type() == HV_ISOLATION_TYPE_SNP) {
+ if (ms_hyperv.paravisor_present)
+ static_branch_enable(&isolation_type_snp);
+ else
+ static_branch_enable(&isolation_type_en_snp);
}
}