qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-1.6 2/2] loader: put FW CFG ROM files into R


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH for-1.6 2/2] loader: put FW CFG ROM files into RAM
Date: Mon, 12 Aug 2013 10:32:40 +0100

On 12 August 2013 09:49, Michael S. Tsirkin <address@hidden> wrote:
> +static void *rom_set_mr(Rom *rom, Object *owner, const char *name)
> +{
> +    /*
> +     * Migration code expects that all RAM blocks are full target pages.
> +     * Round MR size up to make this work.
> +     */
> +    unsigned size = ROUND_UP(rom->datasize, qemu_target_page_size);
> +    void *data = g_malloc0(size);

If we don't really care where the data lives (ie we are just
allocating a block for it here) it would be better to get the
memory subsystem to do the allocation, because then the information
about the constraints on the size of the region would be confined
to the memory system.

> +    data = data;

Huh?

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]