Re: [Qemu-devel] [PATCH for-3.0 3/9] migration: fix incorrect bitmap size calculation

2018-07-05 Thread Juan Quintela
Peter Xu wrote: > The calculation on size of received bitmap is incorrect for postcopy > recovery. Here we wanted to let the size to cover all the valid bits in > the bitmap, we should use DIV_ROUND_UP() instead of a division. > > For example, a RAMBlock with size=4K (which contains only one sing

Re: [Qemu-devel] [PATCH for-3.0 3/9] migration: fix incorrect bitmap size calculation

2018-07-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > The calculation on size of received bitmap is incorrect for postcopy > recovery. Here we wanted to let the size to cover all the valid bits in > the bitmap, we should use DIV_ROUND_UP() instead of a division. > > For example, a RAMBlock with size=4K (which

[Qemu-devel] [PATCH for-3.0 3/9] migration: fix incorrect bitmap size calculation

2018-07-04 Thread Peter Xu
The calculation on size of received bitmap is incorrect for postcopy recovery. Here we wanted to let the size to cover all the valid bits in the bitmap, we should use DIV_ROUND_UP() instead of a division. For example, a RAMBlock with size=4K (which contains only one single 4K page) will have nbit