Hide Forgot
Description of problem: We are adding yet another CPU flag for Hyper-V Enlightenment. - "hv-time" to enable the use of Hyper-V reference counter. hv_time is disabled if this parameter is not specified. See http://lists.nongnu.org/archive/html/qemu-devel/2014-01/msg02569.html Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Patch posted for upstream review: http://www.redhat.com/archives/libvir-list/2014-January/msg00963.html The patch will need to wait until qemu accepts the feature.
Fixed in libvirt upstream: commit 600bca592b2352b683856f4b7f2694f366feac36 Author: Peter Krempa <pkrempa> Date: Tue Jan 21 18:50:12 2014 +0100 qemu: hyperv: Add support for timer enlightenments Add a new <timer> for the HyperV reference time counter enlightenment and the iTSC reference page for Windows guests. This feature provides a paravirtual approach to track timer events for the guest (similar to kvmclock) with the option to use real hardware clock on systems with a iTSC with compensation across various hosts. commit 8ffaa42d7bc42f110ea9015a1c8f5528c3eb3bbf Author: Peter Krempa <pkrempa> Date: Wed Feb 5 10:10:14 2014 +0100 conf: Enforce supported options for certain timers According to the documentation various timer options are only supported by certain timer types. Add a post parse check to verify that the user didn't specify invalid options. Also fix the qemu command line parsing function to set correct default values for the kvmclock timer so that it passes the new check. commit bbd392ff86249434ca63bb5977d2b1bd2d72a538 Author: Peter Krempa <pkrempa> Date: Tue Feb 4 19:02:04 2014 +0100 schema: Fix guest timer specification schema according to the docs According to the documentation describing various tunables for domain timers not all the fields are supported by all the driver types. Express these in the RNG: - rtc, platform: Only these support the "track" attribute. - tsc: only one to support "frequency" and "mode" attributes - hpet, pit: tickpolicy/catchup attribute/element - kvmclock: no extra attributes are supported Additionally the attributes of the <catchup> element for tickpolicy='catchup' are optional according to the parsing code. Express this in the XML and fix a spurious space added while formatting the <catchup> element and add tests for it.
Hi peter, When testing this bug, I met two problem: 1. for hv_time, I alway get: "error: internal error: process exited while connecting to monitor: qemu-kvm: feature string `hv_time' not in format (+feature|-feature|feature=xyz)" Even if I use the qemu package provided by Red Hathttps://bugzilla.redhat.com/show_bug.cgi?id=1057173#c1 the error is still there. 2. for clock-catchup I set xml like: <timer name='rtc' tickpolicy='catchup'> <catchup slew='4636'/> </timer> And I can see '-rtc base=utc,driftfix=slew' in command line. But if xml is: <timer name='rtc' tickpolicy='catchup'> <catchup threshold='123'/> </timer> or <timer name='rtc' tickpolicy='catchup'> <catchup limit='2342'/> </timer> I still can see '-rtc base=utc,driftfix=slew' in qemu command line. The problem is why slew is always there even no catchup slew attribute? And what is affected by these three attributes of catchup?
(In reply to Jincheng Miao from comment #7) > Hi peter, > > When testing this bug, I met two problem: > 1. for hv_time, I alway get: > "error: internal error: process exited while connecting to monitor: > qemu-kvm: feature string `hv_time' not in format > (+feature|-feature|feature=xyz)" > Even if I use the qemu package provided by > Red Hathttps://bugzilla.redhat.com/show_bug.cgi?id=1057173#c1 > the error is still there. This is a bug in the backport of the feature from upstream in qemu. Please wait for a working version of the qemu backport. > > 2. for clock-catchup > I set xml like: > <timer name='rtc' tickpolicy='catchup'> > <catchup slew='4636'/> > </timer> > And I can see '-rtc base=utc,driftfix=slew' in command line. > > But if xml is: > <timer name='rtc' tickpolicy='catchup'> > <catchup threshold='123'/> > </timer> > > or > <timer name='rtc' tickpolicy='catchup'> > <catchup limit='2342'/> > </timer> > I still can see '-rtc base=utc,driftfix=slew' in qemu command line. > > The problem is why slew is always there even no catchup slew attribute? > And what is affected by these three attributes of catchup? This is apparently how it works. The code explicitly formats the commandline as "slew": case VIR_DOMAIN_TIMER_TICKPOLICY_CATCHUP: /* deliver ticks at a faster rate until caught up */ virBufferAddLit(&buf, ",driftfix=slew"); break; The part of the patchset modifying the code isn't changing the way this is handled. If you think it's a bug please open a separate bz for it as isn't related to this one.
The hv_time option is passed to qemu-kvm when setting like this: # virsh edit r7 <domain type='kvm'> ... <clock offset='utc'> <timer name='hypervclock' present='yes'/> </clock> ... </domain> # virsh start r7 Domain r7 started # ps -ef | grep hv_time qemu 25085 1 92 17:10 ? 00:00:05 /usr/libexec/qemu-kvm -name r7 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu qemu64,hv_time -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 5d8bcdb9-f61a-4031-b4ac-817b873d356e -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/r7.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/var/lib/libvirt/images/r7.img,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:df:85:42,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 root 25096 16076 0 17:10 pts/1 00:00:00 grep --color=auto hv_time This hv_time option is working on libvirt, so the status could be changed to VERIFIED.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.