From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWviU-0003Qz-UU for qemu-devel@nongnu.org; Mon, 08 Aug 2016 21:20:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWviS-00059Q-E6 for qemu-devel@nongnu.org; Mon, 08 Aug 2016 21:20:25 -0400 Date: Tue, 9 Aug 2016 10:12:26 +1000 From: David Gibson Message-ID: <20160809001226.GA9057@voom.fritz.box> References: <1470383429-11526-1-git-send-email-david@gibson.dropbear.id.au> <20160805145159.GA8994@in.ibm.com> <20160808104637.7a7f23a1@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: <20160808104637.7a7f23a1@nial.brq.redhat.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: Igor Mammedov Cc: Bharata B Rao , qemu-ppc@nongnu.org, agraf@suse.de, qemu-devel@nongnu.org --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 08, 2016 at 10:46:37AM +0200, Igor Mammedov wrote: > On Fri, 5 Aug 2016 20:21:59 +0530 > Bharata B Rao wrote: >=20 > > 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 o= lder > > > pseries machines", attempting to use query-hotpluggable-cpus on pseri= es-2.6 > > > and earlier machine types would SEGV. > > >=20 > > > That change fixed that, but due to some unexpected interactions in in= it > > > order and a brown-paper-bag worthy failure to test, it accidentally > > > disabled query-hotpluggable-cpus for all pseries machine types, inclu= ding > > > the current one which should allow it. > > >=20 > > > In fact, query_hotpluggable_cpus needs to be non-NULL when and only w= hen > > > 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 us= ing > > > that to determine the availability of CPU hotplug when necessary. =20 > >=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. > >=20 > > So I think we should not replace dr_cpu_enabled with query_hotpluggable= _cpus. > I agree, hotplug capability shouldn't depend on availability of > interface to operate it but rather on some platform specific bits > which dr_cpu_enabled is (or at least looks like it's). I still don't understand the objection here. Once query_hotpluggable_cpus was set correctly it really was non-NULL if and only if dr_cpu_enabled was also true. Are you saying there should be an option to disable hotplug even in the newer machine types? For now, Peter has already merged my pull request including this patch. --=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 --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXqR/qAAoJEGw4ysog2bOSqK8P/iBkhFMy7dHyVpggOdSKI30E mtjyjmQypG/+m6dDiwCTGL6Vxry8U3YRf1Oy0RjHkzJqJmhPdVXbFMVUOCtC/fdf bJqO4KmkOCaQHLVTMApIVXc908f/bMQEhvN6q8wobYBqD7WUzzDIpwditFXsK6pd 48nX1Ko3saHpkqRHm/oWzM2ZyI25iIoT21Ui9P/KizIZHyVKuXrUD0w3RqV5BaHI kaSA05nUwWb+dKPnBlMtANqZr8/iOsmaz/7G3WIw95xrtkMCgbyblzLfH7Lh+9AK PmVs2W2DjsJAZYW3CMzWCD+1LEiIR36lB+87fvJutjYLu7B9mLTG4JLV8h6ND5d+ UVzjE0OylG0NqzWVz1Ca0uzNhFpKyUBhnyULrSMyEVAFNf+mtom9wQwEhcR9G7Gh OUd5vhVmK2aHAqmd0g7+RIo8dbYSPTp0gykj7DdMN4L5X7v8x83H68cAjj6E/zEE eIycf+vtzFSKzK8w3AECJBeOB33oihy2ZV81DGJpcZR+CatGqQUkeqqaGPar9LmS zvWYKmSSA91fpGspoBgebfaBBHWecBH+pgXWLr9Rkbeb0WkqjuMz7Ud3n8511knZ /S85kyHE40wPdA/rsThm1JnkRkeet23gTCVQslMojRedA/3AY3apI2ucicik7hms 6SUJEzqLXJssF2fePskq =vSHp -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--