From nobody Tue Feb 10 01:33:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1566374749; cv=none; d=zoho.com; s=zohoarc; b=WFGThluAsWHFH8TbUwdND3XPwwsnufRrWTFzFuT21rHIKPVJoFo6qgZdibCYwJGXHRpDZtouCOfkEZtsALVuz7HsQy5fnB+eRfsFk6qMbtQBy+Qk37G2HRpHcNOF2V/dBNA1rdviWyMN8jzIl5tvXxhxpaaRIe8jbtNR2mefTS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566374749; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/o3fmHT9Yew0IKXr6LUHFpTrXof3H2IU1VMX4esT6TA=; b=f9RinQYVwrVuTJ3WRPPIsTVBAJzX11O3xSKTGKYORXHbpDOFX6REdCEG6iaMkGC/rHYJ4Kf9jKd/OlXYkaix0MVrMQ3pWbfEDuyDeW+gel19TL8TVf1pF3BblGRkuBJQiZGtyK2ZaclH9P9jcT4JLS3f7ZjSLVQW9I1pxHQQaoM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1566374749411627.3406909439678; Wed, 21 Aug 2019 01:05:49 -0700 (PDT) Received: from localhost ([::1]:44862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0Lcl-0003NQ-19 for importer@patchew.org; Wed, 21 Aug 2019 04:05:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42791) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0L1B-0005YE-Pi for qemu-devel@nongnu.org; Wed, 21 Aug 2019 03:26:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0L1A-0000FJ-MJ for qemu-devel@nongnu.org; Wed, 21 Aug 2019 03:26:53 -0400 Received: from ozlabs.org ([203.11.71.1]:54309) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i0L1A-0008SJ-BX; Wed, 21 Aug 2019 03:26:52 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 46CzjG0Cslz9sR2; Wed, 21 Aug 2019 17:25:51 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1566372354; bh=swC+cfrA6RL8IRtZkusa0ebY3i0bciClde+gKNL4MyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dZj5RMiGCyDjmfPw6sqioOvZ4jsGPWsmbN7kQViYxzzbr+i+KbF+/KWhoQBGSCLA3 eoyu7depvcs9OPsTufgBUDH1quQsr4BQkF0DQjRqB4FAgQfj4KBBgRawcu+35AkUeV yB+cX+e1OZwaSb+sdSkihhhpK1M4ZEZMmjeta1JI= From: David Gibson To: peter.maydell@linaro.org Date: Wed, 21 Aug 2019 17:25:30 +1000 Message-Id: <20190821072542.23090-31-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190821072542.23090-1-david@gibson.dropbear.id.au> References: <20190821072542.23090-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 30/42] i386: use machine class ->wakeup method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org, Nicholas Piggin , groug@kaod.org, qemu-ppc@nongnu.org, Paolo Bonzini , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Nicholas Piggin Move the i386 suspend_wakeup logic out of the fallback path, and into the new ->wakeup method. Signed-off-by: Nicholas Piggin Message-Id: <20190722061752.22114-1-npiggin@gmail.com> Acked-by: Paolo Bonzini Signed-off-by: David Gibson --- 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) } } =20 +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, vo= id *data) mc->block_default_type =3D IF_IDE; mc->max_cpus =3D 255; mc->reset =3D pc_machine_reset; + mc->wakeup =3D pc_machine_wakeup; hc->pre_plug =3D pc_machine_device_pre_plug_cb; hc->plug =3D pc_machine_device_plug_cb; hc->unplug_request =3D 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) =20 if (mc && mc->wakeup) { mc->wakeup(current_machine); - } else { - qemu_system_reset(SHUTDOWN_CAUSE_NONE); } } =20 --=20 2.21.0