On Wed, 24 Sep 2014 16:50:17 +0200 Paolo Bonzini <pbonz...@redhat.com> 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