On 2014/4/29 15:19, Christoffer Dall wrote: > On Tue, Apr 29, 2014 at 02:49:17PM +0800, Haibin Wang wrote: >> From: Haibin Wang <wanghaibin.wang@xxxxxxxxxx> >> >> 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@xxxxxxxxxx> >> Acked-by: Marc Zyngier <marc.zyngier@xxxxxxx> > > Is this a V2 with the changes incorporated to address Marc's comment? > > If so, specifying this in the patch would be helpful. > > -Christoffer OK, this is my mistake. The patch is V2! Thanks. > >> --- >> virt/kvm/arm/vgic.c | 5 +++-- >> 1 files changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c >> index 7e8b44e..129867b 100644 >> --- a/virt/kvm/arm/vgic.c >> +++ b/virt/kvm/arm/vgic.c >> @@ -1668,10 +1668,11 @@ static int vgic_ioaddr_assign(struct kvm *kvm, phys_addr_t *ioaddr, >> if (addr + size < addr) >> return -EINVAL; >> >> + *ioaddr = addr; >> ret = vgic_ioaddr_overlap(kvm); >> if (ret) >> - return ret; >> - *ioaddr = addr; >> + *ioaddr = VGIC_ADDR_UNDEF; >> + >> return ret; >> } >> >> -- >> 1.7.1 >> >> >> _______________________________________________ >> kvmarm mailing list >> kvmarm@xxxxxxxxxxxxxxxxxxxxx >> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm > > _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm