From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvS0d-0007hH-NJ for qemu-devel@nongnu.org; Thu, 09 Feb 2012 06:17:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvS0W-0000SV-UF for qemu-devel@nongnu.org; Thu, 09 Feb 2012 06:17:51 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:49130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvS0W-0000S5-Lg for qemu-devel@nongnu.org; Thu, 09 Feb 2012 06:17:44 -0500 Received: by pbbro12 with SMTP id ro12so1643994pbb.4 for ; Thu, 09 Feb 2012 03:17:40 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F33AB4D.9070904@redhat.com> Date: Thu, 09 Feb 2012 12:17:33 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1328698819-31269-1-git-send-email-kraxel@redhat.com> <1328698819-31269-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1328698819-31269-3-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 2/6] suspend: switch acpi s3 to new infrastructure. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org On 02/08/2012 12:00 PM, Gerd Hoffmann wrote: > +/* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE) > + BIOS will read it and start S3 resume at POST Entry */ > +static void rtc_notify_suspend(Notifier *notifier, void *data) > +{ > + RTCState *s = container_of(notifier, RTCState, suspend_notifier); > + rtc_set_memory(&s->dev, 0xF, 0xFE); > +} > + Out of curiosity, who would set this on real hardware? And since RTC memory is nvram, what happens if I remove the mains plug while the system is in S3? Paolo