[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Bug 1334397] [NEW] cmos RTC alarms no longer wake syst
From: |
Paolo Bonzini |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
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
- [Qemu-devel] [PATCH 0/5 v5] ppc: Add debug stub support, Bharat Bhushan, 2014/06/26
- [Qemu-devel] [PATCH 5/5 v5] ppc: Add hw breakpoint watchpoint support, Bharat Bhushan, 2014/06/26
- [Qemu-devel] [PATCH 4/5 v5] ppc: Add software breakpoint support, Bharat Bhushan, 2014/06/26
- [Qemu-devel] [PATCH 1/5 v5] ppc: debug stub: Get trap instruction opcode from KVM, Bharat Bhushan, 2014/06/26
- [Qemu-devel] [PATCH 3/5 v5] ppc: Add debug interrupt injection handler, Bharat Bhushan, 2014/06/26
- [Qemu-devel] [PATCH 2/5 v5] ppc: Add interface to inject interrupt to guest, Bharat Bhushan, 2014/06/26