diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2013-08-05 18:08:41 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 17:18:03 -0700 |
commit | 008fe511c11fa20d1060c9e2ddb9c829ac44e0a7 (patch) | |
tree | 1fd93ca25ec7f8a141f802f049d62887f1f7cb9c /arch/arm64 | |
parent | 464de2dc1539e6355fad1342ad106f08f7642edd (diff) | |
download | linux-3.10-008fe511c11fa20d1060c9e2ddb9c829ac44e0a7.tar.gz linux-3.10-008fe511c11fa20d1060c9e2ddb9c829ac44e0a7.tar.bz2 linux-3.10-008fe511c11fa20d1060c9e2ddb9c829ac44e0a7.zip |
ARM: KVM: Fix 64-bit coprocessor handling
commit 240e99cbd00aa541b572480e3ea7ecb0d480bc79 upstream.
The PAR was exported as CRn == 7 and CRm == 0, but in fact the primary
coprocessor register number was determined by CRm for 64-bit coprocessor
registers as the user space API was modeled after the coprocessor
access instructions (see the ARM ARM rev. C - B3-1445).
However, just changing the CRn to CRm breaks the sorting check when
booting the kernel, because the internal kernel logic always treats CRn
as the primary register number, and it makes the table sorting
impossible to understand for humans.
Alternatively we could change the logic to always have CRn == CRm, but
that becomes unclear in the number of ways we do look up of a coprocessor
register. We could also have a separate 64-bit table but that feels
somewhat over-engineered. Instead, keep CRn the primary representation
of the primary coproc. register number in-kernel and always export the
primary number as CRm as per the existing user space ABI.
Note: The TTBR registers just magically worked because they happened to
follow the CRn(0) regs and were considered CRn(0) in the in-kernel
representation.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Kim Phillips <kim.phillips@linaro.org>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm64')
0 files changed, 0 insertions, 0 deletions