aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi/pcihp.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-04-02 18:19:00 +0200
committerMichael S. Tsirkin <mst@redhat.com>2019-05-20 18:40:02 -0400
commit03459ea3b3d95c7d2a01db3bd7bcccefee3db4ba (patch)
treee4ddec6900c5d70eec688948ed3ee2eb6ea9ea5e /hw/acpi/pcihp.c
parentdf93b19476850eda005b7ea008e356c92b4c15ab (diff)
downloadqemu-03459ea3b3d95c7d2a01db3bd7bcccefee3db4ba.zip
qemu-03459ea3b3d95c7d2a01db3bd7bcccefee3db4ba.tar.gz
qemu-03459ea3b3d95c7d2a01db3bd7bcccefee3db4ba.tar.bz2
acpi/pcihp: Add a few more trace points related to unplug
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190402161900.7374-4-armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/acpi/pcihp.c')
-rw-r--r--hw/acpi/pcihp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index 7729c53..613406d 100644
--- a/hw/acpi/pcihp.c
+++ b/hw/acpi/pcihp.c
@@ -152,6 +152,8 @@ static void acpi_pcihp_eject_slot(AcpiPciHpState *s, unsigned bsel, unsigned slo
int slot = ctz32(slots);
PCIBus *bus = acpi_pcihp_find_hotplug_bus(s, bsel);
+ trace_acpi_pci_eject_slot(bsel, slot);
+
if (!bus) {
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,
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);
}
@@ -273,6 +277,9 @@ void acpi_pcihp_device_unplug_request_cb(HotplugHandler *hotplug_dev,
PCIDevice *pdev = PCI_DEVICE(dev);
int slot = PCI_SLOT(pdev->devfn);
int bsel = acpi_pcihp_get_bsel(pci_get_bus(pdev));
+
+ trace_acpi_pci_unplug_request(bsel, slot);
+
if (bsel < 0) {
error_setg(errp, "Unsupported bus. Bus doesn't have property '"
ACPI_PCIHP_PROP_BSEL "' set");