From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjVNI-0005or-Nn for qemu-devel@nongnu.org; Thu, 21 Nov 2013 09:37:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjVND-0007yd-Lb for qemu-devel@nongnu.org; Thu, 21 Nov 2013 09:36:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjVND-0007yX-8N for qemu-devel@nongnu.org; Thu, 21 Nov 2013 09:36:51 -0500 Date: Thu, 21 Nov 2013 16:39:51 +0200 From: "Michael S. Tsirkin" Message-ID: <20131121143951.GB11741@redhat.com> 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> <20131121153453.1ce72399@nial.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20131121153453.1ce72399@nial.usersys.redhat.com> 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: Igor Mammedov Cc: peter.maydell@linaro.org, mdroth@linux.vnet.ibm.com, stefanb@linux.vnet.ibm.com, hutao@cn.fujitsu.com, quintela@redhat.com, mjt@tls.msk.ru, armbru@redhat.com, qemu-devel@nongnu.org, vasilis.liaskovitis@profitbricks.com, chegu_vinod@hp.com, kraxel@redhat.com, aliguori@amazon.com, pbonzini@redhat.com, marcel.a@redhat.com, lcapitulino@redhat.com, stefanha@redhat.com, Andreas =?iso-8859-1?Q?F=E4rber?= , Li Guang On Thu, Nov 21, 2013 at 03:34:53PM +0100, Igor Mammedov wrote: > On Thu, 21 Nov 2013 15:13:12 +0100 > Andreas F=E4rber wrote: >=20 > > 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 dev= ices > > >> 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. >=20 > I believe re-factoring of initial memory to use Dimm devices should be > done later on top of infrastructure this series provides. Kind of makes sense, it looks like a feature request rather than a bug report. Maybe add some comments in code/commit logs? > > Andreas > >=20 > > > if all memory can be hot-added and hot-removed, then we can bring i= n > > > more flexibility for > > > memory hotplug feature. > >=20