From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXA6P-0008Bi-Sh for qemu-devel@nongnu.org; Thu, 25 Sep 2014 10:33:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXA6E-0005OS-Nz for qemu-devel@nongnu.org; Thu, 25 Sep 2014 10:33:01 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:55173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXA6E-0005J2-Fc for qemu-devel@nongnu.org; Thu, 25 Sep 2014 10:32:50 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Sep 2014 15:32:42 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id A4EE317D8041 for ; Thu, 25 Sep 2014 15:34:47 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8PEWe1Q45809686 for ; Thu, 25 Sep 2014 14:32:40 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8PEWdNQ007636 for ; Thu, 25 Sep 2014 10:32:39 -0400 Date: Thu, 25 Sep 2014 16:32:37 +0200 From: Cornelia Huck Message-ID: <20140925163237.771069ca.cornelia.huck@de.ibm.com> In-Reply-To: <20140925151110.250dccd8@nial.usersys.redhat.com> References: <1411559299-19042-1-git-send-email-imammedo@redhat.com> <1411559299-19042-21-git-send-email-imammedo@redhat.com> <20140925130838.492d655d.cornelia.huck@de.ibm.com> <20140925151110.250dccd8@nial.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 20/30] s390x: convert virtio-ccw to hotplug handler API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: dmitry@daynix.com, mst@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, kraxel@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com, rth@twiddle.net On Thu, 25 Sep 2014 15:11:10 +0200 Igor Mammedov wrote: > On Thu, 25 Sep 2014 13:08:38 +0200 > Cornelia Huck wrote: > > So, to summarize, what happened before was > > > > bridge device <--- (simple unplug invoked for dev) > simple unplug should not exits for above device Yes. I'm not sure why it does. > > > -> virtual bus > > -> virtio proxy device <--- virtio unplug invoked for dev > > > -> virtio bus > > -> virtio device > > > > which your patch changed to > > > > bridge device > > -> virtual bus <--- simple unplug invoked for virtio proxy dev > > -> virtio proxy device > > -> virtio bus <--- (virtio unplug invoked for virtio dev) > > -> virtio device > > > > Am I understanding this correctly? > Let's try other way around: > > bridge device (virtual_css_bridge) - non hotpluggable sysbus device > -> virtual bus (VIRTUAL_CSS_BUS) > -> virtio proxy device | > -> virtio bus |- virtio_ccw_device_foo composite device managed with > -> virtio device | device_add/del command > > internal "virtio device" is the only child of "virtio bus" and it's not supposed > to be managed via device_add/del. This makes sense; I'm wondering why virtio-bus had allow_hotplug set before, though. > > So to unplug "virtio proxy device" we should call virtio_ccw_busdev_unplug > stored in "bridge device" with "virtual bus" using bridge as hotplug-handler. > > does following patch work for you? It does react as expected with a simple device_add/device_del (your patches applied up to patch 19 with this one on top).