From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YY2Ak-0000kf-3n for qemu-devel@nongnu.org; Tue, 17 Mar 2015 20:49:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YY2Ag-0007Gg-Ma for qemu-devel@nongnu.org; Tue, 17 Mar 2015 20:49:22 -0400 Received: from ozlabs.org ([103.22.144.67]:43199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YY2Ag-0007DW-Ae for qemu-devel@nongnu.org; Tue, 17 Mar 2015 20:49:18 -0400 Date: Wed, 18 Mar 2015 11:49:59 +1100 From: David Gibson Message-ID: <20150318004959.GO5741@voom.redhat.com> References: <1426247796-1657-1-git-send-email-bharata@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OGW1Z2JKiS9bXo17" Content-Disposition: inline In-Reply-To: <1426247796-1657-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [RFC v0 PATCH] cpus: Convert cpu_index into a bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: zhugh.fnst@cn.fujitsu.com, qemu-devel@nongnu.org, agraf@suse.de, Bharata B Rao , imammedo@redhat.com, afaerber@suse.de --OGW1Z2JKiS9bXo17 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 13, 2015 at 05:26:36PM +0530, Bharata B Rao wrote: > From: Bharata B Rao >=20 > Currently CPUState.cpu_index is monotonically increasing and a newly > created CPU always gets the next higher index. The next available > index is calculated by counting the existing number of CPUs. This is > fine as long as we only add CPUs, but there are architectures which > are starting to support CPU removal too. For an architecture like PowerPC > which derives its CPU identifier (device tree ID) from cpu_index, the > existing logic of generating cpu_index values causes problems. >=20 > With the currently proposed method of handling vCPU removal by parking > the vCPU fd in QEMU > (Ref: http://lists.gnu.org/archive/html/qemu-devel/2015-02/msg02604.html), > generating cpu_index this way will not work for PowerPC. >=20 > This patch changes the way cpu_index is handed out by maintaining > a bit map of the CPUs that tracks both addition and removal of CPUs. >=20 > I am not sure if this is the right and an acceptable approach. The > alternative is to do something similar for PowerPC alone and not > depend on cpu_index. >=20 > I have tested this with out-of-the-tree patches for CPU hot plug and > removal on x86 and sPAPR PowerPC. How does this interact with the tweaking of cpu indexes that spapr does in order to configure the guest SMT mode on POWER7 and POWER8 systems? --=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 --OGW1Z2JKiS9bXo17 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVCMu3AAoJEGw4ysog2bOSn3wQALgVMNeZbPxGgWBXIX9oXOAM TuTYVi3HlBGDu/9DglvPiEa36eQP7Wh1tKM7rhjYI2W539RQFuGZlD3KEOGCMsDi YDrboTHDd0YkaDJa0vU1goG3WCWZy82ddBNiRDYKxyY+htAPV19zPZmPdCC/DnkQ rUcS4zeQMjZ7IxQoFZpS1pjfEtuihTUuwVQgxyxnbA5q7+fosEybUOMDvor75Gkt t3kjk4U0DvxsUm8COc0/lTeAPuXjb0Rj9oX4v+xY/MtbF0vgUlf5HfkrssJN9Uwq hfAGu9xnDfEfkLuYATvWG55sei6cYgi64B+3ULBAqx6SrDKpifgpxEz77G6NT2kp hpDWVBpN3qvtzinv9Uorc2Z0nbYgMl2Ocq4BCB/vkWRZm6IQ0FrUEpSXHa0VA/Le 5gET2LDU1uGGx03dn1VL4UtBAk8j4pyraxjM9BKwC94vyemJRnVO5YBSmIaVutwl RmYHS7Tk+9KVkodYRWVa4YGsrdr0vKAR5MjcXORdiisUG8/lXWvnvwM3z6gPDC/b TuisZN3pH1cf+uDDuhQiQGUtqIH7T/xF/wYYMiXR6ZsfidkAhJqvGeXG0z31q1jl 0BhZ2qwmxIOk7Scal50AYdacZlJ/+TzTx2kp+j8Go946Je4Q6QNKIGBByfaBdhGy 7OCC6CfudPn5pqlnmFo8 =JTHf -----END PGP SIGNATURE----- --OGW1Z2JKiS9bXo17--