|
@@ -152,6 +152,8 @@ static void acpi_pcihp_eject_slot(AcpiPciHpState *s, unsigned bsel, unsigned slo
|
|
int slot = ctz32(slots);
|
|
int slot = ctz32(slots);
|
|
PCIBus *bus = acpi_pcihp_find_hotplug_bus(s, bsel);
|
|
PCIBus *bus = acpi_pcihp_find_hotplug_bus(s, bsel);
|
|
|
|
|
|
|
|
+ trace_acpi_pci_eject_slot(bsel, slot);
|
|
|
|
+
|
|
if (!bus) {
|
|
if (!bus) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -263,6 +265,8 @@ void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
|
|
void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
|
|
void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
|
|
DeviceState *dev, Error **errp)
|
|
DeviceState *dev, Error **errp)
|
|
{
|
|
{
|
|
|
|
+ trace_acpi_pci_unplug(PCI_SLOT(PCI_DEVICE(dev)->devfn),
|
|
|
|
+ acpi_pcihp_get_bsel(pci_get_bus(PCI_DEVICE(dev))));
|
|
object_property_set_bool(OBJECT(dev), false, "realized", NULL);
|
|
object_property_set_bool(OBJECT(dev), false, "realized", NULL);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -273,6 +277,9 @@ void acpi_pcihp_device_unplug_request_cb(HotplugHandler *hotplug_dev,
|
|
PCIDevice *pdev = PCI_DEVICE(dev);
|
|
PCIDevice *pdev = PCI_DEVICE(dev);
|
|
int slot = PCI_SLOT(pdev->devfn);
|
|
int slot = PCI_SLOT(pdev->devfn);
|
|
int bsel = acpi_pcihp_get_bsel(pci_get_bus(pdev));
|
|
int bsel = acpi_pcihp_get_bsel(pci_get_bus(pdev));
|
|
|
|
+
|
|
|
|
+ trace_acpi_pci_unplug_request(bsel, slot);
|
|
|
|
+
|
|
if (bsel < 0) {
|
|
if (bsel < 0) {
|
|
error_setg(errp, "Unsupported bus. Bus doesn't have property '"
|
|
error_setg(errp, "Unsupported bus. Bus doesn't have property '"
|
|
ACPI_PCIHP_PROP_BSEL "' set");
|
|
ACPI_PCIHP_PROP_BSEL "' set");
|