summaryrefslogtreecommitdiff
path: root/arch/arm/kvm
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2017-04-20 18:02:21 +0300
committerChristoffer Dall <cdall@linaro.org>2017-04-20 21:17:57 +0300
commit1edb632133efb6226b6bef3e7d9fa8c7134ac4e2 (patch)
tree8451658c150adde8d165549ab5d2f3249344e6b1 /arch/arm/kvm
parent5b560525add78e15fd5b75e5d03ea1ff988e6747 (diff)
downloadlinux-1edb632133efb6226b6bef3e7d9fa8c7134ac4e2.tar.xz
ARM: KVM: Fix idmap stub entry when running Thumb-2 code
When entering the hyp stub implemented in the idmap, we try to be mindful of the fact that we could be running a Thumb-2 kernel by adding 1 to the address we compute. Unfortunately, the assembler also knows about this trick, and has already generated an address that has bit 0 set in the litteral pool. Our superfluous correction ends up confusing the CPU entierely, as we now branch to the stub in ARM mode instead of Thumb, and on a possibly unaligned address for good measure. From that point, nothing really good happens. The obvious fix in to remove this stupid target PC correction. Fixes: 6bebcecb6c5b ("ARM: KVM: Allow the main HYP code to use the init hyp stub implementation") Reported-by: Christoffer Dall <cdall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <cdall@linaro.org>
Diffstat (limited to 'arch/arm/kvm')
-rw-r--r--arch/arm/kvm/hyp/hyp-entry.S1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/arm/kvm/hyp/hyp-entry.S b/arch/arm/kvm/hyp/hyp-entry.S
index a35baa81fd23..95a2faefc070 100644
--- a/arch/arm/kvm/hyp/hyp-entry.S
+++ b/arch/arm/kvm/hyp/hyp-entry.S
@@ -144,7 +144,6 @@ hyp_hvc:
ldr r1, [r1]
ldr ip, =__kvm_handle_stub_hvc
sub ip, ip, r1
-THUMB( add ip, ip, #1)
pop {r1}
bx ip