From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSGmv-0005Cz-Nv for qemu-devel@nongnu.org; Wed, 27 Jul 2016 00:49:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSGmr-0001jM-H6 for qemu-devel@nongnu.org; Wed, 27 Jul 2016 00:49:44 -0400 Received: from ozlabs.org ([103.22.144.67]:51529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSGmr-0001iS-5s for qemu-devel@nongnu.org; Wed, 27 Jul 2016 00:49:41 -0400 Date: Wed, 27 Jul 2016 14:46:21 +1000 From: David Gibson Message-ID: <20160727044621.GC17429@voom.fritz.box> References: <20160727025251.GF7036@in.ibm.com> <20160727043141.GH7036@in.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nG7dHWd/DOCuxGWF" Content-Disposition: inline In-Reply-To: <20160727043141.GH7036@in.ibm.com> Subject: Re: [Qemu-devel] Segfault with coalesced mmio and boot CPU removal List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: qemu-devel@nongnu.org, imammedo@redhat.com --nG7dHWd/DOCuxGWF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 27, 2016 at 10:01:41AM +0530, Bharata B Rao wrote: > On Wed, Jul 27, 2016 at 08:22:51AM +0530, Bharata B Rao wrote: > > Hi, > >=20 > > Coalesced mmio buffer is part of vCPU 0's kvm_run mmap'ed area > > and with the introduction of CPU hotplug, vCPU 0 can be removed on > > PowerPC leading to the below seen segfault in QEMU. > >=20 > >=20 > > This happens because during CPU removal, though we park the kvm_fd > > corresponding to the removed vCPU thread, we unmap the kvm_run (and > > hence coalesced mmio ring). > >=20 > > > What would be the best way to fix this ? Is disassociating coalesced_mm= io_ring > > from vCPU 0's kvm_run the correct solution ? >=20 > May be PowerPC too should do what x86 does like below for now ? I think that's what we need to do short term. In the 2.8 timeframe, separating the mmio ring out from the vcpu state sounds like a good idea, but I don't really know how complicated that will be. >=20 > commit 73360e27850b213327011f7e22e03865b8c0dd5b > Author: Igor Mammedov > Date: Mon Jul 18 10:31:22 2016 +0200 >=20 > pc: Forbid BSP removal > =20 > Boot CPU is assumed to always present in QEMU code, so > untile that assumptions are gone, deny removal request, > In another words QEMU won't support BSP hot-unplug. >=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 --nG7dHWd/DOCuxGWF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXmDydAAoJEGw4ysog2bOShnQQAKbEdfrMtQuMXPm2orIUs2nw AsgiFh47sYQyEyqj/Qz8X6Fey7ld/m4QK9rTzb7HHBCAIJokoU2tcXHRy6zVO9LQ y9800cNf76HqT1f4ZxTSi3rsseCik3rq/TX/rUFbYVHEZ19GLPRE/CE4+Kcez0P8 kKkCFmfpMeI5US0QWZqJQM0V+OTkdlfmtFCNemMH8wQM8cquYP4WdT5rWZQqh07h eZ0Ay5wQVoKV3RicHQvtsBVyZc6RB30oKQz1gcHHeEOvzggSQLOMcTps4g6r4JxT ZWLo/OZq1YouNOq5MpAXpeM+dC+St1+EaRfizyWOvSv2Xdgw8Z12e8OvDSjyAqPc C+Xr/2M4o7K06yd1qmdOr05wig+99P8nE0xYc66vSGYfgKLUNykDI0PEobQZyVFC SYb64GxilPeCI8Xo5GgP2zt/2g3iZXgtWCCo+BU/DPj4dtun3DhL9R4W0gonBxlT 405ZCWQJB0IiAN9qs+rIazobMBhZ39PUIqq8QTLy3NS41ug7WquucG0JtC2kVMWr VKKTN1qLZT48jJ8qlUsXbmomW+3/MvNSYt6HM3rHjnt7YiXsnMpLLl82SXyDOx6w K2KF6uB0bm2ycBcnBl4v1S7bxefFhc9ASa0YCeEk35roXA5NrqLrkr0THSLH5oDP 1w90e8qG79zHMFyCTjiB =UVIt -----END PGP SIGNATURE----- --nG7dHWd/DOCuxGWF--