提交 ef5c8bb4 编写于 作者: M Maxim Nestratov 提交者: John Ferlan

qemu: Fix pit timer tick policy=delay

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: NMaxim Nestratov <mnestratov@virtuozzo.com>
上级 78be2e8b
......@@ -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;
......
......@@ -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 \
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册