diff options
author | David Brazdil <dbrazdil@google.com> | 2020-12-08 17:24:49 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-12-22 13:48:56 +0300 |
commit | c3e181aec96f6ada84df1cb72a72be8970f8b284 (patch) | |
tree | a864ed009261b1e3a304b8e6518ebb8d0d678392 /arch/arm64/kernel/smp.c | |
parent | 7a96a0687b80a1870c689418d7b72012c8bdd53d (diff) | |
download | linux-c3e181aec96f6ada84df1cb72a72be8970f8b284.tar.xz |
KVM: arm64: Skip computing hyp VA layout for VHE
Computing the hyp VA layout is redundant when the kernel runs in EL2 and
hyp shares its VA mappings. Make calling kvm_compute_layout()
conditional on not just CONFIG_KVM but also !is_kernel_in_hyp_mode().
Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201208142452.87237-4-dbrazdil@google.com
Diffstat (limited to 'arch/arm64/kernel/smp.c')
-rw-r--r-- | arch/arm64/kernel/smp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 18e9727d3f64..4e585cc892e8 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -434,7 +434,7 @@ static void __init hyp_mode_check(void) "CPU: CPUs started in inconsistent modes"); else pr_info("CPU: All CPU(s) started at EL1\n"); - if (IS_ENABLED(CONFIG_KVM)) + if (IS_ENABLED(CONFIG_KVM) && !is_kernel_in_hyp_mode()) kvm_compute_layout(); } |