]> xenbits.xensource.com Git - libvirt.git/commitdiff
Deprecate QEMU_CAPS_NO_KVM_PIT
authorJán Tomko <jtomko@redhat.com>
Thu, 3 May 2018 08:38:42 +0000 (10:38 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 7 May 2018 08:33:13 +0000 (10:33 +0200)
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@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
22 files changed:
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_command.c
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
tests/qemuxml2argvdata/clock-hpet-off.args
tests/qemuxml2argvdata/hugepages-numa.args
tests/qemuxml2argvdata/no-kvm-pit-device.args [deleted file]
tests/qemuxml2argvdata/no-kvm-pit-device.xml [deleted file]
tests/qemuxml2argvdata/q35-virt-manager-basic.args
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c

index 0265d83028433156833d90e650e6744d91211a38..920a5961764d6b597cc799a7a691b10fbbed3a00 100644 (file)
@@ -3710,11 +3710,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);
-    }
 }
 
 
index 8da18a8063becc6e09879eabf524af2f6d79dfee..66f1ac03bc795a83a3959e1fc8efe22d3f3a2c76 100644 (file)
@@ -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) */
index 824ebbc89efaf6452c05b352931d39fc62fc8470..2029bd2bbde0b924af2a7c778d573238cc3a0397 100644 (file)
@@ -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 */
index 25ad2dff274f1dd21f4229510f87f54119670825..e7c2e9a181aa1185ae5cb454564a86653293fdcd 100644 (file)
@@ -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'/>
index 97b74749e198ccb320241e8d5269f45756f09fd8..e57dec321d4c8c6606a279ad36a97d08162f93f0 100644 (file)
@@ -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'/>
index 75fcf8ff5f431870c79b0c3df415740ad3bbf7d6..39ec8f9b1d71c606bdba0c3bdd5b3655b0b9bdcd 100644 (file)
@@ -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'/>
index e97d4b920b8831a220870de91cde46a77c261587..afe0882dde2871d0836809650e2d3e80fa88ebb5 100644 (file)
@@ -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'/>
index dd794092a110f3b9a5cbb53350d53ba58fd78170..78d73b29dfef8287c9623037a51bae5d210afa2a 100644 (file)
@@ -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'/>
index 7c346e5a5cda22e1a6d2ae3026e30cbfc71cfba1..150fbd21f3c4dab01153d2b3ab73c7f35fde9f4a 100644 (file)
@@ -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'/>
index f6556ee3dd84d635dec05744ca7c93f4aa55ad66..f3834d5bc07d9ed0a460c47a7269df78f47e277f 100644 (file)
@@ -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'/>
index fc3d9d757defd149ca95b6b9a385f72a0a05dffb..06ae87945a82ec3a5b68f9afb68d9d4b71dee7a0 100644 (file)
@@ -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'/>
index 3e2399ef2055c5b27c05e85ac037ddad7c50976e..6d33bffd5426d2d02a937607df9e9205e63d072d 100644 (file)
@@ -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'/>
index 711e4c935a33511ce176b9a9b7e200fe2aa97e0e..34bcac33618d3e54c515b01aa0c0d7cb9b97b055 100644 (file)
@@ -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'/>
index 62e104f3a63e73ab37c8eec38855bc860a292546..262b32920600a9cb4638a81c1e6c84bc67deb4b6 100644 (file)
@@ -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'/>
index a359e2e75fa13fd9b04d22ac65bcd0d6879bdffc..27c0a8fda5d6eb2cb7b06d53efc990ebc0b2c23f 100644 (file)
@@ -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'/>
index b9255f396b08d72c070a0b079504b25f23b775f0..e2790c8170ae5915921d0522b5201b95fbf764f4 100644 (file)
@@ -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 \
index be5857048139e964a283e5a8ca505d27e54baa49..aa834f55115768ab05245babe8011fe93cb080c0 100644 (file)
@@ -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 (file)
index c348161..0000000
+++ /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 (file)
index 3aff9fe..0000000
+++ /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>
index 811a85d647bd59aaf1fc512ca80ebe840cf2a2f8..3416c54e7b81e5feb0e1a0df0bd90755bd41a72a 100644 (file)
@@ -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 \
index 8ef77018b10b425dc9ddec6b73790e0f78c88f30..ddf567b62238a0a5afaeaeeaf2e65c76d3f0a76d 100644 (file)
@@ -873,7 +873,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);
@@ -2519,7 +2519,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);
index 21fb4112471be5a8b34394e94c996979d036b224..53a26a0c3e1f4ac983fe47873bcec1a2a4cd7954 100644 (file)
@@ -824,7 +824,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,