f18e29fc90
Provide pcihp specific callback to check if bus is hotpluggable and consolidate its scattered hotplug criteria there. While at it clean up no longer needed qbus_set_hotplug_handler(BUS(bus), NULL) workarounds since callback makes qbus_is_hotpluggable() return correct answer even if hotplug_handler is set on bus. PS: see ("pci: fix 'hotplugglable' property behavior") for details why callback was introduced. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20230302161543.286002-35-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
47 lines
1.1 KiB
C
47 lines
1.1 KiB
C
#include "qemu/osdep.h"
|
|
#include "hw/acpi/pcihp.h"
|
|
#include "migration/vmstate.h"
|
|
|
|
const VMStateDescription vmstate_acpi_pcihp_pci_status;
|
|
|
|
void acpi_pcihp_init(Object *owner, AcpiPciHpState *s, PCIBus *root_bus,
|
|
MemoryRegion *address_space_io, uint16_t io_base)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
|
|
DeviceState *dev, Error **errp)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_device_pre_plug_cb(HotplugHandler *hotplug_dev,
|
|
DeviceState *dev, Error **errp)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
|
|
DeviceState *dev, Error **errp)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_device_unplug_request_cb(HotplugHandler *hotplug_dev,
|
|
AcpiPciHpState *s, DeviceState *dev,
|
|
Error **errp)
|
|
{
|
|
return;
|
|
}
|
|
|
|
void acpi_pcihp_reset(AcpiPciHpState *s)
|
|
{
|
|
return;
|
|
}
|
|
|
|
bool acpi_pcihp_is_hotpluggbale_bus(AcpiPciHpState *s, BusState *bus)
|
|
{
|
|
return true;
|
|
}
|