|
From: | Igor Mitsyanko |
Subject: | Re: [Qemu-devel] [PATCH V4 08/12] hw/sd.c: add SD card save/load support |
Date: | Tue, 31 Jul 2012 22:18:57 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
On 07/31/2012 06:56 PM, Peter Maydell wrote:
On 27 July 2012 20:29, Igor Mitsyanko <address@hidden> wrote:+ VMSTATE_BUFFER_MULTIPLY(wp_groups, SDState, 1, NULL, 0, wpgrps_size, + sizeof(unsigned long)),Isn't this trying to use wpgrps_size as the number of unsigned longs in the bitmap, when it's actually the size of the bitmap in bits? (Does this correctly work in migration between 32 and 64 bit systems where 'unsigned long' is a different size? How about between a little endian 32 bit system and a big endian 64 bit system? I don't know enough about the vmstate macros to be confident here...) -- PMM
You're right, bitmap_new() can allocated buffers of different size for the same number of bits but different sizeof(long) value. Maybe always align allocated buffer size to 8 byte? Endianess seems like even bigger issue.. Looks like we need to think of something else here.
[Prev in Thread] | Current Thread | [Next in Thread] |