cpu_hotplug.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * QEMU ACPI hotplug utilities
  3. *
  4. * Copyright (C) 2013 Red Hat Inc
  5. *
  6. * Authors:
  7. * Igor Mammedov <imammedo@redhat.com>
  8. *
  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.
  11. */
  12. #ifndef HW_ACPI_CPU_HOTPLUG_H
  13. #define HW_ACPI_CPU_HOTPLUG_H
  14. #include "hw/acpi/acpi.h"
  15. #include "hw/acpi/pc-hotplug.h"
  16. #include "hw/acpi/aml-build.h"
  17. #include "hw/hotplug.h"
  18. #include "hw/acpi/cpu.h"
  19. typedef struct AcpiCpuHotplug {
  20. Object *device;
  21. MemoryRegion io;
  22. uint8_t sts[ACPI_GPE_PROC_LEN];
  23. } AcpiCpuHotplug;
  24. void legacy_acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
  25. AcpiCpuHotplug *g, DeviceState *dev, Error **errp);
  26. void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
  27. AcpiCpuHotplug *gpe_cpu, uint16_t base);
  28. void acpi_switch_to_modern_cphp(AcpiCpuHotplug *gpe_cpu,
  29. CPUHotplugState *cpuhp_state,
  30. uint16_t io_port);
  31. void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine,
  32. uint16_t io_base);
  33. #endif