From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFrPR-00080F-Kh for qemu-devel@nongnu.org; Mon, 26 Jan 2015 16:41:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFrPO-00027k-E0 for qemu-devel@nongnu.org; Mon, 26 Jan 2015 16:41:25 -0500 Received: from e36.co.us.ibm.com ([32.97.110.154]:58898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFrPO-00027T-8L for qemu-devel@nongnu.org; Mon, 26 Jan 2015 16:41:22 -0500 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 26 Jan 2015 14:41:21 -0700 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <20150119060000.GA5297@voom.fritz.box> References: <1419337831-16552-1-git-send-email-mdroth@linux.vnet.ibm.com> <1419337831-16552-18-git-send-email-mdroth@linux.vnet.ibm.com> <20150119060000.GA5297@voom.fritz.box> Message-ID: <20150126213250.23721.2748@loki> Date: Mon, 26 Jan 2015 15:32:50 -0600 Subject: Re: [Qemu-devel] [PATCH v4 17/17] spapr_pci: emit hotplug add/remove events during hotplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, ncmike@ncultra.org, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, bharata.rao@gmail.com, nfont@linux.vnet.ibm.com Quoting David Gibson (2015-01-19 00:00:00) > On Tue, Dec 23, 2014 at 06:30:31AM -0600, Michael Roth wrote: > > From: Tyrel Datwyler > > = > > This uses extension of existing EPOW interrupt/event mechanism > > to notify userspace tools like librtas/drmgr to handle > > in-guest configuration/cleanup operations in response to > > device_add/device_del. > > = > > Userspace tools that don't implement this extension will need > > to be run manually in response/advance of device_add/device_del, > > respectively. > > = > > Signed-off-by: Tyrel Datwyler > > Signed-off-by: Michael Roth > > --- > > hw/ppc/spapr_pci.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > = > > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c > > index 94e33b4..f17f984 100644 > > --- a/hw/ppc/spapr_pci.c > > +++ b/hw/ppc/spapr_pci.c > > @@ -705,6 +705,9 @@ static void spapr_phb_hot_plug(HotplugHandler *plug= _handler, > > = > > g_assert(drc); > > spapr_device_hotplug_add(drc, phb, pdev); > > + if (plugged_dev->hotplugged) { > > + spapr_hotplug_req_add_event(drc); > > + } > > } > > = > > static void spapr_phb_hot_unplug(HotplugHandler *plug_handler, > > @@ -722,6 +725,7 @@ static void spapr_phb_hot_unplug(HotplugHandler *pl= ug_handler, > > } > > = > > spapr_device_hotplug_remove(drc, phb, pdev); > > + spapr_hotplug_req_remove_event(drc); > = > The event is sent after the "physical" remove. Is that correct? From=20the guest perspective it doesn't really matter since we default to an allocation state of UNISOLATED, so we always end up waiting for the guest-induced transition to ISOLATED before completing the removal (or a reboot, in which case the event is not needed). Thank you for the excellent review. I've responded where clarification seemed warranted, but otherwise plan on addressing all the comments in v5 which should go out soon. > = > > } > > = > > static void spapr_phb_realize(DeviceState *dev, Error **errp) > = > -- = > David Gibson | I'll have my music baroque, and my code > david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _othe= r_ > | _way_ _around_! > http://www.ozlabs.org/~dgibson