sparc64: use memory_region_allocate_system_memory() only for '-m' specified RAM
authorIgor Mammedov <imammedo@redhat.com>
Tue, 8 Oct 2019 11:33:16 +0000 (07:33 -0400)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 24 Oct 2019 02:37:42 +0000 (23:37 -0300)
commit6966631c3e1004a1a20bfd01f3c26a403c31f36f
tree4849ed3b46227a204c262ec46b9dad61454f4c37
parent8b44d8609f31c1948c0dd8c0c609303ce137d72c
sparc64: use memory_region_allocate_system_memory() only for '-m' specified RAM

memory_region_allocate_system_memory() was designed to be called for
allocating inital RAM. Using it mutiple times within one board is not
supported and could fail if -mem-path with non hugepage path is used.

Keep using memory_region_allocate_system_memory() only for initial
RAM and use memory_region_init_ram() for the rest fixed size regions.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20191008113318.7012-2-imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/sparc64/niagara.c