[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, 14 Dec 2020 12:53:13 +0100 |
On Sat, 12 Dec 2020 00:24:25 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 07/12/20 17:43, Igor Mammedov wrote:
> >> mc->default_ram_size = 0;
> >> - mc->default_ram_id = "ram";
> >> + mc->default_ram_id = NULL;
> > probably that will break:
> >
> > QEMU -m X -M none
>
> No, it works. "-m" is simply ignored, because the default memdev is
> created here:
you mean it doesn't explode.
By default with current code memdev should not be created,
but it is created if users asks for it with -m.
This patch breaks the later.
I'm not sure that any RAM on null machine is of any use at all
but the if we decide to get rid of it completely, then we need
to clean up
/* RAM at address zero */
if (mch->ram) {
memory_region_add_subregion(get_system_memory(), 0, mch->ram);
}
and commit title/message should match what patch does and why.
> if (machine_class->default_ram_id && current_machine->ram_size &&
> numa_uses_legacy_mem() && !current_machine->ram_memdev_id) {
> create_default_memdev(current_machine, mem_path);
> }
>
> and is thus skipped for -M none.
>
> Paolo
>
> >
> > 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
> >
>
- Re: [PATCH 10/15] vl: make qemu_get_machine_opts static, (continued)
- Re: [PATCH 10/15] vl: make qemu_get_machine_opts static, Igor Mammedov, 2020/12/08
- [PATCH] ppc/spapr: cleanup -machine pseries,nvdimm=X handling, Igor Mammedov, 2020/12/08
- [PATCH v2] ppc/spapr: cleanup -machine pseries,nvdimm=X handling, Igor Mammedov, 2020/12/08
- Re: [PATCH v2] ppc/spapr: cleanup -machine pseries,nvdimm=X handling, Daniel Henrique Barboza, 2020/12/08
- Re: [PATCH v2] ppc/spapr: cleanup -machine pseries,nvdimm=X handling, Igor Mammedov, 2020/12/08
Re: [PATCH 10/15] vl: make qemu_get_machine_opts static, Daniel Henrique Barboza, 2020/12/07
[PATCH 14/15] null-machine: do not create a default memdev, Paolo Bonzini, 2020/12/02
Re: [PATCH 00/15] Finish cleaning up qemu_init, no-reply, 2020/12/07