qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH] spapr: Correctly set query_hotpluggable_cpus hook


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH] spapr: Correctly set query_hotpluggable_cpus hook based on machine version
Date: Mon, 8 Aug 2016 10:09:44 +1000
User-agent: Mutt/1.6.2 (2016-07-01)

On Fri, Aug 05, 2016 at 08:21:59PM +0530, Bharata B Rao wrote:
> On Fri, Aug 05, 2016 at 05:50:29PM +1000, David Gibson wrote:
> > Prior to c8721d3 "spapr: Error out when CPU hotplug is attempted on older
> > pseries machines", attempting to use query-hotpluggable-cpus on pseries-2.6
> > and earlier machine types would SEGV.
> > 
> > That change fixed that, but due to some unexpected interactions in init
> > order and a brown-paper-bag worthy failure to test, it accidentally
> > disabled query-hotpluggable-cpus for all pseries machine types, including
> > the current one which should allow it.
> > 
> > In fact, query_hotpluggable_cpus needs to be non-NULL when and only when
> > the dr_cpu_enabled flag in sPAPRMachineClass is set, which makes
> > dr_cpu_enabled itself redundant.
> > 
> > This patch removes dr_cpu_enabled, instead directly setting
> > query_hotpluggable_cpus from the machine class_init functions, and using
> > that to determine the availability of CPU hotplug when necessary.
> 
> dr_cpu_enabled actually determines if CPU hotplug feature is present
> or not. It also controls the creation of DRC-specific properties
> in /cpus DT node like ibm,drc-indexes etc
> 
> query_hotpluggable_cpus just tells us if the machine supports the
> querying of hotpluggable CPUS. query_hotpluggable_cpus definitely
> implies dr_cpu_enabled but dr_cpu_enabled can exist on its own
> (theoretically at the least) without query_hotpluggable_cpus.

Um, so that certainly can't happen in practice.  Just like
query_hotpluggable_cpus, dr_cpu_enabled is set for pseries-2.7 and no
earlier machine types.  There's no way to override it in
configuration.

And even in theory I can't see how dr_cpu_enabled could make any sense
without query_hotpluggable_cpus.  The whole hotplug infrastructure is
based around the core objects, which don't exist with the earlier
machine types.

> So I think we should not replace dr_cpu_enabled with query_hotpluggable_cpus.
> 
> However, I tested this patch and it works as intended.
> 
> 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]