On Tue, Apr 29, 2014 at 10:12:34AM +0200, Paolo Bonzini wrote: > Il 07/04/2014 17:36, Michael S. Tsirkin ha scritto: > >>> * What if there would be more handlers that could or should handle event > >>> for device? > >That's actually very useful. We could scan top to bottom > >so e.g. acpi can intercept bridges. > > > > Be careful about "top to bottom". Does top-to-bottom mean by bus or > by composition? This has been a huge can of worms in the > discussions about recursive realization. > > One thing we could do is to always go through /machine even before > invoking the bus handler. Then /machine can do machine-specific > checks to interpose the PCI host bridge and/or the ACPI device's > hotplug handlers. > > But this can be done on top of this series, it has nothing to do > with memory hotplug and this one is already big enough! > > Paolo
Yes, new functionality does not need to be added in this patchset. But to repeat what I was saying, this check (that object passed in is a PCI DEVICE) belongs in acpi_pcihp_device_plug_cb and should not be piix specific, I don't want to duplicate this logic in q35 later. Similar checks should be added in shpc_device_hotplug_cb pcie_cap_slot_hotplug_cb for consistency. -- MST