aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-09-15 14:09:03 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-09-17 14:16:19 +0200
commit0cca1a918b858b37484c571a9a989e2d06eeccae (patch)
tree8c93b3f1f99e936dd1442c2c69a3a60416fc2c2b /include
parent50aef1318166c2a5551d43fb99c5a517f54fcf3c (diff)
downloadqemu-0cca1a918b858b37484c571a9a989e2d06eeccae.zip
qemu-0cca1a918b858b37484c571a9a989e2d06eeccae.tar.gz
qemu-0cca1a918b858b37484c571a9a989e2d06eeccae.tar.bz2
x86: move cpu hotplug from pc to x86
The cpu hotplug code handles the initialization of coldplugged cpus too, so it is needed even in case cpu hotplug is not supported. Move the code from pc to x86, so microvm can use it. Move both plug and unplug to keep everything in one place, even though microvm needs plug only. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Sergio Lopez <slp@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 20200915120909.20838-16-kraxel@redhat.com
Diffstat (limited to 'include')
-rw-r--r--include/hw/i386/x86.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index f540e80..0eef9fb 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -92,6 +92,16 @@ CpuInstanceProperties x86_cpu_index_to_props(MachineState *ms,
unsigned cpu_index);
int64_t x86_get_default_cpu_node_id(const MachineState *ms, int idx);
const CPUArchIdList *x86_possible_cpu_arch_ids(MachineState *ms);
+CPUArchId *x86_find_cpu_slot(MachineState *ms, uint32_t id, int *idx);
+void x86_rtc_set_cpus_count(ISADevice *rtc, uint16_t cpus_count);
+void x86_cpu_pre_plug(HotplugHandler *hotplug_dev,
+ DeviceState *dev, Error **errp);
+void x86_cpu_plug(HotplugHandler *hotplug_dev,
+ DeviceState *dev, Error **errp);
+void x86_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
+ DeviceState *dev, Error **errp);
+void x86_cpu_unplug_cb(HotplugHandler *hotplug_dev,
+ DeviceState *dev, Error **errp);
void x86_bios_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw);