From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhv83-0001Ew-AG for qemu-devel@nongnu.org; Tue, 14 Apr 2015 03:19:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yhv81-00078E-Ti for qemu-devel@nongnu.org; Tue, 14 Apr 2015 03:19:27 -0400 Date: Tue, 14 Apr 2015 17:17:21 +1000 From: David Gibson Message-ID: <20150414071721.GA28310@voom.redhat.com> References: <1427117764-23008-1-git-send-email-bharata@linux.vnet.ibm.com> <1427117764-23008-22-git-send-email-bharata@linux.vnet.ibm.com> <20150325055818.GF25043@voom.fritz.box> <20150413025933.GA4694@in.ibm.com> <20150413160424.63e1ef55@nial.brq.redhat.com> <20150413142705.GD4694@in.ibm.com> <20150413165552.1733b9bd@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <20150413165552.1733b9bd@nial.brq.redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH v2 21/23] spapr: Initialize hotplug memory address space List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, Bharata B Rao , nfont@linux.vnet.ibm.com, afaerber@suse.de --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 13, 2015 at 04:55:52PM +0200, Igor Mammedov wrote: > On Mon, 13 Apr 2015 19:57:05 +0530 > Bharata B Rao wrote: >=20 > > On Mon, Apr 13, 2015 at 04:04:24PM +0200, Igor Mammedov wrote: > > > On Mon, 13 Apr 2015 08:29:33 +0530 > > > Bharata B Rao wrote: > > >=20 > > > > On Wed, Mar 25, 2015 at 04:58:18PM +1100, David Gibson wrote: > > > > > On Mon, Mar 23, 2015 at 07:06:02PM +0530, Bharata B Rao wrote: > > > > > > Initialize a hotplug memory region under which all the hotplugg= ed > > > > > > memory is accommodated. Also enable memory hotplug by setting > > > > > > CONFIG_MEM_HOTPLUG. > > > > > >=20 > > > > > > Modelled on i386 memory hotplug. > > > > > >=20 > > > > > > Signed-off-by: Bharata B Rao > > > > > > --- > > > > > > default-configs/ppc64-softmmu.mak | 1 + > > > > > > hw/ppc/spapr.c | 50 +++++++++++++++++++++++= ++++++++++++++++ > > > > > > include/hw/ppc/spapr.h | 12 ++++++++++ > > > > > > 3 files changed, 63 insertions(+) > > > > > >=20 > > > > > > diff --git a/default-configs/ppc64-softmmu.mak b/default-config= s/ppc64-softmmu.mak > > > > > > index 22ef132..16b3011 100644 > > > > > > --- a/default-configs/ppc64-softmmu.mak > > > > > > +++ b/default-configs/ppc64-softmmu.mak > > > > > > @@ -51,3 +51,4 @@ CONFIG_XICS_KVM=3D$(and $(CONFIG_PSERIES),$(C= ONFIG_KVM)) > > > > > > # For PReP > > > > > > CONFIG_MC146818RTC=3Dy > > > > > > CONFIG_ISA_TESTDEV=3Dy > > > > > > +CONFIG_MEM_HOTPLUG=3Dy > > > > > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > > > > > index 3e56d9e..e43bb49 100644 > > > > > > --- a/hw/ppc/spapr.c > > > > > > +++ b/hw/ppc/spapr.c > > > > > > @@ -125,8 +125,13 @@ struct sPAPRMachineState { > > > > > > =20 > > > > > > /*< public >*/ > > > > > > char *kvm_type; > > > > > > + ram_addr_t hotplug_memory_base; > > > > > > + MemoryRegion hotplug_memory; > > > > > > + bool enforce_aligned_dimm; > > > > > > }; > > > > > > =20 > > > > > > +#define SPAPR_MACHINE_ENFORCE_ALIGNED_DIMM "enforce-aligned-di= mm" > > > > >=20 > > > > > What's the rationale for including this option? > > > >=20 > > > > I couldn't see any use, but added it to be similar with x86. May be= Igor > > > > can tell us ? > > > at least on x86 KVM requires memory region be aligned (otherwise it w= ould abort) > > > and also performance wise it's better to map regions at offsets align= ed at > > > backend page size (especially applicable for hugepages). > > >=20 > > > so region base on x86 is 1Gb aligned to support upto 1Gb hugepages. > >=20 > > My question was specifically about the enforce-aligned-dimm object prop= erty > > that has a get method. I was wondering where this property is consumed.= All > > I could see is that PCMachineState.enforce_aligned_dimm used/referenced > > directly. > I think that you don't heed it, it was introduce to to keep memory layout > compatible with old machine types that didn't have aligned memhp region. >=20 > Since there is nothing to keep compatible in this target, you can just > drop property and always align region as fit for spapr. That sounds like a good idea to me. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --wac7ysb48OaltWcw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVLL8BAAoJEGw4ysog2bOSG94QAJTq/onCyK/87X3cvlL5QgEm mZI12uWkQ3cuh4g7t1ouh35GMPfM39LpnZHEcxIKrL3Sj3omvZsS/w43sxbqub/C aWig8z5uwFxbHYoSBeYbiaYl2U9xbY85yQIEcKrB5NFfUoGWhffz9I3n+I6GQXDi /ni7M2I2C9oomzoZFGLPR0HBVjXnv4USStla+8jcqRbeH1XOQ+LnH9e59xNMhM3X Psn4ltBoZYmW54M3Y0n6tlVyc1p1gHySxwagt44gyd1qs6lrLx/XkJtoXF1rc3xF B0VhF+CiHnq7qeYFPJREHBW9iOO2Vx4/HyXRS2CTiI7c+uoFYC8IvEaCYeU+W1tf /a9HhwqznySMqXEXm5/nOUxu2xg6NUktcCXkpUlcJ4lIZqPEwSYsbd6q/H/JfuZp oPny0wJE3mJ70UO03xnL/DHsBa7R7xyEGuOPrWVjoa8RrxOUvbf6/QYp+4xaS5MW FxqVLA7Ky7nXV4W52r3E3iEqA8+1ugmk9EpFjgndjy+tYaGzIx85MjekLb/Krogd On0jsXYga5z3YdU38c2obQ/PqNKp6PGeKVFwWFzifK+zTILeMSHPu7fVtL082/vp I/g/MBAEZYqJ6noMb8+KWsY4mbFJIKtndwj7PqKyRLbZQZjt6uTxUqzxPruWRKu4 VHuBhfi10WOnUliEbJXN =x6fj -----END PGP SIGNATURE----- --wac7ysb48OaltWcw--