OSDN Git Service

pci/pcihp: overwrite hotplug handler recursively from the start
authorDavid Hildenbrand <david@redhat.com>
Wed, 12 Dec 2018 09:16:18 +0000 (10:16 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 20 Dec 2018 16:19:12 +0000 (11:19 -0500)
commit3e5209265798af396b9f20bac58f203a743cc3f4
tree1ce76635d74e8dfca50897b86a27b940fb4437c6
parentec266f408882fd38475f72c4e864ed576228643b
pci/pcihp: overwrite hotplug handler recursively from the start

For now, the hotplug handler is not called for devices that are
being cold plugged. The hotplug handler is setup when the machine
initialization is fully done. Only bridges that were cold plugged are
considered.

Set the hotplug handler for the root piix bus directly when realizing.
Overwrite the hotplug handler of bridges when coldplugging them.

This will now make sure that the ACPI PCI hotplug handler is also called
for cold plugged devices (also on bridges) but not for bridges that were
hotplugged (keeping the current behavior).

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/pcihp.c
hw/acpi/piix4.c