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 <marcandre.lur...@redhat.com>
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