diff mbox

[v2,8/9] memory: Move owner-less MemoryRegions to /machine/unattached

Message ID 1426178624-32638-9-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber March 12, 2015, 4:43 p.m. UTC
This cleans up the official /machine namespace. In particular
/machine/system and /machine/io as well as entries with non-sanitized
node names.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini March 12, 2015, 6:05 p.m. UTC | #1
On 12/03/2015 17:43, Andreas Färber wrote:
> This cleans up the official /machine namespace. In particular
> /machine/system and /machine/io as well as entries with non-sanitized
> node names.

Just a question: isn't it /machine/system[0] and /machine/io[0]?

> 
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  memory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/memory.c b/memory.c
> index 20f6d9e..ee3f2a8 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -868,7 +868,7 @@ void memory_region_init(MemoryRegion *mr,
>                          uint64_t size)
>  {
>      if (!owner) {
> -        owner = qdev_get_machine();
> +        owner = container_get(qdev_get_machine(), "/unattached");
>      }
>  
>      object_initialize(mr, sizeof(*mr), TYPE_MEMORY_REGION);
> 

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Andreas Färber March 12, 2015, 7:16 p.m. UTC | #2
Am 12.03.2015 um 19:05 schrieb Paolo Bonzini:
> On 12/03/2015 17:43, Andreas Färber wrote:
>> This cleans up the official /machine namespace. In particular
>> /machine/system and /machine/io as well as entries with non-sanitized
>> node names.
> 
> Just a question: isn't it /machine/system[0] and /machine/io[0]?

You're right. Still, now that these names are used in a global generic
context, I think "system" is too generic - "/machine/system-memory"
would be better than "/machine/system[0]".

Other names I referred to above are "vga ioports remapped[0]", "bochs
dispi interface[0]" and "qemu extended regs[0]", each containing spaces.
I.e., those names were at the time chosen as textual descriptions and
not as QOM path components.

>>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>  memory.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/memory.c b/memory.c
>> index 20f6d9e..ee3f2a8 100644
>> --- a/memory.c
>> +++ b/memory.c
>> @@ -868,7 +868,7 @@ void memory_region_init(MemoryRegion *mr,
>>                          uint64_t size)
>>  {
>>      if (!owner) {
>> -        owner = qdev_get_machine();
>> +        owner = container_get(qdev_get_machine(), "/unattached");
>>      }
>>  
>>      object_initialize(mr, sizeof(*mr), TYPE_MEMORY_REGION);
>>
> 
> Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Do you have any outstanding memory patches, or should I fix up the
commit message and take it through qom-next?

Thanks,
Andreas
diff mbox

Patch

diff --git a/memory.c b/memory.c
index 20f6d9e..ee3f2a8 100644
--- a/memory.c
+++ b/memory.c
@@ -868,7 +868,7 @@  void memory_region_init(MemoryRegion *mr,
                         uint64_t size)
 {
     if (!owner) {
-        owner = qdev_get_machine();
+        owner = container_get(qdev_get_machine(), "/unattached");
     }
 
     object_initialize(mr, sizeof(*mr), TYPE_MEMORY_REGION);