diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2014-09-28 10:04:26 -0400 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2014-10-16 04:57:41 -0400 |
commit | 2df36a5dd6792870bef48f63bfca42055ea5b79c (patch) | |
tree | ef822d51fb8cd4adb030eab48c7dab131b632461 /arch/arm | |
parent | 3d08c629244257473450a8ba17cb8184b91e68f8 (diff) |
arm/arm64: KVM: Fix BE accesses to GICv2 EISR and ELRSR regs
The EIRSR and ELRSR registers are 32-bit registers on GICv2, and we
store these as an array of two such registers on the vgic vcpu struct.
However, we access them as a single 64-bit value or as a bitmap pointer
in the generic vgic code, which breaks BE support.
Instead, store them as u64 values on the vgic structure and do the
word-swapping in the assembly code, which already handles the byte order
for BE systems.
Tested-by: Victor Kamensky <victor.kamensky@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kvm/interrupts_head.S | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S index 98c8c5b9a87f..14d488388480 100644 --- a/arch/arm/kvm/interrupts_head.S +++ b/arch/arm/kvm/interrupts_head.S | |||
@@ -433,10 +433,17 @@ ARM_BE8(rev r10, r10 ) | |||
433 | str r3, [r11, #VGIC_V2_CPU_HCR] | 433 | str r3, [r11, #VGIC_V2_CPU_HCR] |
434 | str r4, [r11, #VGIC_V2_CPU_VMCR] | 434 | str r4, [r11, #VGIC_V2_CPU_VMCR] |
435 | str r5, [r11, #VGIC_V2_CPU_MISR] | 435 | str r5, [r11, #VGIC_V2_CPU_MISR] |
436 | #ifdef CONFIG_CPU_ENDIAN_BE8 | ||
437 | str r6, [r11, #(VGIC_V2_CPU_EISR + 4)] | ||
438 | str r7, [r11, #VGIC_V2_CPU_EISR] | ||
439 | str r8, [r11, #(VGIC_V2_CPU_ELRSR + 4)] | ||
440 | str r9, [r11, #VGIC_V2_CPU_ELRSR] | ||
441 | #else | ||
436 | str r6, [r11, #VGIC_V2_CPU_EISR] | 442 | str r6, [r11, #VGIC_V2_CPU_EISR] |
437 | str r7, [r11, #(VGIC_V2_CPU_EISR + 4)] | 443 | str r7, [r11, #(VGIC_V2_CPU_EISR + 4)] |
438 | str r8, [r11, #VGIC_V2_CPU_ELRSR] | 444 | str r8, [r11, #VGIC_V2_CPU_ELRSR] |
439 | str r9, [r11, #(VGIC_V2_CPU_ELRSR + 4)] | 445 | str r9, [r11, #(VGIC_V2_CPU_ELRSR + 4)] |
446 | #endif | ||
440 | str r10, [r11, #VGIC_V2_CPU_APR] | 447 | str r10, [r11, #VGIC_V2_CPU_APR] |
441 | 448 | ||
442 | /* Clear GICH_HCR */ | 449 | /* Clear GICH_HCR */ |