qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3.2 11/31] numa: introduce memory_region_alloca


From: Hu Tao
Subject: Re: [Qemu-devel] [PATCH v3.2 11/31] numa: introduce memory_region_allocate_system_memory
Date: Mon, 9 Jun 2014 10:24:43 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, May 14, 2014 at 05:30:23PM -0300, Eduardo Habkost wrote:
> On Wed, May 14, 2014 at 05:43:15PM +0800, Hu Tao wrote:
> > From: Paolo Bonzini <address@hidden>
> > 
> > Signed-off-by: Paolo Bonzini <address@hidden>
> > Signed-off-by: Hu Tao <address@hidden>
> > ---
> >  hw/i386/pc.c            | 4 +---
> >  include/hw/boards.h     | 6 +++++-
> >  include/sysemu/sysemu.h | 1 +
> >  numa.c                  | 9 +++++++++
> >  4 files changed, 16 insertions(+), 4 deletions(-)
> > 
> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> > index 3673da8..3778d41 100644
> > --- a/hw/i386/pc.c
> > +++ b/hw/i386/pc.c
> > @@ -1210,9 +1210,7 @@ FWCfgState *pc_memory_init(QEMUMachineInitArgs *args,
> >       * with older qemus that used qemu_ram_alloc().
> >       */
> >      ram = g_malloc(sizeof(*ram));
> > -    memory_region_init_ram(ram, NULL, "pc.ram",
> > -                           below_4g_mem_size + above_4g_mem_size);
> > -    vmstate_register_ram_global(ram);
> > +    memory_region_allocate_system_memory(ram, NULL, "pc.ram", 
> > args->ram_size);
> 
> I had to check if below_4g_mem_size+above_4g_mem_size can be always
> safely replaced by args->ram_size. Personally, wouldn't change the
> ram_size expression in the same patch that adds the new function, but:
> 
> Reviewed-by: Eduardo Habkost <address@hidden>
> 
> 
> Maybe we could at least add:
>   assert(below_4g_mem_size + above_4g_mem_size == args->ram_size);
> to the code, later?

Thanks, Done.


Hu



reply via email to

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