From patchwork Wed Jan 11 15:08:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 135455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EA97BB6EEA for ; Thu, 12 Jan 2012 05:11:19 +1100 (EST) Received: from localhost ([::1]:50383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkzoo-0004nk-3q for incoming@patchwork.ozlabs.org; Wed, 11 Jan 2012 10:10:26 -0500 Received: from eggs.gnu.org ([140.186.70.92]:43252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkzo5-0003DY-KQ for qemu-devel@nongnu.org; Wed, 11 Jan 2012 10:09:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rkznz-00079a-CN for qemu-devel@nongnu.org; Wed, 11 Jan 2012 10:09:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkznz-00074g-3u for qemu-devel@nongnu.org; Wed, 11 Jan 2012 10:09:35 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0BF98dY025206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 Jan 2012 10:09:09 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0BF97ro001303; Wed, 11 Jan 2012 10:09:07 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 0EDBB408B6; Wed, 11 Jan 2012 16:09:05 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 11 Jan 2012 16:08:59 +0100 Message-Id: <1326294541-15080-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1326294541-15080-1-git-send-email-kraxel@redhat.com> References: <1326294541-15080-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [RFC PATCH 3/5] suspend: switch acpi s3 to new infrastructure. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Put the new bits into use by making acpi s3 suspend use them. This patch also makes the guest actually stay suspended instead of leaving suspend instantly, so it is useful for more than just testing whenever the suspend/resume cycle actually works. Signed-off-by: Gerd Hoffmann --- hw/acpi.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/acpi.c b/hw/acpi.c index 9c35f2d..11d535d 100644 --- a/hw/acpi.c +++ b/hw/acpi.c @@ -348,8 +348,7 @@ void acpi_pm1_cnt_write(ACPIPM1EVT *pm1a, ACPIPM1CNT *pm1_cnt, uint16_t val) Pretend that resume was caused by power button */ pm1a->sts |= (ACPI_BITMASK_WAKE_STATUS | ACPI_BITMASK_POWER_BUTTON_STATUS); - qemu_system_reset_request(); - qemu_irq_raise(pm1_cnt->cmos_s3); + qemu_system_suspend_request(pm1_cnt->cmos_s3); default: break; }