[Qemu-devel] [PATCH 01/13] hbitmap: serialization

2015-11-11 Thread Vladimir Sementsov-Ogievskiy
Functions to serialize / deserialize(restore) HBitmap. HBitmap should be saved to linear sequence of bits independently of endianness and bitmap array element (unsigned long) size. Therefore Little Endian is chosen. These functions are appropriate for dirty bitmap migration, restoring the bitmap i

Re: [Qemu-devel] [PATCH 01/13] hbitmap: serialization

2015-12-02 Thread Fam Zheng
On Wed, 11/11 18:16, Vladimir Sementsov-Ogievskiy wrote: > +void hbitmap_deserialize_finish(HBitmap *bitmap) > +{ > +int64_t i, size, prev_size; > +int lev; > + > +/* restore levels starting from penultimate to zero level, assuming > + * that the last level is ok */ > +size = MA

Re: [Qemu-devel] [PATCH 01/13] hbitmap: serialization

2015-12-02 Thread Vladimir Sementsov-Ogievskiy
On 03.12.2015 10:35, Fam Zheng wrote: On Wed, 11/11 18:16, Vladimir Sementsov-Ogievskiy wrote: +void hbitmap_deserialize_finish(HBitmap *bitmap) +{ +int64_t i, size, prev_size; +int lev; + +/* restore levels starting from penultimate to zero level, assuming + * that the last leve