From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjVLe-0003rx-MG for qemu-devel@nongnu.org; Thu, 21 Nov 2013 09:35:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjVLZ-0007Vx-Qp for qemu-devel@nongnu.org; Thu, 21 Nov 2013 09:35:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjVLZ-0007Vt-Is for qemu-devel@nongnu.org; Thu, 21 Nov 2013 09:35:09 -0500 Date: Thu, 21 Nov 2013 15:34:53 +0100 From: Igor Mammedov Message-ID: <20131121153453.1ce72399@nial.usersys.redhat.com> In-Reply-To: <528E14F8.2070204@suse.de> References: <1385001528-12003-1-git-send-email-imammedo@redhat.com> <1385001528-12003-22-git-send-email-imammedo@redhat.com> <528D9EC8.5090307@cn.fujitsu.com> <528E14F8.2070204@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 21/27] pc: add memory hotplug 440fx machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?ISO-8859-1?B?RuRyYmVy?= Cc: peter.maydell@linaro.org, mdroth@linux.vnet.ibm.com, mst@redhat.com, hutao@cn.fujitsu.com, stefanb@linux.vnet.ibm.com, mjt@tls.msk.ru, armbru@redhat.com, qemu-devel@nongnu.org, vasilis.liaskovitis@profitbricks.com, quintela@redhat.com, chegu_vinod@hp.com, kraxel@redhat.com, aliguori@amazon.com, pbonzini@redhat.com, marcel.a@redhat.com, lcapitulino@redhat.com, stefanha@redhat.com, Li Guang On Thu, 21 Nov 2013 15:13:12 +0100 Andreas F=E4rber wrote: > Am 21.11.2013 06:48, schrieb Li Guang: > > Hi, Igor > >=20 > > Igor Mammedov wrote: > >> Add DimmBus for memory hotplug below 4Gb or above 4Gb depending > >> on initial memory size and hotplug memory size. > >> =20 > > ... > >> +static > >> +void pc_hotplug_memory_init_impl(Object *owner, > >> + MemoryRegion *system_memory, > >> + ram_addr_t low_hotplug_mem_start, > >> + ram_addr_t low_hotplug_mem_end, > >> + DimmBus *hotplug_mem_bus, > >> + ram_addr_t *high_mem_end) > >> +{ > >> + QemuOpts *opts =3D qemu_opts_find(qemu_find_opts("memory-opts"), > >> NULL); > >> + ram_addr_t ram_size =3D qemu_opt_get_size(opts, "mem", 0); > >> + ram_addr_t maxmem =3D qemu_opt_get_size(opts, "maxmem", 0); > >> + ram_addr_t hotplug_mem_size; > >> + > >> + if (maxmem<=3D ram_size) { > >> + /* Disable ACPI migration code and creation of memory devices > >> in SSDT */ > >> =20 > >=20 > > Why not give the memory that not be hot-added a chance to be placed on > > one memory slot? >=20 > Seconded, I believe I requested that on the previous version already. Because current initial memory allocation is a mess and this already large series would become even more large and intrusive, so far series it relatively not intrusive and self contained. I believe re-factoring of initial memory to use Dimm devices should be done later on top of infrastructure this series provides. > Andreas >=20 > > if all memory can be hot-added and hot-removed, then we can bring in > > more flexibility for > > memory hotplug feature. >=20