pci/pcihp: perform check for bus capability in pre_plug handler
commitec266f408882fd38475f72c4e864ed576228643b
authorDavid Hildenbrand <david@redhat.com>
Wed, 12 Dec 2018 09:16:17 +0000 (12 10:16 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 20 Dec 2018 16:19:12 +0000 (20 11:19 -0500)
treee8efc68e8fbffaec5279c8484908b1e10cbb8d3c
parentfa2a7751172b6228706decfbdddb6eac39052ab1
pci/pcihp: perform check for bus capability in pre_plug handler

Perform the check in the pre_plug handler. In addition, we need the
capability only if the device is actually hotplugged (and not created
during machine initialization). This is a preparation for coldplugging
pci devices via that hotplug handler.

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
include/hw/acpi/pcihp.h