From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjV0c-00030I-Jh for qemu-devel@nongnu.org; Thu, 21 Nov 2013 09:13:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjV0V-0000Ec-9x for qemu-devel@nongnu.org; Thu, 21 Nov 2013 09:13:30 -0500 Received: from cantor2.suse.de ([195.135.220.15]:50070 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjV0V-0000DO-3S for qemu-devel@nongnu.org; Thu, 21 Nov 2013 09:13:23 -0500 Message-ID: <528E14F8.2070204@suse.de> Date: Thu, 21 Nov 2013 15:13:12 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1385001528-12003-1-git-send-email-imammedo@redhat.com> <1385001528-12003-22-git-send-email-imammedo@redhat.com> <528D9EC8.5090307@cn.fujitsu.com> In-Reply-To: <528D9EC8.5090307@cn.fujitsu.com> 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: Li Guang , Igor Mammedov Cc: peter.maydell@linaro.org, aliguori@amazon.com, stefanb@linux.vnet.ibm.com, armbru@redhat.com, mst@redhat.com, mjt@tls.msk.ru, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, vasilis.liaskovitis@profitbricks.com, quintela@redhat.com, kraxel@redhat.com, stefanha@redhat.com, hutao@cn.fujitsu.com, pbonzini@redhat.com, marcel.a@redhat.com, lcapitulino@redhat.com, chegu_vinod@hp.com 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? Seconded, I believe I requested that on the previous version already. Andreas > if all memory can be hot-added and hot-removed, then we can bring in > more flexibility for > memory hotplug feature. --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg