[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-ppc] [for-2.11 PATCH 16/26] spapr: enable PHB hot
From: |
Greg Kurz |
Subject: |
Re: [Qemu-devel] [Qemu-ppc] [for-2.11 PATCH 16/26] spapr: enable PHB hotplug for pseries-2.11 |
Date: |
Wed, 26 Jul 2017 16:32:27 +0200 |
On Wed, 26 Jul 2017 14:42:23 +1000
Alexey Kardashevskiy <address@hidden> wrote:
> On 26/07/17 04:01, Greg Kurz wrote:
> > From: Michael Roth <address@hidden>
> >
> > The 'dr_phb_enabled' field of that class can be set as
> > part of machine-specific init code, and is then propagated
> > to sPAPREnvironment to conditionally enable creation of DRC
> > objects and device-tree description to facilitate hotplug
> > of PHBs.
> >
> > Since we can't migrate this state to older machine types,
> > default the option to true and disable it for older machine
> > types.
> >
> > Signed-off-by: Michael Roth <address@hidden>
> > Signed-off-by: Greg Kurz <address@hidden>
> > ---
> > Changes since RFC:
> > - rebased against ppc-for-2.10
> > - updated changelog and title
> > - set default to true and disable for 2.10 and older
> > ---
> > hw/ppc/spapr.c | 6 ++++++
> > include/hw/ppc/spapr.h | 3 +++
> > 2 files changed, 9 insertions(+)
> >
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index 277daa4f9645..8dc505343c0f 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -2382,6 +2382,8 @@ static void ppc_spapr_init(MachineState *machine)
> > /* We always have at least the nvram device on VIO */
> > spapr_create_nvram(spapr);
> >
> > + spapr->dr_phb_enabled = smc->dr_phb_enabled;
> > +
> > /* Set up PCI */
> > spapr_pci_rtas_init();
> >
> > @@ -3482,6 +3484,7 @@ static void spapr_machine_class_init(ObjectClass *oc,
> > void *data)
> > * in which LMBs are represented and hot-added
> > */
> > mc->numa_mem_align_shift = 28;
> > + smc->dr_phb_enabled = true;
> > }
> >
> > static const TypeInfo spapr_machine_info = {
> > @@ -3558,8 +3561,11 @@ static void
> > spapr_machine_2_10_instance_options(MachineState *machine)
> >
> > static void spapr_machine_2_10_class_options(MachineClass *mc)
> > {
> > + sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
> > +
> > spapr_machine_2_11_class_options(mc);
> > SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_10);
> > + smc->dr_phb_enabled = false;
> > }
> >
> > DEFINE_SPAPR_MACHINE(2_10, "2.10", false);
> > diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> > index 2a303a705c17..8004d9c2ab2c 100644
> > --- a/include/hw/ppc/spapr.h
> > +++ b/include/hw/ppc/spapr.h
> > @@ -59,6 +59,7 @@ struct sPAPRMachineClass {
> >
> > /*< public >*/
> > bool dr_lmb_enabled; /* enable dynamic-reconfig/hotplug of LMBs
> > */
> > + bool dr_phb_enabled; /* enable dynamic-reconfig/hotplug of PHBs
> > */
> > bool use_ohci_by_default; /* use USB-OHCI instead of XHCI */
> > const char *tcg_default_cpu; /* which (TCG) CPU to simulate by default
> > */
> > bool pre_2_10_has_unused_icps;
> > @@ -122,6 +123,8 @@ struct sPAPRMachineState {
> > * occurs during the unplug process. */
> > QTAILQ_HEAD(, sPAPRDIMMState) pending_dimm_unplugs;
> >
> > + bool dr_phb_enabled; /* hotplug / dynamic-reconfiguration of PHBs */
>
> The one in the class seems sufficient unless we are going to allow
> disabling this via the command line.
>
I kept the original patch but you're right indeed. I don't see why
someone would want to disable this from the cmdline, so I guess I
should just drop the per-instance flag.
Mike, any thoughts ?
>
>
> > +
> > /*< public >*/
> > char *kvm_type;
> > MemoryHotplugState hotplug_memory;
> >
> >
>
>
pgp1NlJmcN2QS.pgp
Description: OpenPGP digital signature
- [Qemu-devel] [for-2.11 PATCH 13/26] qdev: store DeviceState's canonical path to use when unparenting, (continued)
- [Qemu-devel] [for-2.11 PATCH 13/26] qdev: store DeviceState's canonical path to use when unparenting, Greg Kurz, 2017/07/25
- [Qemu-devel] [for-2.11 PATCH 14/26] spapr_pci: add PHB unrealize, Greg Kurz, 2017/07/25
- [Qemu-devel] [for-2.11 PATCH 15/26] spapr: add pseries-2.11 machine type, Greg Kurz, 2017/07/25
- [Qemu-devel] [for-2.11 PATCH 16/26] spapr: enable PHB hotplug for pseries-2.11, Greg Kurz, 2017/07/25
- [Qemu-devel] [for-2.11 PATCH 17/26] spapr_pci: introduce drc_id property, Greg Kurz, 2017/07/25
- [Qemu-devel] [for-2.11 PATCH 18/26] spapr: create DR connectors for PHBs, Greg Kurz, 2017/07/25
- [Qemu-devel] [for-2.11 PATCH 19/26] spapr: populate PHB DRC entries for root DT node, Greg Kurz, 2017/07/25