qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/3] Add new utility function memory_region_allo


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 0/3] Add new utility function memory_region_allocate_aux_memory()
Date: Fri, 7 Jul 2017 11:43:05 +0100

On 6 July 2017 at 18:47, Peter Maydell <address@hidden> wrote:
> On 6 July 2017 at 18:26, Paolo Bonzini <address@hidden> wrote:
>> Maybe, for memory_region_init_ram only, the owner argument can be made a
>> DeviceState (or NULL)?
>
> Something that might influence things here -- of the twelve
> callers of vmstate_register_ram(), only 6 use an 'owner'
> pointer that's the same as the one they use for initializing
> the memory region (and 3 of those are using _init_rom or
> _init_rom_device rather than init_ram directly).

Conversely there are 14 or so places that init a RAM MR
with a non-NULL owner but then use vmstate_register_ram_global
rather than vmstate_register_ram, and so which would be
stuck using the old _nomigrate() function if we make it
use the owner pointer.

I guess we should think about the long term and design
the API to encourage the behaviour we want for new code,
rather than to catch as much of possible of existing
usage, though?

thanks
-- PMM



reply via email to

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