From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auu1m-0000Pg-EC for qemu-devel@nongnu.org; Mon, 25 Apr 2016 23:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auu1i-0002IR-D7 for qemu-devel@nongnu.org; Mon, 25 Apr 2016 23:51:10 -0400 Received: from e28smtp01.in.ibm.com ([125.16.236.1]:59492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auu1h-0002I4-MW for qemu-devel@nongnu.org; Mon, 25 Apr 2016 23:51:06 -0400 Received: from localhost by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 26 Apr 2016 09:21:01 +0530 Date: Tue, 26 Apr 2016 09:20:53 +0530 From: Bharata B Rao Message-ID: <20160426035053.GA9793@in.ibm.com> Reply-To: bharata@linux.vnet.ibm.com References: <1461623065-6621-1-git-send-email-mdroth@linux.vnet.ibm.com> <20160426011825.GG15176@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160426011825.GG15176@voom.fritz.box> 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: David Gibson Cc: Michael Roth , qemu-devel@nongnu.org, qemu-ppc@nongnu.org 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. > > > > 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. > > > > Fix this by only explicitly setting the signalled state for cases where > > we are doing PCI hotplug. > > > > For other resources types, since we cannot selectively track whether a > > resource has been signalled in cases where we signal attach as a count, > > set the 'signalled' state to true immediately upon making the > > resource available via drck->attach(). > > > > 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 > > Applued to 2.6, I'll send a pull request today. Checked that memory hotplug is working fine after this fix. So if it matters now, Tested-by: Bharata B Rao Regards, Bharata.