From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWoXB-0005G9-Lp for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:31:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWoX5-0007lG-I0 for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:31:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWoX5-0007ki-9n for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:31:07 -0400 Date: Wed, 24 Sep 2014 17:30:49 +0200 From: Igor Mammedov Message-ID: <20140924173049.36e76837@nial.usersys.redhat.com> In-Reply-To: <5422DA29.9030806@redhat.com> References: <1411559299-19042-1-git-send-email-imammedo@redhat.com> <1411559299-19042-15-git-send-email-imammedo@redhat.com> <5422B775.90205@redhat.com> <20140924163748.18dbc40c@nial.usersys.redhat.com> <5422DA29.9030806@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 14/30] target-i386: ICC bus: replace BusState.allow_hotplug with hotplug_handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: dmitry@daynix.com, mst@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, cornelia.huck@de.ibm.com, kraxel@redhat.com, amit.shah@redhat.com, borntraeger@de.ibm.com, rth@twiddle.net On Wed, 24 Sep 2014 16:50:17 +0200 Paolo Bonzini wrote: > Il 24/09/2014 16:37, Igor Mammedov ha scritto: > >> > If you do this, aren't you enabling CPU hot-unplug? Should > >> > hotplug_handler_plug and/or hotplug_handler_unplug return an error if > >> > there is no callback? > > hotplug/unplug of x86 CPU is not usable with device_add/del yet, so > > it's not used for CPUs yet. > > x86 CPU nor APIC don't have DeviceClass.unplug callback so for old > > behavior any attempt to call device_del would cause abort. > > With this path attempt would become NOP. > > Can you make it an error instead? I guess that's related to the other > question---whether hotplug_handler_plug and/or hotplug_handler_unplug > should return an error if there is no callback. For example that would make us in addition to above add fake plug/unplug handlers without errors for APIC so it could be realized without error when it's created by CPU. (applies to all composite devices). Anyway question is moot if we are to drop hotplug assert from bus_add_child(). > > Paolo