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
{
29 typedef struct CPUHotplugState
{
30 MemoryRegion ctrl_reg
;
37 void acpi_cpu_plug_cb(HotplugHandler
*hotplug_dev
,
38 CPUHotplugState
*cpu_st
, DeviceState
*dev
, Error
**errp
);
40 void acpi_cpu_unplug_request_cb(HotplugHandler
*hotplug_dev
,
41 CPUHotplugState
*cpu_st
,
42 DeviceState
*dev
, Error
**errp
);
44 void acpi_cpu_unplug_cb(CPUHotplugState
*cpu_st
,
45 DeviceState
*dev
, Error
**errp
);
47 void cpu_hotplug_hw_init(MemoryRegion
*as
, Object
*owner
,
48 CPUHotplugState
*state
, hwaddr base_addr
);
50 typedef struct CPUHotplugFeatures
{
51 bool acpi_1_compatible
;
55 void build_cpus_aml(Aml
*table
, MachineState
*machine
, CPUHotplugFeatures opts
,
58 const char *event_handler_method
);
60 void acpi_cpu_ospm_status(CPUHotplugState
*cpu_st
, ACPIOSTInfoList
***list
);
62 extern const VMStateDescription vmstate_cpu_hotplug
;
63 #define VMSTATE_CPU_HOTPLUG(cpuhp, state) \
64 VMSTATE_STRUCT(cpuhp, state, 1, \
65 vmstate_cpu_hotplug, CPUHotplugState)