Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 517278

Summary: Add -no-kvm-pit-reinject in qemu cmdline for RHEL guests
Product: Red Hat Enterprise Linux 5 Reporter: Dor Laor <dlaor>
Component: libvirtAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: berrange, gren, riek, tburke, veillard, virt-maint, xen-maint, yoyzhang
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:10:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 517903    
Attachments:
Description Flags
Unconditionally add --no-kvm-pit-reinjection to all guests none

Description Dor Laor 2009-08-13 11:07:48 UTC
Description of problem:

RHEL guests that use the pit (the default) source clock try to compensate for lost ticks by reading the tsc too. Since the regular action for kvm is to re-inject pit irqs that fail to be injected on time, it causes the guest clock to go out of sync.

The solution is to add -no-kvm-pit-reinject
More details and additional guest kernel cmd line parameters are on

http://cleo.tlv.redhat.com/qumrawiki/KVM/TimeKeeping

Comment 1 Daniel Berrangé 2009-08-13 11:26:53 UTC
Per-guest configuration is not practical at this point in time of the RHEL-5.4 schedule

What is the impact of enabling this option for all guest OS ?

Comment 2 Dor Laor 2009-08-13 12:15:23 UTC
It is possible to enable it for all guests but it might have negative effect on some guests. Windows with standard HAL (not the default) will lose time.
This is why I like it to be configurable, although if it is plain yes or no, we need it on. 

So bottom line, please add this flag unconditionally for any VM.

Comment 3 Daniel Berrangé 2009-08-13 13:54:30 UTC
Created attachment 357323 [details]
Unconditionally add --no-kvm-pit-reinjection to all guests

This patch is compile tested only so far.

Comment 5 Daniel Veillard 2009-08-18 12:46:02 UTC
libvirt-0.6.3-21.el5 has been built in dist-5E-qu-candidate with the fix,

Daniel

Comment 7 Gunannan Ren 2009-12-28 12:28:05 UTC
I test the bug on libvirt-0.6.3-22.el5, as libvirt-0.6.3-21.el5 not available on brewweb now, the bug has been fixed in libvirt-0.6.3-22.el5.

kvm-83-140.el5
virt-manager-0.6.0-11.el5
libvirt-python-0.6.3-20.el5
libvirt-0.6.3-20.el5

The guest installed is rhel5u4 release version, the output of "ps -ef|grep kvm" is:

root      4965     1  8 20:21 ?        00:00:03 /usr/libexec/qemu-kvm -S -M pc -m 1024 -smp 1 -name rhel5u4kvm -uuid b7e3baca-b9bb-4677-d71a-59f4bcbb6028 -monitor pty -pidfile /var/run/libvirt/qemu//rhel5u4kvm.pid -no-reboot -boot c -kernel /var/lib/libvirt/boot/virtinst-vmlinuz.y4lCrk -initrd /var/lib/libvirt/boot/virtinst-initrd.img.o8G656 -append method=http://download.englab.nay.redhat.com/pub/rhel/released/RHEL-5-Server/U4/x86_64/os/ -drive file=/var/lib/libvirt/images/rhel5u4kvm-1.img,if=ide,index=0,boot=on,cache=none -net nic,macaddr=54:52:00:67:04:87,vlan=0 -net tap,fd=17,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k en-us

kvm-83-140.el5
virt-manager-0.6.0-11.el5
libvirt-python-0.6.3-22.el5
libvirt-0.6.3-22.el5


the ouput of "ps -ef|grep kvm" is:

root      5117     1 22 20:25 ?        00:00:02 /usr/libexec/qemu-kvm -S -M pc -m 1024 -smp 1 -name rhel5u4kvm -uuid 1513ae64-7c76-2bf2-2b82-6ff2f03958df -no-kvm-pit-reinjection -monitor pty -pidfile /var/run/libvirt/qemu//rhel5u4kvm.pid -no-reboot -boot c -kernel /var/lib/libvirt/boot/virtinst-vmlinuz._IwaR4 -initrd /var/lib/libvirt/boot/virtinst-initrd.img.X5-iBO -append method=http://download.englab.nay.redhat.com/pub/rhel/released/RHEL-5-Server/U4/x86_64/os/ -drive file=/var/lib/libvirt/images/rhel5u4kvm-2.img,if=ide,index=0,boot=on,cache=none -net nic,macaddr=54:52:00:77:c7:ac,vlan=0 -net tap,fd=17,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k en-us

Comment 12 errata-xmlrpc 2010-03-30 08:10:21 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0205.html