]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Fix pit timer tick policy=delay
authorMaxim Nestratov <mnestratov@virtuozzo.com>
Fri, 9 Dec 2016 14:28:04 +0000 (17:28 +0300)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 6 Jan 2017 23:27:06 +0000 (18:27 -0500)
By a mistake, for the VIR_DOMAIN_TIMER_TICKPOLICY_DELAY qemu
command line creation, 'discard' was used instead of 'delay'
in commit id '1569fa14'.

Test "kvm-pit-delay" is fixed accordingly to show the correct
option being generated.

Remove the (now) redundant kvm-pit-device tests. As it turns
out there is no need to specify both QEMU_CAPS_NO_KVM_PIT and
QEMU_CAPS_KVM_PIT_TICK_POLICY since they are mutually exclusive
and "kvm-pit-device" becomes just the same as "kvm-pit-delay".

Signed-off-by: Maxim Nestratov <mnestratov@virtuozzo.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.args
tests/qemuxml2argvtest.c

index e50cca4701445954ee92e8eb080073d8cb56263d..10325e3e5e6097d250f1c7a71994e2ba43c89dfe 100644 (file)
@@ -6242,7 +6242,7 @@ qemuBuildClockCommandLine(virCommandPtr cmd,
                    (-no-kvm-pit), otherwise, the default is catchup. */
                 if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM_PIT_TICK_POLICY))
                     virCommandAddArgList(cmd, "-global",
-                                         "kvm-pit.lost_tick_policy=discard", NULL);
+                                         "kvm-pit.lost_tick_policy=delay", NULL);
                 else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_KVM_PIT))
                     virCommandAddArg(cmd, "-no-kvm-pit-reinjection");
                 break;
index 1d69797dd5483f480bee26ca0b05e79dffde7f86..7a02d362bb2a73e666beb3168d0076634fe7fb66 100644 (file)
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 -nographic \
 -nodefaults \
 -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
--no-kvm-pit-reinjection \
+-global kvm-pit.lost_tick_policy=delay \
 -no-acpi \
 -boot c \
 -usb \
index 8230c268408ead80d4127aea2ea0e6dd9273f552..559dd3ba5307c2fa4c8948bedef34d3dfda6ddaa 100644 (file)
@@ -2274,10 +2274,7 @@ mymain(void)
             QEMU_CAPS_KVM);
     qemuTestSetHostArch(driver.caps, VIR_ARCH_NONE);
 
-    DO_TEST("kvm-pit-device", QEMU_CAPS_KVM_PIT_TICK_POLICY);
-    DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT);
-    DO_TEST("kvm-pit-device", QEMU_CAPS_NO_KVM_PIT,
-            QEMU_CAPS_KVM_PIT_TICK_POLICY);
+    DO_TEST("kvm-pit-delay", QEMU_CAPS_KVM_PIT_TICK_POLICY);
 
     DO_TEST("panic", QEMU_CAPS_DEVICE_PANIC,
             QEMU_CAPS_NODEFCONFIG);