qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] machine: do not crash if default RAM backend name has been s


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] machine: do not crash if default RAM backend name has been stollen
Date: Mon, 22 May 2023 15:33:16 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 22/5/23 15:17, Igor Mammedov wrote:
QEMU aborts when default RAM backend should be used (i.e. no
explicit '-machine memory-backend=' specified) but user
has created an object which 'id' equals to default RAM backend
name used by board.

  $QEMU -machine pc \
        -object memory-backend-ram,id=pc.ram,size=4294967296

  Actual results:
  QEMU 7.2.0 monitor - type 'help' for more information
  (qemu) Unexpected error in object_property_try_add() at ../qom/object.c:1239:
  qemu-kvm: attempt to add duplicate property 'pc.ram' to object (type 
'container')
  Aborted (core dumped)

Instead of abort, check for the conflicting 'id' and exit with
an error, suggesting how to remedy the issue.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
CC: thuth@redhat.com
---
  hw/core/machine.c | 8 ++++++++
  1 file changed, 8 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

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