From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bglT7-0007ul-Uw for qemu-devel@nongnu.org; Mon, 05 Sep 2016 00:25:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bglT6-0004xH-Mo for qemu-devel@nongnu.org; Mon, 05 Sep 2016 00:25:13 -0400 Date: Mon, 5 Sep 2016 14:27:09 +1000 From: David Gibson Message-ID: <20160905042709.GE3816@voom.fritz.box> References: <1472661255-20160-1-git-send-email-clg@kaod.org> <1472661255-20160-8-git-send-email-clg@kaod.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ryJZkp9/svQ58syV" Content-Disposition: inline In-Reply-To: <1472661255-20160-8-git-send-email-clg@kaod.org> Subject: Re: [Qemu-devel] [PATCH v2 7/7] monitor: fix crash for platforms without a CPU 0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: qemu-ppc@nongnu.org, Benjamin Herrenschmidt , qemu-devel@nongnu.org, Alexander Graf --ryJZkp9/svQ58syV Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 31, 2016 at 06:34:15PM +0200, C=E9dric Le Goater wrote: > On PowerNV, CPU ids start at 0x8 or 0x20, we don't have a CPU 0 > anymore. So let's use the first_cpu index to initialize the monitor. >=20 > Signed-off-by: C=E9dric Le Goater So we need a patch like this - amongst other fixes - in order to allow unplug of cpu 0. I'm not really sure whether to push it ahead now, or gather it up with other no-cpu-0 fixes and send them as a batch. > --- >=20 > So that you can dump the cpu list with the monitor : >=20 > (qemu) info cpus > * CPU #8: nip=3D0x0000000000000010 thread_id=3D7742 > CPU #16: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #24: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #32: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #40: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #48: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #72: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #80: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #136: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #144: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #152: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #160: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #168: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #176: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #200: nip=3D0x0000000000000010 thread_id=3D7740 > CPU #208: nip=3D0x0000000000000010 thread_id=3D7740 >=20 > monitor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/monitor.c b/monitor.c > index e9009de09a6c..19b8ec14f40e 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -1027,7 +1027,7 @@ int monitor_set_cpu(int cpu_index) > CPUState *mon_get_cpu(void) > { > if (!cur_mon->mon_cpu) { > - monitor_set_cpu(0); > + monitor_set_cpu(first_cpu->cpu_index); > } > cpu_synchronize_state(cur_mon->mon_cpu); > return cur_mon->mon_cpu; --=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 --ryJZkp9/svQ58syV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJXzPQdAAoJEGw4ysog2bOSfSIP/iYhUL8S3iG7T6+U9XH8aIrA grLL8IlAVqEMMCxQY6pCRLnX58jtv5iI9V9KqktaP2lkKARufNAApUz9L1UervFl RXwEjS2HHhYvK879aUsEV19i8Ipk+9LaVJHPp605k+k0hiRxGmFtuBAD/0958n02 5DugtZO3GRMG6SrY5UDKQ6gWj9tyJF4jp8tDbSBVwi/tUIV/J0ma1MxgJ1u+HgMo ReBr/izEziWt9MQuCOFWHKpiE2gyB/yYnwtBfpjXnvqAoJqG/PsY9UeyzrqcZW9q +1WP3oIyRenGBwGPyq6P4pdW4kWMEM48OLBTPeXhWNMPZ9TbwhdtMbtaq516ZA/f wbF3+VRGxcx2408Pm5JZMErAQ06GJNwC6kKu+NS3WRFkCJAJgT0GBHK09TcazmYm EWjTtkJQWXLBW+SZkAygvAFW3yC19h2bWzLhfFGX9P1MpASLsD9Jucdxfqyv0DLq HybYyuqXuxl73rw9NcScrE7S+wWdVCl0/37ZqhPK9Uf8j+tOp7Tq+FTz6wbPBlsZ 1ZnFneNUeY8+ycOfJQN4stthJ7rfaF/gR6QE+hXY0YQTqep5uG6KnbHKOIiHpUu9 uBA7lOrsXZUhUGV6x7zR4EWmY2HP+1PqF8hrZwkt0pBcSOVcjqihg7mWdfQeQB4k /+rWbPpEMeBU/d8euTfu =kUL1 -----END PGP SIGNATURE----- --ryJZkp9/svQ58syV--