ARM: KVM: fix handling of trapped 64bit coprocessor accesses
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 21 Jan 2014 18:56:26 +0000 (18:56 +0000)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:18:35 +0000 (17:18 +0200)
commitd773d11dd453f43793082c5206799c818a4a4b55
tree9d77bbb57293b8df877c372d16451155bc3eb436
parentebdea56c8b2acd4fd7a421d1d670e6bf10f37e60
ARM: KVM: fix handling of trapped 64bit coprocessor accesses

Commit 240e99cbd00a (ARM: KVM: Fix 64-bit coprocessor handling)
changed the way we match the 64bit coprocessor access from
user space, but didn't update the trap handler for the same
set of registers.

The effect is that a trapped 64bit access is never matched, leading
to a fault being injected into the guest. This went unnoticed as we
didn't really trap any 64bit register so far.

Placing the CRm field of the access into the CRn field of the matching
structure fixes the problem. Also update the debug feature to emit the
expected string in case of failing match.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 46c214dd595381c880794413facadfa07fba5c95)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/kvm/coproc.c
arch/arm/kvm/coproc.h