diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2016-06-24 11:00:15 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2016-06-24 11:00:15 +0100 |
| commit | a01aef5d2f96c334d048f43f0d3573a1152b37ca (patch) | |
| tree | fce1969574c37a87816c17f98d4fd5a9f818bf00 /include/hw/acpi/cpu.h | |
| parent | c7288767523f6510cf557707d3eb5e78e519b90d (diff) | |
| parent | 21a4d96243e60a4c8eeb124a023b8a3bd9120e18 (diff) | |
| download | focaccia-qemu-a01aef5d2f96c334d048f43f0d3573a1152b37ca.tar.gz focaccia-qemu-a01aef5d2f96c334d048f43f0d3573a1152b37ca.zip | |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc, pci, virtio: new features, cleanups, fixes nvdimm label support cpu acpi hotplug rework virtio rework misc cleanups and fixes Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Fri 24 Jun 2016 06:50:32 BST # gpg: using RSA key 0x281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: (34 commits) virtio-bus: remove old set_host_notifier callback virtio-mmio: convert to ioeventfd callbacks virtio-pci: convert to ioeventfd callbacks virtio-ccw: convert to ioeventfd callbacks virtio-bus: have callers tolerate new host notifier api virtio-bus: common ioeventfd infrastructure pc: acpi: drop intermediate PCMachineState.node_cpu acpi-test-data: update expected pc: use new CPU hotplug interface since 2.7 machine type acpi: cpuhp: add cpu._OST handling acpi: cpuhp: implement hot-remove parts of CPU hotplug interface acpi: cpuhp: implement hot-add parts of CPU hotplug interface pc: acpi: introduce AcpiDeviceIfClass.madt_cpu hook acpi: cpuhp: add CPU devices AML with _STA method pc: piix4/ich9: add 'cpu-hotplug-legacy' property docs: update ACPI CPU hotplug spec with new protocol i386: pci-assign: Fix MSI-X table size docs: add NVDIMM ACPI documentation nvdimm acpi: support Set Namespace Label Data function nvdimm acpi: support Get Namespace Label Data function ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/acpi/cpu.h')
| -rw-r--r-- | include/hw/acpi/cpu.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/include/hw/acpi/cpu.h b/include/hw/acpi/cpu.h new file mode 100644 index 0000000000..89ce172941 --- /dev/null +++ b/include/hw/acpi/cpu.h @@ -0,0 +1,67 @@ +/* + * QEMU ACPI hotplug utilities + * + * Copyright (C) 2016 Red Hat Inc + * + * Authors: + * Igor Mammedov <imammedo@redhat.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#ifndef ACPI_CPU_H +#define ACPI_CPU_H + +#include "hw/qdev-core.h" +#include "hw/acpi/acpi.h" +#include "hw/acpi/aml-build.h" +#include "hw/hotplug.h" + +typedef struct AcpiCpuStatus { + struct CPUState *cpu; + uint64_t arch_id; + bool is_inserting; + bool is_removing; + uint32_t ost_event; + uint32_t ost_status; +} AcpiCpuStatus; + +typedef struct CPUHotplugState { + MemoryRegion ctrl_reg; + uint32_t selector; + uint8_t command; + uint32_t dev_count; + AcpiCpuStatus *devs; +} CPUHotplugState; + +void acpi_cpu_plug_cb(HotplugHandler *hotplug_dev, + CPUHotplugState *cpu_st, DeviceState *dev, Error **errp); + +void acpi_cpu_unplug_request_cb(HotplugHandler *hotplug_dev, + CPUHotplugState *cpu_st, + DeviceState *dev, Error **errp); + +void acpi_cpu_unplug_cb(CPUHotplugState *cpu_st, + DeviceState *dev, Error **errp); + +void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner, + CPUHotplugState *state, hwaddr base_addr); + +typedef struct CPUHotplugFeatures { + bool apci_1_compatible; + bool has_legacy_cphp; +} CPUHotplugFeatures; + +void build_cpus_aml(Aml *table, MachineState *machine, CPUHotplugFeatures opts, + hwaddr io_base, + const char *res_root, + const char *event_handler_method); + +void acpi_cpu_ospm_status(CPUHotplugState *cpu_st, ACPIOSTInfoList ***list); + +extern const VMStateDescription vmstate_cpu_hotplug; +#define VMSTATE_CPU_HOTPLUG(cpuhp, state) \ + VMSTATE_STRUCT(cpuhp, state, 1, \ + vmstate_cpu_hotplug, CPUHotplugState) + +#endif |