diff options
author | James Morse <james.morse@arm.com> | 2018-01-08 18:38:07 +0300 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-01-13 13:44:40 +0300 |
commit | 1f742679c33bc083722cb0b442a95d458c491b56 (patch) | |
tree | 1b74923a27d7239a010fd16aadf30ed3014f6f1a /arch/arm64/kvm/hyp/s2-setup.c | |
parent | 6d99b68933fbcf51f84fcbba49246ce1209ec193 (diff) | |
download | linux-1f742679c33bc083722cb0b442a95d458c491b56.tar.xz |
KVM: arm64: Stop save/restoring host tpidr_el1 on VHE
Now that a VHE host uses tpidr_el2 for the cpu offset we no longer
need KVM to save/restore tpidr_el1. Move this from the 'common' code
into the non-vhe code. While we're at it, on VHE we don't need to
save the ELR or SPSR as kernel_entry in entry.S will have pushed these
onto the kernel stack, and will restore them from there. Move these
to the non-vhe code as we need them to get back to the host.
Finally remove the always-copy-tpidr we hid in the stage2 setup
code, cpufeature's enable callback will do this for VHE, we only
need KVM to do it for non-vhe. Add the copy into kvm-init instead.
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kvm/hyp/s2-setup.c')
-rw-r--r-- | arch/arm64/kvm/hyp/s2-setup.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/arm64/kvm/hyp/s2-setup.c b/arch/arm64/kvm/hyp/s2-setup.c index 74306c33a6de..603e1ee83e89 100644 --- a/arch/arm64/kvm/hyp/s2-setup.c +++ b/arch/arm64/kvm/hyp/s2-setup.c @@ -86,8 +86,5 @@ u32 __hyp_text __init_stage2_translation(void) write_sysreg(val, vtcr_el2); - /* copy tpidr_el1 into tpidr_el2 for use by HYP */ - write_sysreg(read_sysreg(tpidr_el1), tpidr_el2); - return parange; } |