Received: from eggs.gnu.org ([2001:4830:134:3::10]:35158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VktcL-0006dY-PV for qemu-devel@nongnu.org; Mon, 25 Nov 2013 05:42:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VktcG-00045t-OC for qemu-devel@nongnu.org; Mon, 25 Nov 2013 05:42:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VktcG-00045W-FY for qemu-devel@nongnu.org; Mon, 25 Nov 2013 05:42:08 -0500 Date: Mon, 25 Nov 2013 11:41:50 +0100 From: Igor Mammedov Message-ID: <20131125114150.08e05144@nial.usersys.redhat.com> In-Reply-To: <528E3037.8080005@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> <20131121153453.1ce72399@nial.usersys.redhat.com> <528E3037.8080005@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, stefanha@redhat.com, stefanb@linux.vnet.ibm.com, qemu-devel@nongnu.org, hutao@cn.fujitsu.com, mst@redhat.com, mjt@tls.msk.ru, mdroth@linux.vnet.ibm.com, armbru@redhat.com, vasilis.liaskovitis@profitbricks.com, quintela@redhat.com, kraxel@redhat.com, aliguori@amazon.com, pbonzini@redhat.com, marcel.a@redhat.com, lcapitulino@redhat.com, chegu_vinod@hp.com, Li Guang On Thu, 21 Nov 2013 17:09:27 +0100 Andreas F=E4rber wrote: > Am 21.11.2013 15:34, schrieb Igor Mammedov: > > On Thu, 21 Nov 2013 15:13:12 +0100 > > Andreas F=E4rber wrote: > >> Am 21.11.2013 06:48, schrieb Li Guang: > >>> 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. > > 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. >=20 > My problem with that is that that would be a semantically incompatible > modeling change. With your series we might have /machine/dimm.0/child[0] > be the first hot-plugged memory and once such a refactoring is done, > child[0] silently becomes -m and child[1] is the hot-added one. I think there won't be silent change in child[0], since most likely initial RAM would require additional DimmBus (maybe even 2) for it's devices. But anyway, why would this be an issue? > So if we know that we want/need to change the infrastructure, why not > add a single patch (?) to allocate one additional object on the bus now? > Unless we actually write the code, we won't know whether there are some > incorrect hot-plug assumptions in the dimm code. It wouldn't be a single simple patch for PC, I'm afraid. I don't see point in adding dummy DIMM device for initial memory and then do re-aliasing of its memory region in GPA as it's done in current code. As I see it (taking in account Marcolo's/Paolo's alignment path), current single MR for initial RAM should be split in 1-4 separate MRs depending on initial RAM amount and alignment requirements between HPA/GPA addresses. That would probably introduce additional, non hotlugable DimmBus-es (1-2) for low and high memory, which would be incompatible with old machine types devices and GPA layout, so why care about what /machine/dimm.0/child[0] would be in new machine version? > Andreas >=20