From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWYUm-00029N-Tg for qemu-devel@nongnu.org; Sun, 07 Aug 2016 20:32:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWYUh-0001cu-Jl for qemu-devel@nongnu.org; Sun, 07 Aug 2016 20:32:43 -0400 Date: Mon, 8 Aug 2016 10:09:44 +1000 From: David Gibson Message-ID: <20160808000944.GM9189@voom.fritz.box> References: <1470383429-11526-1-git-send-email-david@gibson.dropbear.id.au> <20160805145159.GA8994@in.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JlJsEFsx9RQyiX4C" Content-Disposition: inline In-Reply-To: <20160805145159.GA8994@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH] spapr: Correctly set query_hotpluggable_cpus hook based on machine version List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: imammedo@redhat.com, agraf@suse.de, qemu-ppc@nongnu.org, qemu-devel@nongnu.org --JlJsEFsx9RQyiX4C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 old= er > > pseries machines", attempting to use query-hotpluggable-cpus on pseries= -2.6 > > and earlier machine types would SEGV. > >=20 > > 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, includi= ng > > the current one which should allow it. > >=20 > > 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. > >=20 > > 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. >=20 > 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 >=20 > 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_c= pus. >=20 > However, I tested this patch and it works as intended. >=20 > Regards, > Bharata. >=20 --=20 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 --JlJsEFsx9RQyiX4C Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXp83HAAoJEGw4ysog2bOS9goQAK6p+E54Xcz3bhlYQKJoxtXu /zHFq1MVx5R/xpBhYue4blVY8xED/h0SYpoucfDT2dLkti845yrZcy0owm1GNVfA 0AE6Evx9zmYiR5IgM74dbp36gvrQ3E/qgkh7Kj3FonhKfTVbNXRCZzZPDPacC0V1 OrHzfax9hX/cn0Zrr4b31Mq5CaRrsujcgW5zbIuGKwyXH9NTEh1I1VSdgfz9MjAM gUsbtAdY2y4DhgpJ1VxXPpoRNguhYHTPNbM5f03fjpSvIP6iJFhNHsq6Pb6bhl5Z wlpoxQ0GCbwy06Lzx8RbvJ7mO1kg7s5G7DuABXkFAQUWKp8mWxpKwl3dVhhmliKO CtW0gyqYBADIZ6M34b5v3tS4yz2AURmvXC7RiLENacgFdmSJOG4sxXl+mu3xpNZu XHD6I39XBhyahMBMUEc6guhRoxssYhQavxKENXovktnY7zvBRYUIkgl3kvIvcTC6 CtJmzmHWPhUhi5cmY9KC0hUYppkF7T5yWlHpm+wWHs2E0LygDv8+PvEMTn7XH8fg t0hYP+8HCUQH3Z8fDH2GC5P5R5CVsxnVAfDBubywK9unyRojPgjw6D7YiD8BATIo JJrSXGq2QJGRHC73UQsyQq1q5PJQUyN5XAnkFgA0areGgnlnOIWPuHRmC2yMPCni TvHWZ7SHg152I97idpq0 =ERKb -----END PGP SIGNATURE----- --JlJsEFsx9RQyiX4C--