KVM: ARM: vgic: Fix the overlap check action about setting the GICD & GICC base address.
authorHaibin Wang <wanghaibin.wang@huawei.com>
Tue, 29 Apr 2014 06:49:17 +0000 (14:49 +0800)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:18:42 +0000 (17:18 +0200)
commitde055bd5eb6f2daf69c81f6f62241f0b977a2ae4
tree04a40ac85d19aa0263a56c2545d7901b1858b250
parent4c158ade8e722cd59ba1a6d8ca46be8427c8ac90
KVM: ARM: vgic: Fix the overlap check action about setting the GICD & GICC base address.

Currently below check in vgic_ioaddr_overlap will always succeed,
because the vgic dist base and vgic cpu base are still kept UNDEF
after initialization. The code as follows will be return forever.

if (IS_VGIC_ADDR_UNDEF(dist) || IS_VGIC_ADDR_UNDEF(cpu))
                return 0;

So, before invoking the vgic_ioaddr_overlap, it needs to set the
corresponding base address firstly.

Signed-off-by: Haibin Wang <wanghaibin.wang@huawei.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 30c2117085bc4e05d091cee6eba79f069b41a9cd)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/vgic.c