diff options
author | Marc Zyngier <maz@kernel.org> | 2020-10-21 23:52:54 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-11-27 14:32:44 +0300 |
commit | 29052f1b92f2bcb0419c544459f4c919bfb20898 (patch) | |
tree | ddb7910c8bc242787b6638f75baa11461593850c /arch/arm64/kvm/hyp/nvhe/hyp-main.c | |
parent | 68b824e428c5fb5c3dc5ef80b1543e767534b58e (diff) | |
download | linux-29052f1b92f2bcb0419c544459f4c919bfb20898.tar.xz |
KVM: arm64: Simplify __kvm_enable_ssbs()
Move the setting of SSBS directly into the HVC handler, using
the C helpers rather than the inline asssembly code.
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/hyp-main.c')
-rw-r--r-- | arch/arm64/kvm/hyp/nvhe/hyp-main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c index c0543b2e760e..82df7fc24760 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c +++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c @@ -58,7 +58,11 @@ static void handle___kvm_timer_set_cntvoff(struct kvm_cpu_context *host_ctxt) static void handle___kvm_enable_ssbs(struct kvm_cpu_context *host_ctxt) { - __kvm_enable_ssbs(); + u64 tmp; + + tmp = read_sysreg_el2(SYS_SCTLR); + tmp |= SCTLR_ELx_DSSBS; + write_sysreg_el2(tmp, SYS_SCTLR); } static void handle___vgic_v3_get_ich_vtr_el2(struct kvm_cpu_context *host_ctxt) |