RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 557285 - [RFE] Need to add time keeping abstraction
Summary: [RFE] Need to add time keeping abstraction
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
high
medium
Target Milestone: beta
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-20 22:11 UTC by Dor Laor
Modified: 2013-01-09 21:17 UTC (History)
12 users (show)

Fixed In Version: libvirt-0.7.8-0.pre20100330.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-02 19:28:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dor Laor 2010-01-20 22:11:46 UTC
Description of problem:
KVM does not really virtualize the tsc. Basically today we just wrap it with a delta. It might be suffice and good enough for most application but might be a problem is guest kernel/apps will need a very accurate tsc readings.

The solution is to add an abstraction about tsc virtualization - it can be:
 - 'normal' - the default like today
 - 'ideal' - trap every tsc read and fully emulate it.

Zach can provide further information. Also need to see if we need a new bug for live migration when the tsc frequency changes among the hosts.

Comment 2 RHEL Program Management 2010-01-20 22:35:52 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 5 Daniel Berrangé 2010-03-05 14:38:25 UTC
A proposal for modelling this in libvirt XML is posted upstream.

http://www.redhat.com/archives/libvir-list/2010-March/msg00304.html

Would appreciate feedback from the KVM team that this is an accurate representation of & solution to the problem.

Comment 6 Daniel Berrangé 2010-03-05 14:39:21 UTC
NB, this proposal also covers the RTC/PIT missed tick hacks in KVM.

Comment 7 Hugh Brock 2010-03-15 19:16:41 UTC
With the design settled, reassigning to Laine for the implementation.

Comment 8 Bill Burns 2010-03-26 00:05:28 UTC
*** Bug 576973 has been marked as a duplicate of this bug. ***

Comment 9 Laine Stump 2010-03-26 18:57:28 UTC
libvirt support for the XML and qemu backend described in the aforementioned email has been posted upstream:

https://www.redhat.com/archives/libvir-list/2010-March/msg01289.html

The vmware and xen backends have not yet been implemented.

Comment 10 Daniel Veillard 2010-03-30 21:20:59 UTC
libvirt-0.7.8-0.pre20100330.el6 was built in RHEL-6-candidate with
the patches

Daniel

Comment 13 dyuan 2010-06-22 10:51:10 UTC
Test with libvirt-0.8.1-9.el6 and qemu-kvm-0.12.1.2-2.77.el6

# virsh start demo
error: Failed to start domain demo
error: internal error Process exited while reading console log output: qemu-kvm: -rtc base=localtime,driftfix=slew: Invalid parameter 'driftfix'

Test with the following lines in xml:
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup' wallclock='guest'/>
  </clock>

got xml description from: 
http://www.redhat.com/archives/libvir-list/2010-March/msg00304.html


# tail -f /var/log/libvirt/qemu/demo.log
==> /var/log/libvirt/qemu/demo.log <==
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 2048 -smp 33,sockets=33,cores=1,threads=1 -name demo -uuid 80f9fa13-41d0-c352-b9d1-939937668a16 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/rhel68.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=localtime,driftfix=slew -boot c -drive file=/mnt/vol/rhel6_x86_64.img,if=none,id=drive-ide0-0-0,boot=on,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:35:17:aa,bus=pci.0,addr=0x4 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:1 -k en-us -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 
qemu-kvm: -rtc base=localtime,driftfix=slew: Invalid parameter 'driftfix'


Test with name='pit' and name='hpet', no error output.
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>

Comment 14 Daniel Berrangé 2010-06-22 11:04:06 UTC
libvirt is operating correctly there. The problem reported is a QEMU bug

https://bugzilla.redhat.com/show_bug.cgi?id=606733

Comment 16 Yan Tian 2010-06-23 02:37:43 UTC
Verified this bug with Comment 14.

Comment 17 releng-rhel@redhat.com 2010-07-02 19:28:33 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Comment 18 Nan Zhang 2010-09-08 10:24:17 UTC
Verified with libvirt-0.8.1-27.el6.x86_64 & qemu-kvm-0.12.1.2-2.113.el6.x86_64.

1. Test with the XML:
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup' track='guest'/>
  </clock>

# virsh start rhel6
Domain rhel6 started

# tail /var/log/libvirt/qemu/rhel6.log
...
-rtc base=localtime,clock=vm,driftfix=slew
...

2. Test with the XML:
  <clock offset='localtime'>
    <timer name='pit' tickpolicy='delay' />
  </clock>

# virsh start rhel6
Domain rhel6 started

# tail /var/log/libvirt/qemu/rhel6.log
...
-rtc base=localtime -no-kvm-pit-reinjection
...

3. Test with the XML:
  <clock offset='localtime'>
    <timer name='hpet' present='no'/>
  </clock>

# virsh start rhel6
Domain rhel6 started

# tail /var/log/libvirt/qemu/rhel6.log
...
-rtc base=localtime
...


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