qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 14/15] null-machine: do not create a default memdev


From: Igor Mammedov
Subject: Re: [PATCH 14/15] null-machine: do not create a default memdev
Date: Mon, 7 Dec 2020 17:43:59 +0100

On Wed,  2 Dec 2020 03:18:53 -0500
Paolo Bonzini <pbonzini@redhat.com> wrote:

> The default RAM size is 0, so no RAM will be created anyway.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/core/null-machine.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
> index 7e693523d7..c40badf5bc 100644
> --- a/hw/core/null-machine.c
> +++ b/hw/core/null-machine.c
> @@ -49,7 +49,7 @@ static void machine_none_machine_init(MachineClass *mc)
>      mc->init = machine_none_init;
>      mc->max_cpus = 1;
>      mc->default_ram_size = 0;
> -    mc->default_ram_id = "ram";
> +    mc->default_ram_id = NULL;

probably that will break:

 QEMU -m X -M none


maybe there is  a bug over there but
    "mc->default_ram_size = 0"
above, should result in
    current_machine->ram_size == 0
in case user hasn't provided "-m"
and hence memdev shouldn't be created

>      mc->no_serial = 1;
>      mc->no_parallel = 1;
>      mc->no_floppy = 1;




reply via email to

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