[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 30/42] i386: use machine class ->wakeup method
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 30/42] i386: use machine class ->wakeup method |
Date: |
Wed, 21 Aug 2019 17:25:30 +1000 |
From: Nicholas Piggin <address@hidden>
Move the i386 suspend_wakeup logic out of the fallback path, and into
the new ->wakeup method.
Signed-off-by: Nicholas Piggin <address@hidden>
Message-Id: <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/i386/pc.c | 8 ++++++++
vl.c | 2 --
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 95edbbfe9e..98581fe0c2 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;
diff --git a/vl.c b/vl.c
index 09aa18cb35..8e5af7501f 100644
--- a/vl.c
+++ b/vl.c
@@ -1568,8 +1568,6 @@ static void qemu_system_wakeup(void)
if (mc && mc->wakeup) {
mc->wakeup(current_machine);
- } else {
- qemu_system_reset(SHUTDOWN_CAUSE_NONE);
}
}
--
2.21.0
- [Qemu-devel] [PULL 29/42] machine: Add wakeup method to MachineClass, (continued)
- [Qemu-devel] [PULL 29/42] machine: Add wakeup method to MachineClass, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 23/42] ppc/xive: Implement TM_PULL_OS_CTX special command, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 34/42] spapr/pci: Free MSIs during reset, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 21/42] pseries: Update SLOF firmware image, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 37/42] spapr/xive: Mask the EAS when allocating an IRQ, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 25/42] ppc/xive: Provide escalation support, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 35/42] spapr/irq: Drop spapr_irq_msi_reset(), David Gibson, 2019/08/21
- [Qemu-devel] [PULL 28/42] ppc/xive: Improve 'info pic' support, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 36/42] spapr: Implement better workaround in spapr-vty device, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 38/42] target/ppc: Add Directed Privileged Door-bell Exception State (DPDES) SPR, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 30/42] i386: use machine class ->wakeup method,
David Gibson <=
- [Qemu-devel] [PULL 22/42] ppc/xive: use an abstract type for XiveNotifier, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 27/42] ppc/xive: Provide silent escalation support, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 41/42] ppc: Fix emulated INFINITY and NAN conversions, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 31/42] spapr: Implement ibm,suspend-me, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 24/42] ppc/xive: Provide backlog support, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 32/42] ppc: remove idle_timer logic, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 42/42] ppc: Fix emulated single to double denormalized conversions, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 40/42] ppc: conform to processor User's Manual for xscvdpspn, David Gibson, 2019/08/21
- [Qemu-devel] [PULL 39/42] ppc: Add support for 'mffsl' instruction, David Gibson, 2019/08/21
- Re: [Qemu-devel] [PULL 00/42] ppc-for-4.2 queue 20190821, no-reply, 2019/08/21