Bug 725876 - RTC interrupt problems with RHEL5 qemu/kvm (0.10 based) on 2.6.38+ guest kernels.
RTC interrupt problems with RHEL5 qemu/kvm (0.10 based) on 2.6.38+ guest kern...
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Gleb Natapov
Virtualization Bugs
Depends On:
Blocks: Rhel5KvmTier1
  Show dependency treegraph
Reported: 2011-07-26 16:21 EDT by john stultz
Modified: 2013-01-09 06:53 EST (History)
8 users (show)

See Also:
Fixed In Version: kvm-83-243.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-02-20 22:15:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description john stultz 2011-07-26 16:21:25 EDT
Description of problem:

The RHEL5 qemu/kvm (0.10 based) does not properly emulate RTC Alarm (AIE) interrupts. Newer kernels (2.6.38+) use AIE interrupts exclusively for RTC functionality (including UIE mode).

This manifests in issues like the following, when running recent guest kernels on a RHEL5 kvm host system.

[root@hwclock ~]# hwclock 
select() to /dev/rtc to wait for clock tick timed out

Proper AIE mode emulation was added to qemu/kvm in 0.11.

While it is non-trivial, I think backporting the AIE support to the RHEL5 qemu/kvm package would be the best solution here.

Version-Release number of selected component (if applicable):
KVM version: 0.10.50

How reproducible:
Always when using 2.6.38+ kernels.

Steps to Reproduce:
1. Boot 2.6.38+ kernel with RHEL5 kvm
2. Run hwclock (or any other application that accesses the rtc with AIE or UIE mode irqs)
Actual results:
No interrupts when in UIE or AIE mode, causing applications to fail.

Expected results:
UIE and AIE mode interrupts should function, and applications would run normally.

Additional info:
This issue was originally reported here:
Comment 3 Suqin Huang 2011-08-16 03:33:59 EDT
can reproduce it with fedora guest, so add qe_ack +

1). #hwclock
select() to /dev/rtc to wait for clock tick timed out

2). guest

3). kvm: kvm-83-239.el5
Comment 4 Ulrich Obergfell 2011-10-11 03:57:29 EDT
We are considering a back-port of qemu upstream commit


to address the RTC Alarm Interrupt issue. Additionally,
we are considering a back-port of qemu upstream commit


The two combined patches should make rtc_update_second2()
similar to RHEL6 code.
Comment 20 FuXiangChun 2011-12-12 06:06:29 EST
1.reproduce with kmod-kvm-83-239.el5 and

steps to reproduce

1.1. install fedora15 guest
1.2.boot guest
/usr/libexec/qemu-kvm  -M rhel5.6.0 -m 4096 -smp 4,cores=2,threads=1,sockets=2 -cpu qemu64,vendor="AuthenticAMD",+sse2 -soundhw all -name win7 -usbdevice tablet -rtc-td-hack -uuid 123465d2-2032-848d-bda0-de7adb149048 -boot nc -drive file=/home/fedora/fedora15.qcow2,if=virtio,boot=on,bus=0,unit=0,format=qcow2,cache=none,boot=on,werror=stop -net nic,macaddr=54:52:00:27:12:23,vlan=0,model=virtio -soundhw ac97 -net tap,vlan=0,script=/etc/qemu-ifup -serial pty -parallel none -usb -balloon none -monitor stdio -spice host=0,ic=on,port=5911,disable-ticketing -qxl 1

1.3.# hwclock

actual result: 
select() to /dev/rtc to wait for clock tick timed out

2.verify with kvm-83-246.el5 and

2.1.repeat 1.1
2.2.repeat 1.2
2.3 repeat 1.3

actual result:
# hwclock 
Mon 12 Dec 2011 06:02:06 AM EST  -0.184707 seconds

base on above testing result, this bug is fixed.
Comment 22 errata-xmlrpc 2012-02-20 22:15:07 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.