mirror of https://gitee.com/openkylin/libvirt.git
qemu: Drop QEMU_CAPS_ENABLE_KVM
It was already available in 1.5.0. Moreover, we're not even formatting it on the QEMU command line, ever: we just use it as part of some logic that decides whether KVM support should be advertised, and as it turns out that logic is actually buggy and dropping this capability fixes it. https://bugzilla.redhat.com/show_bug.cgi?id=1628469 Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
a3676f3763
commit
88983855d5
|
@ -836,7 +836,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
|
||||||
|
|
||||||
if (virFileExists("/dev/kvm") &&
|
if (virFileExists("/dev/kvm") &&
|
||||||
(virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KVM) ||
|
(virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KVM) ||
|
||||||
virQEMUCapsGet(qemubinCaps, QEMU_CAPS_ENABLE_KVM) ||
|
|
||||||
kvmbin))
|
kvmbin))
|
||||||
haskvm = true;
|
haskvm = true;
|
||||||
|
|
||||||
|
@ -2640,7 +2639,6 @@ virQEMUCapsProbeQMPKVMState(virQEMUCapsPtr qemuCaps,
|
||||||
virQEMUCapsClear(qemuCaps, QEMU_CAPS_KVM);
|
virQEMUCapsClear(qemuCaps, QEMU_CAPS_KVM);
|
||||||
} else if (!enabled) {
|
} else if (!enabled) {
|
||||||
virQEMUCapsClear(qemuCaps, QEMU_CAPS_KVM);
|
virQEMUCapsClear(qemuCaps, QEMU_CAPS_KVM);
|
||||||
virQEMUCapsSet(qemuCaps, QEMU_CAPS_ENABLE_KVM);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3938,7 +3936,6 @@ virQEMUCapsIsValid(void *data,
|
||||||
priv->runUid, priv->runGid) == 0;
|
priv->runUid, priv->runGid) == 0;
|
||||||
|
|
||||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM) &&
|
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM) &&
|
||||||
virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_KVM) &&
|
|
||||||
kvmUsable) {
|
kvmUsable) {
|
||||||
VIR_DEBUG("KVM was not enabled when probing '%s', "
|
VIR_DEBUG("KVM was not enabled when probing '%s', "
|
||||||
"but it should be usable now",
|
"but it should be usable now",
|
||||||
|
|
|
@ -79,7 +79,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
||||||
X_QEMU_CAPS_XEN_DOMID, /* -xen-domid */
|
X_QEMU_CAPS_XEN_DOMID, /* -xen-domid */
|
||||||
X_QEMU_CAPS_MIGRATE_QEMU_UNIX, /* qemu migration via unix sockets */
|
X_QEMU_CAPS_MIGRATE_QEMU_UNIX, /* qemu migration via unix sockets */
|
||||||
X_QEMU_CAPS_CHARDEV, /* Is the new -chardev arg available */
|
X_QEMU_CAPS_CHARDEV, /* Is the new -chardev arg available */
|
||||||
QEMU_CAPS_ENABLE_KVM, /* -enable-kvm flag */
|
X_QEMU_CAPS_ENABLE_KVM, /* -enable-kvm flag */
|
||||||
X_QEMU_CAPS_MONITOR_JSON, /* JSON mode for monitor */
|
X_QEMU_CAPS_MONITOR_JSON, /* JSON mode for monitor */
|
||||||
|
|
||||||
/* 25 */
|
/* 25 */
|
||||||
|
|
|
@ -965,16 +965,15 @@ mymain(void)
|
||||||
DO_TEST("clock-france", NONE);
|
DO_TEST("clock-france", NONE);
|
||||||
DO_TEST("clock-hpet-off", NONE);
|
DO_TEST("clock-hpet-off", NONE);
|
||||||
DO_TEST("clock-catchup", QEMU_CAPS_KVM_PIT_TICK_POLICY);
|
DO_TEST("clock-catchup", QEMU_CAPS_KVM_PIT_TICK_POLICY);
|
||||||
DO_TEST("cpu-kvmclock", QEMU_CAPS_ENABLE_KVM);
|
DO_TEST("cpu-kvmclock", NONE);
|
||||||
DO_TEST("cpu-host-kvmclock", QEMU_CAPS_ENABLE_KVM);
|
DO_TEST("cpu-host-kvmclock", NONE);
|
||||||
DO_TEST("kvmclock", QEMU_CAPS_KVM);
|
DO_TEST("kvmclock", QEMU_CAPS_KVM);
|
||||||
DO_TEST("clock-timer-hyperv-rtc", QEMU_CAPS_KVM);
|
DO_TEST("clock-timer-hyperv-rtc", QEMU_CAPS_KVM);
|
||||||
|
|
||||||
DO_TEST("cpu-eoi-disabled", QEMU_CAPS_ENABLE_KVM);
|
DO_TEST("cpu-eoi-disabled", NONE);
|
||||||
DO_TEST("cpu-eoi-enabled", QEMU_CAPS_ENABLE_KVM);
|
DO_TEST("cpu-eoi-enabled", NONE);
|
||||||
DO_TEST("controller-order",
|
DO_TEST("controller-order",
|
||||||
QEMU_CAPS_KVM,
|
QEMU_CAPS_KVM,
|
||||||
QEMU_CAPS_ENABLE_KVM,
|
|
||||||
QEMU_CAPS_PIIX3_USB_UHCI,
|
QEMU_CAPS_PIIX3_USB_UHCI,
|
||||||
QEMU_CAPS_CCID_PASSTHRU,
|
QEMU_CAPS_CCID_PASSTHRU,
|
||||||
QEMU_CAPS_SPICE,
|
QEMU_CAPS_SPICE,
|
||||||
|
@ -986,7 +985,7 @@ mymain(void)
|
||||||
DO_TEST("eoi-enabled", NONE);
|
DO_TEST("eoi-enabled", NONE);
|
||||||
DO_TEST("pv-spinlock-disabled", NONE);
|
DO_TEST("pv-spinlock-disabled", NONE);
|
||||||
DO_TEST("pv-spinlock-enabled", NONE);
|
DO_TEST("pv-spinlock-enabled", NONE);
|
||||||
DO_TEST("kvmclock+eoi-disabled", QEMU_CAPS_ENABLE_KVM);
|
DO_TEST("kvmclock+eoi-disabled", NONE);
|
||||||
|
|
||||||
DO_TEST("hyperv", NONE);
|
DO_TEST("hyperv", NONE);
|
||||||
DO_TEST("hyperv-off", NONE);
|
DO_TEST("hyperv-off", NONE);
|
||||||
|
|
Loading…
Reference in New Issue