The -no-kvm-pit-reinjection option has been deprecated since
its introduction in QEMU 1.3. See commit <1569fa1>.
Drop the capability since all the QEMUs we support allow tuning
the kvm-pit properties via -global.
Also add the QEMU_CAPS_KVM_PIT_TICK_POLICY to the clock-catchup
tests, since expecting it to succeed with QEMU that does not
have kvm-pit makes no sense.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 6 ++---
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 9 ++-----
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 -
tests/qemuxml2argvdata/clock-hpet-off.args | 1 -
tests/qemuxml2argvdata/hugepages-numa.args | 1 -
tests/qemuxml2argvdata/no-kvm-pit-device.args | 28 ---------------------
tests/qemuxml2argvdata/no-kvm-pit-device.xml | 29 ----------------------
tests/qemuxml2argvdata/q35-virt-manager-basic.args | 1 -
tests/qemuxml2argvtest.c | 3 +--
tests/qemuxml2xmltest.c | 1 -
22 files changed, 6 insertions(+), 87 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/no-kvm-pit-device.args
delete mode 100644 tests/qemuxml2argvdata/no-kvm-pit-device.xml
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index aa8d350f51..166e77c34e 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3705,11 +3705,9 @@ virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI);
}
- /* HPET and KVM PIT are x86 specific */
- if (ARCH_IS_X86(qemuCaps->arch)) {
+ /* HPET is x86 specific */
+ if (ARCH_IS_X86(qemuCaps->arch))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET);
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_KVM_PIT);
- }
}
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 2afe7ef580..f31e946723 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -94,7 +94,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
X_QEMU_CAPS_VHOST_NET, /* vhost-net support available */
X_QEMU_CAPS_RTC_TD_HACK, /* -rtc-td-hack available */
QEMU_CAPS_NO_HPET, /* -no-hpet flag is supported */
- QEMU_CAPS_NO_KVM_PIT, /* -no-kvm-pit-reinjection supported */
+ X_QEMU_CAPS_NO_KVM_PIT, /* -no-kvm-pit-reinjection supported */
/* 35 */
QEMU_CAPS_TDF, /* -tdf flag (user-mode pit catchup) */
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5b1dd37515..575a8a64b4 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6139,16 +6139,13 @@ qemuBuildClockCommandLine(virCommandPtr cmd,
case -1:
case VIR_DOMAIN_TIMER_TICKPOLICY_DELAY:
/* delay is the default if we don't have kernel
- (-no-kvm-pit), otherwise, the default is catchup. */
+ (kvm-pit), otherwise, the default is catchup. */
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM_PIT_TICK_POLICY))
virCommandAddArgList(cmd, "-global",
"kvm-pit.lost_tick_policy=delay",
NULL);
- else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_KVM_PIT))
- virCommandAddArg(cmd, "-no-kvm-pit-reinjection");
break;
case VIR_DOMAIN_TIMER_TICKPOLICY_CATCHUP:
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_KVM_PIT) ||
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM_PIT_TICK_POLICY)) {
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM_PIT_TICK_POLICY)) {
/* do nothing - this is default for kvm-pit */
} else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_TDF)) {
/* -tdf switches to 'catchup' with userspace pit. */
@@ -6165,8 +6162,6 @@ qemuBuildClockCommandLine(virCommandPtr cmd,
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM_PIT_TICK_POLICY))
virCommandAddArgList(cmd, "-global",
"kvm-pit.lost_tick_policy=discard",
NULL);
- else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_KVM_PIT))
- virCommandAddArg(cmd, "-no-kvm-pit-reinjection");
break;
case VIR_DOMAIN_TIMER_TICKPOLICY_MERGE:
/* no way to support this mode for pit in qemu */
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
index 25ad2dff27..e7c2e9a181 100644
--- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
index 97b74749e1..e57dec321d 100644
--- a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
index 75fcf8ff5f..39ec8f9b1d 100644
--- a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
index e97d4b920b..afe0882dde 100644
--- a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
index dd794092a1..78d73b29df 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
index 0b18dd00f9..4fa1036caf 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='spice'/>
<flag name='boot-index'/>
<flag name='hda-duplex'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
index f6556ee3dd..f3834d5bc0 100644
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
index fc3d9d757d..06ae87945a 100644
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
index 3e2399ef20..6d33bffd54 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
index 711e4c935a..34bcac3361 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
index 62e104f3a6..262b329206 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
index a359e2e75f..27c0a8fda5 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -5,7 +5,6 @@
<usedQMP/>
<flag name='kvm'/>
<flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
<flag name='pci-configfd'/>
<flag name='spice'/>
<flag name='boot-index'/>
diff --git a/tests/qemuxml2argvdata/clock-hpet-off.args
b/tests/qemuxml2argvdata/clock-hpet-off.args
index b9255f396b..e2790c8170 100644
--- a/tests/qemuxml2argvdata/clock-hpet-off.args
+++ b/tests/qemuxml2argvdata/clock-hpet-off.args
@@ -18,7 +18,6 @@ QEMU_AUDIO_DRV=none \
server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
--no-kvm-pit-reinjection \
-no-hpet \
-no-shutdown \
-no-acpi \
diff --git a/tests/qemuxml2argvdata/hugepages-numa.args
b/tests/qemuxml2argvdata/hugepages-numa.args
index be58570481..aa834f5511 100644
--- a/tests/qemuxml2argvdata/hugepages-numa.args
+++ b/tests/qemuxml2argvdata/hugepages-numa.args
@@ -24,7 +24,6 @@ host-nodes=1-3,policy=bind \
server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
--no-kvm-pit-reinjection \
-no-hpet \
-no-shutdown \
-global PIIX4_PM.disable_s3=1 \
diff --git a/tests/qemuxml2argvdata/no-kvm-pit-device.args
b/tests/qemuxml2argvdata/no-kvm-pit-device.args
deleted file mode 100644
index c3481614f7..0000000000
--- a/tests/qemuxml2argvdata/no-kvm-pit-device.args
+++ /dev/null
@@ -1,28 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu-system-i686 \
--name QEMUGuest1 \
--S \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
--m 214 \
--smp 2,sockets=2,cores=1,threads=1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--display none \
--no-user-config \
--nodefaults \
--chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
-server,nowait \
--mon chardev=charmonitor,id=monitor,mode=control \
--rtc base=utc \
--no-kvm-pit-reinjection \
--no-shutdown \
--no-acpi \
--boot c \
--usb \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/no-kvm-pit-device.xml
b/tests/qemuxml2argvdata/no-kvm-pit-device.xml
deleted file mode 100644
index 3aff9fef6a..0000000000
--- a/tests/qemuxml2argvdata/no-kvm-pit-device.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<domain type='qemu'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
- <vcpu placement='static'>2</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'>
- <timer name='pit' tickpolicy='discard'/>
- </clock>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu-system-i686</emulator>
- <disk type='block' device='disk'>
- <source dev='/dev/HostVG/QEMUGuest1'/>
- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
- </disk>
- <controller type='usb' index='0'/>
- <controller type='ide' index='0'/>
- <controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
- </devices>
-</domain>
diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.args
b/tests/qemuxml2argvdata/q35-virt-manager-basic.args
index 811a85d647..3416c54e7b 100644
--- a/tests/qemuxml2argvdata/q35-virt-manager-basic.args
+++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.args
@@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=spice \
path=/tmp/lib/domain--1-virt-manager-basic/monitor.sock,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
--no-kvm-pit-reinjection \
-no-hpet \
-no-shutdown \
-global ICH9-LPC.disable_s3=1 \
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 5b3bd4a996..5cdd97ecd0 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -891,7 +891,7 @@ mymain(void)
DO_TEST("clock-variable", NONE);
DO_TEST("clock-france", NONE);
DO_TEST("clock-hpet-off", NONE);
- DO_TEST("clock-catchup", NONE);
+ DO_TEST("clock-catchup", QEMU_CAPS_KVM_PIT_TICK_POLICY);
DO_TEST("cpu-kvmclock", QEMU_CAPS_ENABLE_KVM);
DO_TEST("cpu-host-kvmclock", QEMU_CAPS_ENABLE_KVM);
DO_TEST("kvmclock", QEMU_CAPS_KVM);
@@ -2533,7 +2533,6 @@ mymain(void)
DO_TEST("kvm-pit-delay", QEMU_CAPS_KVM_PIT_TICK_POLICY);
DO_TEST("kvm-pit-discard", QEMU_CAPS_KVM_PIT_TICK_POLICY);
- DO_TEST("no-kvm-pit-device", NONE);
DO_TEST("panic",
QEMU_CAPS_DEVICE_PANIC);
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 4b5aa2315e..439a279672 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -823,7 +823,6 @@ mymain(void)
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
DO_TEST("q35-virt-manager-basic",
QEMU_CAPS_KVM,
- QEMU_CAPS_NO_KVM_PIT,
QEMU_CAPS_ICH9_DISABLE_S3,
QEMU_CAPS_ICH9_DISABLE_S4,
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY,
--
2.16.1