From 781bbd6bec587606b1b98b78512f2bba64183b0c Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Mon, 2 Jun 2014 15:25:24 +0200 Subject: 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 Acked-by: Peter Crosthwaite Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 1635aede0f..6050115042 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -21,6 +21,7 @@ * @hotplug_memory_base: address in guest RAM address space where hotplug memory * address space begins. * @hotplug_memory: hotplug memory addess space container + * @acpi_dev: link to ACPI PM device that performs ACPI hotplug handling */ struct PCMachineState { /*< private >*/ @@ -29,8 +30,12 @@ struct PCMachineState { /* */ ram_addr_t hotplug_memory_base; MemoryRegion hotplug_memory; + + HotplugHandler *acpi_dev; }; +#define PC_MACHINE_ACPI_DEVICE_PROP "acpi-device" + /** * PCMachineClass: * @get_hotplug_handler: pointer to parent class callback @get_hotplug_handler @@ -210,7 +215,8 @@ void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name); 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); void piix4_smbus_register_device(SMBusDevice *dev, uint8_t addr); /* hpet.c */ -- cgit v1.2.3-55-g7522