From: Paolo Bonzini <pbonzini@redhat.com>
To: Bug 1334397 <1334397@bugs.launchpad.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1334397] [NEW] cmos RTC alarms no longer wake system from suspend
Date: Wed, 25 Jun 2014 22:11:56 +0200 [thread overview]
Message-ID: <53AB2D0C.6020803@redhat.com> (raw)
In-Reply-To: <20140625183928.7492.77861.malonedeb@chaenomeles.canonical.com>
Il 25/06/2014 20:39, John Stultz ha scritto:
> Public bug reported:
>
> Running QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.1),
> booting Linux kernels with qemu-system-x86_64 and qemu-system-i386, I no
> longer see the system resume from suspend when an RTC alarm is set.
>
> My simple test application can be found here:
> https://github.com/johnstultz-work/timetests/blob/master/alarmtimer-suspend.c
>
> Previously this worked w/ QEMU 1.5 (bascially up until I upgraded from
> Ubuntu 13.10 to Ubuntu 14.04, which came with 2.0).
Hi John,
I tried instrumenting QEMU and it looks like the RTC emulation is working:
cmos: write index=0x0b val=0x02
cur 19:53:10 alarm 0:0:0
next alarm 14810
cur 19:53:10 alarm 0:0:0
next alarm 14810
cmos: write index=0x05 val=0x19
cur 19:53:10 alarm 19:0:0
next alarm 83210
cmos: write index=0x03 val=0x53
cur 19:53:10 alarm 19:53:0
next alarm 86390
cmos: write index=0x01 val=0x24
cur 19:53:10 alarm 19:53:24
next alarm 14
cmos: write index=0x0b val=0x22
cur 19:53:10 alarm 19:53:24
next alarm 14
cmos: write index=0x0b val=0x22
cur 19:53:10 alarm 19:53:24
next alarm 14
cur 19:53:11 alarm 19:53:24
next alarm 13
alarm 22
cur 19:53:24 alarm 19:53:24
next alarm 86400
RTC wakeup!
cmos: write index=0x0f val=0x00
cmos: write index=0x0b val=0x22
cur 19:53:24 alarm 19:53:24
next alarm 86400
cmos: write index=0x0b val=0x02
cur 19:53:24 alarm 19:53:24
next alarm 86400
cmos: write index=0x0b val=0x02
cur 19:53:24 alarm 19:53:24
next alarm 86400
cur 19:53:25 alarm 19:53:24
next alarm 86399
cmos: write index=0x0b val=0x02
cur 19:53:25 alarm 19:53:24
next alarm 86399
cur 19:53:25 alarm 19:53:24
next alarm 86399
cmos: write index=0x05 val=0x19
cur 19:53:25 alarm 19:53:24
next alarm 86399
cmos: write index=0x03 val=0x53
cur 19:53:25 alarm 19:53:24
next alarm 86399
cmos: write index=0x01 val=0x39
cur 19:53:25 alarm 19:53:39
next alarm 14
cmos: write index=0x0b val=0x22
cur 19:53:25 alarm 19:53:39
next alarm 14
cmos: write index=0x0b val=0x22
cur 19:53:25 alarm 19:53:39
next alarm 14
cur 19:53:26 alarm 19:53:39
next alarm 13
alarm 22
cur 19:53:39 alarm 19:53:39
next alarm 86400
RTC wakeup!
cmos: write index=0x0f val=0x00
cmos: write index=0x0b val=0x22
cur 19:53:39 alarm 19:53:39
next alarm 86400
cmos: write index=0x0b val=0x02
cur 19:53:39 alarm 19:53:39
next alarm 86400
cmos: write index=0x0b val=0x02
cur 19:53:39 alarm 19:53:39
next alarm 86400
cur 19:53:40 alarm 19:53:39
next alarm 86399
cmos: write index=0x0b val=0x02
cur 19:53:40 alarm 19:53:39
next alarm 86399
cur 19:53:40 alarm 19:53:39
next alarm 86399
cmos: write index=0x05 val=0x19
cur 19:53:40 alarm 19:53:39
next alarm 86399
cmos: write index=0x03 val=0x53
cur 19:53:40 alarm 19:53:39
next alarm 86399
cmos: write index=0x01 val=0x54
cur 19:53:40 alarm 19:53:54
next alarm 14
cmos: write index=0x0b val=0x22
cur 19:53:40 alarm 19:53:54
next alarm 14
The only way to have the CMOS updated is from the guest, so the guest is
resumed. The "RTC wakeup!" also is just before setting the
RT_CLOCK_STATUS field in the ACPI PM1A event status register.
However, I can reproduce that the system looks indeed like it's crashed
and I don't see neither the resumption nor the printf from the
sigalarm() function. This is on kernel 3.11.10.
Also, I see that register C (the current interrupt) is always read as zero.
Right now I don't have an older QEMU, but I'll look at it tomorrow.
Paolo
next prev parent reply other threads:[~2014-06-25 20:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 18:39 [Qemu-devel] [Bug 1334397] [NEW] cmos RTC alarms no longer wake system from suspend John Stultz
2014-06-25 20:11 ` Paolo Bonzini [this message]
2014-06-26 7:02 ` Paolo Bonzini
2014-06-26 10:01 ` Paolo Bonzini
2014-06-26 10:02 ` [Qemu-devel] [Bug 1334397] " Paolo Bonzini
2014-06-26 16:16 ` John Stultz
2014-06-26 16:56 ` John Stultz
2017-07-21 14:32 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53AB2D0C.6020803@redhat.com \
--to=pbonzini@redhat.com \
--cc=1334397@bugs.launchpad.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.