[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v2 21/23] spapr: Initialize hotplug memory a
From: |
Bharata B Rao |
Subject: |
Re: [Qemu-devel] [RFC PATCH v2 21/23] spapr: Initialize hotplug memory address space |
Date: |
Mon, 13 Apr 2015 19:57:05 +0530 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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 <address@hidden> 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 <address@hidden>
> > > > ---
> > > > 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.
> >