qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 10/10] hostmem: use object id for memory regi


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v2 10/10] hostmem: use object id for memory region name with >= 3.1
Date: Wed, 31 Oct 2018 17:27:57 -0300
User-agent: Mutt/1.9.2 (2017-12-15)

On Tue, Oct 30, 2018 at 07:04:53PM +0400, Marc-André Lureau wrote:
> hostmem-file and hostmem-memfd use the whole object path for the
> memory region name, and hostname-ram uses only the path component (the
> object id, or canonical path basename):
> 
> qemu -m 1024 -object memory-backend-file,id=mem,size=1G,mem-path=/tmp/foo 
> -numa node,memdev=mem -monitor stdio
> (qemu) info ramblock
>               Block Name    PSize              Offset               Used      
>         Total
>             /objects/mem    4 KiB  0x0000000000000000 0x0000000040000000 
> 0x0000000040000000
> 
> qemu -m 1024 -object memory-backend-memfd,id=mem,size=1G -numa 
> node,memdev=mem -monitor stdio
> (qemu) info ramblock
>               Block Name    PSize              Offset               Used      
>         Total
>             /objects/mem    4 KiB  0x0000000000000000 0x0000000040000000 
> 0x0000000040000000
> 
> qemu -m 1024 -object memory-backend-ram,id=mem,size=1G -numa node,memdev=mem 
> -monitor stdio
> (qemu) info ramblock
>               Block Name    PSize              Offset               Used      
>         Total
>                      mem    4 KiB  0x0000000000000000 0x0000000040000000 
> 0x0000000040000000
> 
> Use the object id for -file and -memfd with >= 3.1 for consistency.
> Having a consistent naming allow to migrate to different hostmem
> backends.
> 
> Signed-off-by: Marc-André Lureau <address@hidden>

I don't want to make you feel like you wasted your time on the
global property system refactor, but:

Maybe it would be simpler to add a
  bool MachineClass::canonical_path_for_ramblock_id
field, instead of refactoring the global property system,
considering that we're past soft freeze?

Sometimes I think the global property system was a mistake, and
that we should avoid spreading it to other subsystems.

-- 
Eduardo



reply via email to

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