[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 1/2] memory: export migration page size
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v3 1/2] memory: export migration page size |
Date: |
Mon, 19 Aug 2013 14:18:05 +0300 |
On Mon, Aug 19, 2013 at 01:09:36PM +0200, Laszlo Ersek wrote:
> On 08/19/13 12:21, Peter Maydell wrote:
> > On 19 August 2013 10:59, Laszlo Ersek <address@hidden> 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.)
>
> Which is the case for 2/2, see my comments there:
>
> memory_region_init_ram()
> qemu_ram_alloc()
> qemu_ram_alloc_from_ptr() <---- host==NULL
> TARGET_PAGE_ALIGN()
>
> Laszlo
The issue this addresses is not the size of RAM allocated.
The issue is the size of the MR.
Migration code assumes the size of the MR
is a multiple of TARGET_PAGE_SIZE.
--
MST
[Qemu-devel] [PATCH v3 2/2] loader: put FW CFG ROM files into RAM, Michael S. Tsirkin, 2013/08/12
Re: [Qemu-devel] [PATCH v3 0/2] future proof rom loading for cross versiom migration, Michael S. Tsirkin, 2013/08/18
Re: [Qemu-devel] [PATCH v3 0/2] future proof rom loading for cross versiom migration, Laszlo Ersek, 2013/08/19