diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2017-12-03 23:54:41 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-14 09:53:01 +0100 |
commit | 73c4af9627c0914b81832e162deb34f4894760cb (patch) | |
tree | b4d58bf7e525f7f2a0e8f88d97436adaadeb456f /virt | |
parent | a52c2829cd60492fc75bafc323145cab1af915f5 (diff) | |
download | linux-stable-73c4af9627c0914b81832e162deb34f4894760cb.tar.gz linux-stable-73c4af9627c0914b81832e162deb34f4894760cb.tar.bz2 linux-stable-73c4af9627c0914b81832e162deb34f4894760cb.zip |
KVM: arm/arm64: Fix broken GICH_ELRSR big endian conversion
commit fc396e066318c0a02208c1d3f0b62950a7714999 upstream.
We are incorrectly rearranging 32-bit words inside a 64-bit typed value
for big endian systems, which would result in never marking a virtual
interrupt as inactive on big endian systems (assuming 32 or fewer LRs on
the hardware). Fix this by not doing any word order manipulation for
the typed values.
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/arm/hyp/vgic-v2-sr.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/virt/kvm/arm/hyp/vgic-v2-sr.c b/virt/kvm/arm/hyp/vgic-v2-sr.c index a3f18d362366..d7fd46fe9efb 100644 --- a/virt/kvm/arm/hyp/vgic-v2-sr.c +++ b/virt/kvm/arm/hyp/vgic-v2-sr.c @@ -34,11 +34,7 @@ static void __hyp_text save_elrsr(struct kvm_vcpu *vcpu, void __iomem *base) else elrsr1 = 0; -#ifdef CONFIG_CPU_BIG_ENDIAN - cpu_if->vgic_elrsr = ((u64)elrsr0 << 32) | elrsr1; -#else cpu_if->vgic_elrsr = ((u64)elrsr1 << 32) | elrsr0; -#endif } static void __hyp_text save_lrs(struct kvm_vcpu *vcpu, void __iomem *base) |