diff options
author | David Brazdil <dbrazdil@google.com> | 2020-12-02 21:41:05 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-12-04 13:08:32 +0300 |
commit | 5be1d6226d35800393579340f35b8b0d7b2a3177 (patch) | |
tree | d847cd987cb5aef89127415f4e0574cf16323729 /arch/arm64/kvm/hyp/nvhe/hyp-init.S | |
parent | 78869f0f0552d032c7e32724c4abb2715e8f974a (diff) | |
download | linux-5be1d6226d35800393579340f35b8b0d7b2a3177.tar.xz |
KVM: arm64: Remove vector_ptr param of hyp-init
KVM precomputes the hyp VA of __kvm_hyp_host_vector, essentially a
constant (minus ASLR), before passing it to __kvm_hyp_init.
Now that we have alternatives for converting kimg VA to hyp VA, replace
this with computing the constant inside __kvm_hyp_init, thus removing
the need for an argument.
Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201202184122.26046-10-dbrazdil@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/hyp-init.S')
-rw-r--r-- | arch/arm64/kvm/hyp/nvhe/hyp-init.S | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S b/arch/arm64/kvm/hyp/nvhe/hyp-init.S index b11a9d7db677..931a8c38f085 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S +++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S @@ -50,7 +50,6 @@ __invalid: * x1: HYP pgd * x2: per-CPU offset * x3: HYP stack - * x4: HYP vectors */ __do_hyp_init: /* Check for a stub HVC call */ @@ -134,9 +133,13 @@ alternative_else_nop_endif msr sctlr_el2, x0 isb - /* Set the stack and new vectors */ + /* Set the stack */ mov sp, x3 - msr vbar_el2, x4 + + /* Set the host vector */ + ldr x0, =__kvm_hyp_host_vector + kimg_hyp_va x0, x1 + msr vbar_el2, x0 /* Hello, World! */ mov x0, #SMCCC_RET_SUCCESS |