Il mer 11 nov 2020, 20:57 Igor Mammedov <imamm...@redhat.com> ha scritto:

> On Tue, 27 Oct 2020 14:21:26 -0400
> Paolo Bonzini <pbonz...@redhat.com> wrote:
>
> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> > ---
> >  softmmu/vl.c | 40 ++++++++++++++++++++++------------------
> >  1 file changed, 22 insertions(+), 18 deletions(-)
> >
> > diff --git a/softmmu/vl.c b/softmmu/vl.c
> > index c2a5ee61f9..6749109b29 100644
> > --- a/softmmu/vl.c
> > +++ b/softmmu/vl.c
> > @@ -126,6 +126,7 @@ static const char *boot_once;
> >  static const char *incoming;
> >  static const char *loadvm;
> >  enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
>
> > +int mem_prealloc; /* force preallocation of physical target memory */
> Is there a reason for it not being static?
>

I will check if I am using it later in the series, but I don't think so.


> >  int display_opengl;
> >  const char* keyboard_layout = NULL;
> >  ram_addr_t ram_size;
> > @@ -159,7 +160,7 @@ int fd_bootchk = 1;
> >  static int no_reboot;
> >  int no_shutdown = 0;
> >  int graphic_rotate = 0;
> > -const char *watchdog;
> > +static const char *watchdog;
> >  QEMUOptionRom option_rom[MAX_OPTION_ROMS];
> >  int nb_option_roms;
> >  int old_param = 0;
> > @@ -2910,6 +2911,25 @@ static void qemu_validate_options(void)
> >  #endif
> >  }
> >
> > +static void qemu_process_sugar_options(void)
> > +{
> > +    if (mem_prealloc) {
> > +        char *val;
> > +
> > +        val = g_strdup_printf("%d",
> > +                 (uint32_t)
> qemu_opt_get_number(qemu_find_opts_singleton("smp-opts"), "cpus", 1));
> if -smp isn't present it value used here was mc->default_cpus,
> which in most cases is 1 modulo some ARM boards and riscv.
>

Yes, I remember noticing that but decided I would not care. I should have
added it to the commit message, though.

Paolo

Reply via email to