aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-07-22 16:17:51 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2019-08-21 17:17:39 +1000
commitc508bd12f65e14f82eb62e462bcb64898d8806a6 (patch)
tree4f2d348eb12c5f5d21cd14c3f9e6f67eceeb2aa8 /hw
parent4b5e06c9465ece90b48cb0b978c0b898ea46e133 (diff)
downloadqemu-c508bd12f65e14f82eb62e462bcb64898d8806a6.zip
qemu-c508bd12f65e14f82eb62e462bcb64898d8806a6.tar.gz
qemu-c508bd12f65e14f82eb62e462bcb64898d8806a6.tar.bz2
i386: use machine class ->wakeup method
Move the i386 suspend_wakeup logic out of the fallback path, and into the new ->wakeup method. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-Id: <20190722061752.22114-1-npiggin@gmail.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/pc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 95edbbf..98581fe 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2834,6 +2834,13 @@ static void pc_machine_reset(MachineState *machine)
}
}
+static void pc_machine_wakeup(MachineState *machine)
+{
+ cpu_synchronize_all_states();
+ pc_machine_reset(machine);
+ cpu_synchronize_all_post_reset();
+}
+
static CpuInstanceProperties
pc_cpu_index_to_props(MachineState *ms, unsigned cpu_index)
{
@@ -2946,6 +2953,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
mc->block_default_type = IF_IDE;
mc->max_cpus = 255;
mc->reset = pc_machine_reset;
+ mc->wakeup = pc_machine_wakeup;
hc->pre_plug = pc_machine_device_pre_plug_cb;
hc->plug = pc_machine_device_plug_cb;
hc->unplug_request = pc_machine_device_unplug_request_cb;