ARM64: KVM: fix big endian issue in access_vm_reg for 32bit guest
authorVictor Kamensky <victor.kamensky@linaro.org>
Wed, 2 Jul 2014 16:19:30 +0000 (17:19 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:19:01 +0000 (17:19 +0200)
commit5208e0ff0d5097acc955d60d4daa395893a772ce
tree0782eaf27b97fe944b9773c160144e0618040a5a
parent21c40b1a24a48d76af181a1b18315a4f0e61b37e
ARM64: KVM: fix big endian issue in access_vm_reg for 32bit guest

Fix issue with 32bit guests running on top of BE KVM host.
Indexes of high and low words of 64bit cp15 register are
swapped in case of big endian code, since 64bit cp15 state is
restored or saved with double word write or read instruction.

Define helper macro to access low words of 64bit cp15 register.

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
(cherry picked from commit f0a3eaff71b8bd5d5acfda1f0cf3eedf49755622)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/sys_regs.c