Deprecate QEMU_CAPS_NO_KVM_PIT

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>
This commit is contained in:
Ján Tomko 2018-05-03 10:38:42 +02:00
parent 1c533759e1
commit 941c8b0d00
22 changed files with 6 additions and 87 deletions

View 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);
}
}

View 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) */

View 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 */

View 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'/>

View 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'/>

View 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'/>

View 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'/>

View 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'/>

View 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'/>

View 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'/>

View 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'/>

View 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'/>

View 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'/>

View 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'/>

View 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'/>

View 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 \

View 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 \

View File

@ -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

View File

@ -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>

View 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 \

View 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);

View 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,