diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-05-28 10:02:11 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2022-06-11 11:43:54 +0200 |
commit | 3f0efcac43707c02525b5bbaf996c6bf80e2f706 (patch) | |
tree | 69259763fc8469f75d36f8c6a1ce77fa3ef4a4e5 /hw | |
parent | 0c285e01280d9bccda36717bad369082356cf8f4 (diff) | |
download | qemu-3f0efcac43707c02525b5bbaf996c6bf80e2f706.zip qemu-3f0efcac43707c02525b5bbaf996c6bf80e2f706.tar.gz qemu-3f0efcac43707c02525b5bbaf996c6bf80e2f706.tar.bz2 |
hw/acpi/piix4: move xen_enabled() logic from piix4_pm_init() to piix4_pm_realize()
This logic can be included as part of piix4_pm_realize() and does not need to
be handled externally.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <20220528091934.15520-2-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/acpi/piix4.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index fe5625d..bf20fa1 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -525,6 +525,10 @@ static void piix4_pm_realize(PCIDevice *dev, Error **errp) s->machine_ready.notify = piix4_pm_machine_ready; qemu_add_machine_init_done_notifier(&s->machine_ready); + if (xen_enabled()) { + s->use_acpi_hotplug_bridge = false; + } + piix4_acpi_system_hot_add_init(pci_address_space_io(dev), pci_get_bus(dev), s); qbus_set_hotplug_handler(BUS(pci_get_bus(dev)), OBJECT(s)); @@ -551,9 +555,6 @@ I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, s->irq = sci_irq; s->smi_irq = smi_irq; s->smm_enabled = smm_enabled; - if (xen_enabled()) { - s->use_acpi_hotplug_bridge = false; - } pci_realize_and_unref(pci_dev, bus, &error_fatal); |