From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auv7Q-00087l-VG for qemu-devel@nongnu.org; Tue, 26 Apr 2016 01:01:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auv7M-0007pH-Ra for qemu-devel@nongnu.org; Tue, 26 Apr 2016 01:01:04 -0400 Date: Tue, 26 Apr 2016 14:55:15 +1000 From: David Gibson Message-ID: <20160426045515.GI15176@voom.fritz.box> References: <1461623065-6621-1-git-send-email-mdroth@linux.vnet.ibm.com> <20160426011825.GG15176@voom.fritz.box> <20160426035053.GA9793@in.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SdaPbLtAangIkrMZ" Content-Disposition: inline In-Reply-To: <20160426035053.GA9793@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH for-2.6] spapr_drc: fix aborts during DRC-count based hotplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: Michael Roth , qemu-devel@nongnu.org, qemu-ppc@nongnu.org --SdaPbLtAangIkrMZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2016 at 09:20:53AM +0530, Bharata B Rao wrote: > On Tue, Apr 26, 2016 at 11:18:25AM +1000, David Gibson wrote: > > On Mon, Apr 25, 2016 at 05:24:25PM -0500, Michael Roth wrote: > > > CPU/memory resources can be signalled en-masse via > > > spapr_hotplug_req_add_by_count(), and when doing so, actually change > > > the meaning of the 'drc' parameter passed to > > > spapr_hotplug_req_event() to be a count rather than an index. > > >=20 > > > f40eb92 added a hook in spapr_hotplug_req_event() to record when a > > > device had been 'signalled' to the guest, but that code assumes that > > > drc is always an index. In cases where it's a count, such as memory > > > hotplug, the DRC lookup will fail, leading to an assert. > > >=20 > > > Fix this by only explicitly setting the signalled state for cases whe= re > > > we are doing PCI hotplug. > > >=20 > > > For other resources types, since we cannot selectively track whether a > > > resource has been signalled in cases where we signal attach as a coun= t, > > > set the 'signalled' state to true immediately upon making the > > > resource available via drck->attach(). > > >=20 > > > Reported-by: Bharata B Rao > > > Cc: Bharata B Rao > > > Cc: david@gibson.dropbear.id.au > > > Cc: qemu-ppc@nongnu.org > > > Signed-off-by: Michael Roth > >=20 > > Applued to 2.6, I'll send a pull request today. >=20 > Checked that memory hotplug is working fine after this fix. So if it > matters now, >=20 > Tested-by: Bharata B Rao Thanks, but I already sent the pull request. --=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 --SdaPbLtAangIkrMZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXHvSzAAoJEGw4ysog2bOSbcoQANRy/SY9n/4CxXQvzj8BMQ+m hUG5vwHWjQ/sB12SWsXqZNNKsqje80b51pRVVmtV/ePG8yzPZmhXDv7H/XbrK4UB jrurhma5D/F0PXgqLm0QqgUkUNAOOWggLKf+WjQU/3/qw1mLI8Hc8zBwqD/OPU/l iCrCoR71F2xKhgBJ4AnKDZnFJgO7zuAKhFr5CrADYMKuW4o+gyzGoa+8dBNdeoZt RZUj5uSFfilMLS0+uvsxzX2AFE4JHOGVW+T1Peyjus4SDw13izukT+vy/WQLpzYD qy2NX0VweP3BN6enaYMgInkfhxv1KjcOXMZ5fJkcirL/Ig0RhJY5gAlyOog3hZA7 0D8eTk9+rGv5bfz0YituAftIMDPyp/yVnXTo8FZjuyIY/d62mDByAmRJokNnuC4k suTAkO3GkIjfmgM4KN6JDA/Xjf1vktBvd0FbjogjEwBfvjqIXq5wV9AfLK3/2CyZ hhXUyiC8zSai2SSFNIgJzvY284lg0n/y2auJC9BTvZRzfzcvC5uvUmYk1F3Rt5cp T2VaH0Mh4itjl21mUCfjAgC1h2w0yWmLHlA8E9WPcJMB/wgjWZey+Iz1j2joDMHn 3j7NOBWZKV78RiBk5BiQobR1c4kiggvHWwbwYQ3V8YVFEUZwYxwVwFu9FjMXO4Md nU2QwgS1Dr+Tw3/u8sup =rnd5 -----END PGP SIGNATURE----- --SdaPbLtAangIkrMZ--