qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [RFC] memory: use memory_region_init_ram() instead of mem


From: Igor Mammedov
Subject: Re: [Qemu-arm] [RFC] memory: use memory_region_init_ram() instead of memory_region_allocate_system_memory()
Date: Fri, 15 Feb 2019 12:45:34 +0100

On Thu, 14 Feb 2019 18:30:37 +0000
Peter Maydell <address@hidden> wrote:

> On Thu, 14 Feb 2019 at 14:07, Igor Mammedov <address@hidden> wrote:
> > Also some boards (ab)use memory_region_allocate_system_memory(), calling it 
> > several
> > times to allocate various fixed sized chunks of RAM and ROMs, which is 
> > problematic
> > to map to a single initial RAM Machine::memdev backend and is currently 
> > broken if
> > -mem-path points to a not hugepage pool.
> 
> These boards are buggy and we could fix them, if we wanted to
> keep the existing API. We should in that case add assertions
> that memory_region_allocate_system_memory() is called once and
> only once, which would let "make check" enforce the rule.
we can do this, but I'd rather remove memory_region_allocate_system_memory() API
altogether which looks like overkill for most boards and use simpler 
memory_region_init_ram().
Then boards that need numa/hugepages could be switched to newer memdev/device 
model
instead of using memory_region_init_ram() directly.

My end-goal in all this exercise is to switch initial RAM to frontend/backend
model and replace adhoc legacy numa memory code (-numa node,mem=size  & default 
numa splitting)
handling with a generic device or memdev based one.

> 
> thanks
> - PMM




reply via email to

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