qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] migration: discard non-migratable RAMBlocks


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] migration: discard non-migratable RAMBlocks
Date: Fri, 20 Apr 2018 09:47:16 +0100

On 20 April 2018 at 07:59, Cédric Le Goater <address@hidden> wrote:
> Hello David,
>
> On 04/19/2018 06:58 PM, Dr. David Alan Gilbert wrote:
>> * Cédric Le Goater (address@hidden) wrote:
>>> @@ -1823,6 +1831,7 @@ void qemu_ram_set_idstr(RAMBlock *new_block, const 
>>> char *name, DeviceState *dev)
>>>          }
>>>      }
>>>      pstrcat(new_block->idstr, sizeof(new_block->idstr), name);
>>> +    new_block->flags |= RAM_MIGRATABLE;
>>>
>>>      rcu_read_lock();
>>>      RAMBLOCK_FOREACH(block) {
>>> @@ -1845,6 +1854,7 @@ void qemu_ram_unset_idstr(RAMBlock *block)
>>>       */
>>>      if (block) {
>>>          memset(block->idstr, 0, sizeof(block->idstr));
>>> +        block->flags &= ~RAM_MIGRATABLE;
>>>      }
>>>  }
>>
>> Why in qemu_ram_set_idstr and qemu_ram_(un)set_idstr ?  It seems an
>> odd place to put them.
>
> The only place where this routines are called is from 
> vmstate_un/register_ram()
> It seemed unnecessary to add an extra interface qemu_ram_un/set_migratable().

Why not set the flags in vmstate_{register,unregister}_ram() ?

thanks
-- PMM



reply via email to

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