From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhfKk-00045b-0G for qemu-devel@nongnu.org; Mon, 13 Apr 2015 10:27:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhfKc-0006xx-RP for qemu-devel@nongnu.org; Mon, 13 Apr 2015 10:27:29 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:33296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhfKc-0006xN-7z for qemu-devel@nongnu.org; Mon, 13 Apr 2015 10:27:22 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Apr 2015 19:57:18 +0530 Date: Mon, 13 Apr 2015 19:57:05 +0530 From: Bharata B Rao Message-ID: <20150413142705.GD4694@in.ibm.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150413160424.63e1ef55@nial.brq.redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH v2 21/23] spapr: Initialize hotplug memory address space Reply-To: bharata@linux.vnet.ibm.com 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, nfont@linux.vnet.ibm.com, afaerber@suse.de, David Gibson 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: > > > 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 hotplugged > > > > memory is accommodated. Also enable memory hotplug by setting > > > > CONFIG_MEM_HOTPLUG. > > > > > > > > Modelled on i386 memory hotplug. > > > > > > > > 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(+) > > > > > > > > diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/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=$(and $(CONFIG_PSERIES),$(CONFIG_KVM)) > > > > # For PReP > > > > CONFIG_MC146818RTC=y > > > > CONFIG_ISA_TESTDEV=y > > > > +CONFIG_MEM_HOTPLUG=y > > > > 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 { > > > > > > > > /*< public >*/ > > > > char *kvm_type; > > > > + ram_addr_t hotplug_memory_base; > > > > + MemoryRegion hotplug_memory; > > > > + bool enforce_aligned_dimm; > > > > }; > > > > > > > > +#define SPAPR_MACHINE_ENFORCE_ALIGNED_DIMM "enforce-aligned-dimm" > > > > > > What's the rationale for including this option? > > > > 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 would abort) > and also performance wise it's better to map regions at offsets aligned at > backend page size (especially applicable for hugepages). > > so region base on x86 is 1Gb aligned to support upto 1Gb hugepages. My question was specifically about the enforce-aligned-dimm object property 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. > > > > > Regards, > > Bharata. > >