ARM: KVM: vgic: fix GICD_ICFGRn access
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 29 Aug 2013 10:08:23 +0000 (11:08 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:18:02 +0000 (17:18 +0200)
commit635c887f2931a200a52694170122e2b62d1b6218
treea613b3968bc3479221138db8231b471405ea1ac0
parent1752d0c7e51f1a5e8d1f021d6b4eef1845c6da06
ARM: KVM: vgic: fix GICD_ICFGRn access

All the code in handle_mmio_cfg_reg() assumes the offset has
been shifted right to accomodate for the 2:1 bit compression,
but this is only done when getting the register address.

Shift the offset early so the code works mostly unchanged.

Reported-by: Zhaobo (Bob, ERC) <zhaobo@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
(cherry picked from commit 6545eae3d7a1b6dc2edb8ede9107998aee1207ef)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/vgic.c