On Tue, Mar 11, 2014 at 09:03:29AM +0100, Paolo Bonzini wrote: > Il 11/03/2014 04:50, Hu Tao ha scritto: > >On Tue, Mar 04, 2014 at 03:00:45PM +0100, Paolo Bonzini wrote: > >>Like the previous patch did in exec.c, split memory_region_init_ram and > >>memory_region_init_ram_from_file, and push mem_path one step further up. > >>Other RAM regions than system memory will now be backed by regular RAM. > > > >This changes qemu's behaviour regarding using hugetlbfs, especially when > >size of other RAM regions is significant compared to system memory. Will > >this a problem?(compatibilities, user configurations...) > > I think it's a bugfix, especially with 1G hugepages. Wasting 1G on > VGA memory is not really a good idea.
What about this if (memory < hpagesize) { return NULL; } > >> > >>Also, boards that do not use memory_region_allocate_system_memory will > >>not support -mem-path anymore. This can be changed before the patches > >>are merged by migrating boards to use the function. > > > >IIUC, memory_region_allocate_system_memory() is only called once at > >board initialization time. In most cases, it just works. But there > >are cases that system memory is not initialized by a single call to > >memory_region_allocate_system_memory() that total memory is splitted > >into banks each of which is initialized individually, see > >ppc4xx_sdram_adjust(). How to convert to > >memory_region_allocate_system_memory() in this case? Should we map > >banks into numa nodes? > > The solution would be to use aliases to split the system RAM into banks. > > Paolo