On 30 May 2018 at 02:42, Shannon Zhao <zhaoshengl...@huawei.com> wrote: > > > On 2018/5/29 22:44, Peter Maydell wrote: >> This is where we should have a comment explaining the bug and >> what the migration data from the old broken QEMU looks like; something >> like: >> >> /* Older versions of QEMU had a bug in the handling of state save/restore >> * to the KVM GICv3: they got the offset in the bitmap arrays wrong, >> * so that instead of the data for external interrupts 32 and up >> * starting at bit position 32 in the bitmap, it started at bit >> * position 0. > Not right here. for_each_dist_irq_reg starts from 32 and if irq is 32 > and gic_bmp_ptr32(bmp, irq) points bit 32, while offset passed to KVM is > 0, then it will get the GICR values for bit 32 ~ bit 63. So the data > looks like below: > [00...0 00..0 xx..x ...] > So we need to move the data down by 32 bits.
Yes, you're right. thanks -- PMM