On 19 August 2013 10:59, Laszlo Ersek <ler...@redhat.com> wrote: > On 08/13/13 00:43, Michael S. Tsirkin wrote: >> Migration code assumes that each RAM block is a multiple of target page >> size. > > Isn't that a valid assumption, considering the TARGET_PAGE_ALIGN() macro > call in qemu_ram_alloc_from_ptr() [exec.c]?
That macro only makes the size we store in the ramblock data structure be a multiple of the page size -- it does nothing to ensure that the actual memory that was passed in by the caller is the right size. (It will have the right effect where qemu_ram_alloc_from_ptr is allocating the memory itself, obviously.) -- PMM