2 * QEMU ACPI hotplug utilities
4 * Copyright (C) 2016 Red Hat Inc
7 * Igor Mammedov <imammedo@redhat.com>
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
15 #include "hw/qdev-core.h"
16 #include "hw/acpi/acpi.h"
17 #include "hw/acpi/aml-build.h"
18 #include "hw/hotplug.h"
20 typedef struct AcpiCpuStatus
{
30 typedef struct CPUHotplugState
{
31 MemoryRegion ctrl_reg
;
38 void acpi_cpu_plug_cb(HotplugHandler
*hotplug_dev
,
39 CPUHotplugState
*cpu_st
, DeviceState
*dev
, Error
**errp
);
41 void acpi_cpu_unplug_request_cb(HotplugHandler
*hotplug_dev
,
42 CPUHotplugState
*cpu_st
,
43 DeviceState
*dev
, Error
**errp
);
45 void acpi_cpu_unplug_cb(CPUHotplugState
*cpu_st
,
46 DeviceState
*dev
, Error
**errp
);
48 void cpu_hotplug_hw_init(MemoryRegion
*as
, Object
*owner
,
49 CPUHotplugState
*state
, hwaddr base_addr
);
51 typedef struct CPUHotplugFeatures
{
52 bool acpi_1_compatible
;
58 void build_cpus_aml(Aml
*table
, MachineState
*machine
, CPUHotplugFeatures opts
,
61 const char *event_handler_method
);
63 void acpi_cpu_ospm_status(CPUHotplugState
*cpu_st
, ACPIOSTInfoList
***list
);
65 extern const VMStateDescription vmstate_cpu_hotplug
;
66 #define VMSTATE_CPU_HOTPLUG(cpuhp, state) \
67 VMSTATE_STRUCT(cpuhp, state, 1, \
68 vmstate_cpu_hotplug, CPUHotplugState)