qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [RFC PATCH v2] spapr: Support ibm, dynamic-memory-v2 prop


From: David Gibson
Subject: Re: [Qemu-ppc] [RFC PATCH v2] spapr: Support ibm, dynamic-memory-v2 property
Date: Wed, 11 Apr 2018 15:07:49 +1000
User-agent: Mutt/1.9.2 (2017-12-15)

On Wed, Apr 11, 2018 at 10:31:28AM +0530, Bharata B Rao wrote:
> On Wed, Apr 11, 2018 at 02:45:58PM +1000, David Gibson wrote:
> > On Mon, Apr 09, 2018 at 11:55:38AM +0530, Bharata B Rao wrote:
[snip]
> > > @@ -2927,6 +3082,15 @@ static void spapr_instance_init(Object *obj)
> > >                                      " place of standard EPOW events when 
> > > possible"
> > >                                      " (required for memory hot-unplug 
> > > support)",
> > >                                      NULL);
> > > +    object_property_add_bool(obj, "drmem-v2",
> > > +                             spapr_get_drmem_v2,
> > > +                             spapr_set_drmem_v2,
> > > +                             NULL);
> > > +    object_property_set_description(obj, "ibm-dynamic-memory-v2",
> > > +                                    "Use ibm-dynamic-memory-v2 
> > > representation"
> > > +                                    " in place of ibm-dynamic-memory 
> > > when"
> > > +                                    " possible",
> > > +                                    NULL);
> > 
> > I don't really see any point to making this a user configurable
> > option.  Why not just always enable it if the guest says it can
> > support it.
> 
> Makes sense. While thinking about it, I wonder why other properties like
> modern-hotplug-events remain user configurable.

So, modern-hotplug-events affects the runtime behaviour of the events
subsystem.  That means we have to keep that behaviour consistent
across migration, which means specifically we have to keep the old
behaviour for older machine types.  Generally the easiest way to do
that is to have a compatiblity property whose defaults get set by the
machine type.

dynamic-memory-v2 doesn't affect runtime behaviour, only how stuff is
advertised in the device tree, so there's no need to maintain the old
behaviour even for old machine types: a guest started on an old
version will still have the v1 info from when it booted, and that info
will still work after migrating to a new qemu.  Likewise a guest
started on a new version will still have the v2 info and that will
still work on the DRC objects if migrated to an old version; if it
reboots then it will get v1 info, which is fine.

So, for this case we don't need the backwards compat property.

> Thanks for the review, will post next version with your suggested changes.
> 
> Regards,
> Bharata.
> 
> 

-- 
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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]