aboutsummaryrefslogtreecommitdiff
path: root/qom/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'qom/cpu.c')
-rw-r--r--qom/cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/qom/cpu.c b/qom/cpu.c
index e242dcbeb4..66f7c00c29 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -20,6 +20,7 @@
#include "qom/cpu.h"
#include "qemu-common.h"
+#include "sysemu/kvm.h"
void cpu_reset_interrupt(CPUState *cpu, int mask)
{
@@ -57,6 +58,11 @@ static ObjectClass *cpu_common_class_by_name(const char *cpu_model)
static void cpu_common_realizefn(DeviceState *dev, Error **errp)
{
+ CPUState *cpu = CPU(dev);
+
+ if (dev->hotplugged) {
+ cpu_synchronize_post_init(cpu);
+ }
}
static void cpu_class_init(ObjectClass *klass, void *data)