diff options
author | Igor Mammedov | 2014-06-02 15:25:24 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2014-06-19 15:41:51 +0200 |
commit | 781bbd6bec587606b1b98b78512f2bba64183b0c (patch) | |
tree | f3147e2e03bd9c1e64bf3f0518bd52501841713a /hw/acpi | |
parent | pc: migrate piix4 & ich9 MemHotplugState (diff) | |
download | qemu-781bbd6bec587606b1b98b78512f2bba64183b0c.tar.gz qemu-781bbd6bec587606b1b98b78512f2bba64183b0c.tar.xz qemu-781bbd6bec587606b1b98b78512f2bba64183b0c.zip |
pc: add acpi-device link to PCMachineState
the link will used later to access device implementing
ACPI functions instead of adhoc lookup in QOM tree.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi')
-rw-r--r-- | hw/acpi/piix4.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 17627ee675..01b3b4cb64 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -483,13 +483,17 @@ Object *piix4_pm_find(void) I2CBus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, qemu_irq sci_irq, qemu_irq smi_irq, - int kvm_enabled, FWCfgState *fw_cfg) + int kvm_enabled, FWCfgState *fw_cfg, + DeviceState **piix4_pm) { DeviceState *dev; PIIX4PMState *s; dev = DEVICE(pci_create(bus, devfn, TYPE_PIIX4_PM)); qdev_prop_set_uint32(dev, "smb_io_base", smb_io_base); + if (piix4_pm) { + *piix4_pm = dev; + } s = PIIX4_PM(dev); s->irq = sci_irq; |