|
|
edecca |
From ab9d2e264ba8a544eadb9e1b72a4a5d0f4789815 Mon Sep 17 00:00:00 2001
|
|
|
edecca |
Message-Id: <ab9d2e264ba8a544eadb9e1b72a4a5d0f4789815@dist-git>
|
|
|
edecca |
From: Andrea Bolognani <abologna@redhat.com>
|
|
|
edecca |
Date: Mon, 17 Sep 2018 18:00:50 +0200
|
|
|
edecca |
Subject: [PATCH] qemu: Drop QEMU_CAPS_ENABLE_KVM
|
|
|
edecca |
|
|
|
edecca |
It was already available in 1.5.0.
|
|
|
edecca |
|
|
|
edecca |
Moreover, we're not even formatting it on the QEMU command
|
|
|
edecca |
line, ever: we just use it as part of some logic that decides
|
|
|
edecca |
whether KVM support should be advertised, and as it turns out
|
|
|
edecca |
that logic is actually buggy and dropping this capability
|
|
|
edecca |
fixes it.
|
|
|
edecca |
|
|
|
edecca |
https://bugzilla.redhat.com/show_bug.cgi?id=1628469
|
|
|
edecca |
|
|
|
edecca |
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
edecca |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
edecca |
(cherry picked from commit 88983855d5496a74b97551860db737c2b17b100e)
|
|
|
edecca |
|
|
|
edecca |
https://bugzilla.redhat.com/show_bug.cgi?id=1629862
|
|
|
edecca |
|
|
|
edecca |
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
edecca |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
edecca |
---
|
|
|
edecca |
src/qemu/qemu_capabilities.c | 3 ---
|
|
|
edecca |
src/qemu/qemu_capabilities.h | 2 +-
|
|
|
edecca |
tests/qemuxml2argvtest.c | 11 +++++------
|
|
|
edecca |
3 files changed, 6 insertions(+), 10 deletions(-)
|
|
|
edecca |
|
|
|
edecca |
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
|
|
edecca |
index 1321696d11..14d7b8fbf7 100644
|
|
|
edecca |
--- a/src/qemu/qemu_capabilities.c
|
|
|
edecca |
+++ b/src/qemu/qemu_capabilities.c
|
|
|
edecca |
@@ -834,7 +834,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
|
|
|
edecca |
|
|
|
edecca |
if (virFileExists("/dev/kvm") &&
|
|
|
edecca |
(virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KVM) ||
|
|
|
edecca |
- virQEMUCapsGet(qemubinCaps, QEMU_CAPS_ENABLE_KVM) ||
|
|
|
edecca |
kvmbin))
|
|
|
edecca |
haskvm = true;
|
|
|
edecca |
|
|
|
edecca |
@@ -2603,7 +2602,6 @@ virQEMUCapsProbeQMPKVMState(virQEMUCapsPtr qemuCaps,
|
|
|
edecca |
virQEMUCapsClear(qemuCaps, QEMU_CAPS_KVM);
|
|
|
edecca |
} else if (!enabled) {
|
|
|
edecca |
virQEMUCapsClear(qemuCaps, QEMU_CAPS_KVM);
|
|
|
edecca |
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_ENABLE_KVM);
|
|
|
edecca |
}
|
|
|
edecca |
|
|
|
edecca |
return 0;
|
|
|
edecca |
@@ -3911,7 +3909,6 @@ virQEMUCapsIsValid(void *data,
|
|
|
edecca |
priv->runUid, priv->runGid) == 0;
|
|
|
edecca |
|
|
|
edecca |
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM) &&
|
|
|
edecca |
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_KVM) &&
|
|
|
edecca |
kvmUsable) {
|
|
|
edecca |
VIR_DEBUG("KVM was not enabled when probing '%s', "
|
|
|
edecca |
"but it should be usable now",
|
|
|
edecca |
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
|
|
edecca |
index 9e8ad5f5c3..98668115d6 100644
|
|
|
edecca |
--- a/src/qemu/qemu_capabilities.h
|
|
|
edecca |
+++ b/src/qemu/qemu_capabilities.h
|
|
|
edecca |
@@ -79,7 +79,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
|
|
edecca |
X_QEMU_CAPS_XEN_DOMID, /* -xen-domid */
|
|
|
edecca |
X_QEMU_CAPS_MIGRATE_QEMU_UNIX, /* qemu migration via unix sockets */
|
|
|
edecca |
X_QEMU_CAPS_CHARDEV, /* Is the new -chardev arg available */
|
|
|
edecca |
- QEMU_CAPS_ENABLE_KVM, /* -enable-kvm flag */
|
|
|
edecca |
+ X_QEMU_CAPS_ENABLE_KVM, /* -enable-kvm flag */
|
|
|
edecca |
X_QEMU_CAPS_MONITOR_JSON, /* JSON mode for monitor */
|
|
|
edecca |
|
|
|
edecca |
/* 25 */
|
|
|
edecca |
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
|
|
|
edecca |
index ebe9c8a131..13e95fe28a 100644
|
|
|
edecca |
--- a/tests/qemuxml2argvtest.c
|
|
|
edecca |
+++ b/tests/qemuxml2argvtest.c
|
|
|
edecca |
@@ -912,16 +912,15 @@ mymain(void)
|
|
|
edecca |
DO_TEST("clock-france", NONE);
|
|
|
edecca |
DO_TEST("clock-hpet-off", NONE);
|
|
|
edecca |
DO_TEST("clock-catchup", QEMU_CAPS_KVM_PIT_TICK_POLICY);
|
|
|
edecca |
- DO_TEST("cpu-kvmclock", QEMU_CAPS_ENABLE_KVM);
|
|
|
edecca |
- DO_TEST("cpu-host-kvmclock", QEMU_CAPS_ENABLE_KVM);
|
|
|
edecca |
+ DO_TEST("cpu-kvmclock", NONE);
|
|
|
edecca |
+ DO_TEST("cpu-host-kvmclock", NONE);
|
|
|
edecca |
DO_TEST("kvmclock", QEMU_CAPS_KVM);
|
|
|
edecca |
DO_TEST("clock-timer-hyperv-rtc", QEMU_CAPS_KVM);
|
|
|
edecca |
|
|
|
edecca |
- DO_TEST("cpu-eoi-disabled", QEMU_CAPS_ENABLE_KVM);
|
|
|
edecca |
- DO_TEST("cpu-eoi-enabled", QEMU_CAPS_ENABLE_KVM);
|
|
|
edecca |
+ DO_TEST("cpu-eoi-disabled", NONE);
|
|
|
edecca |
+ DO_TEST("cpu-eoi-enabled", NONE);
|
|
|
edecca |
DO_TEST("controller-order",
|
|
|
edecca |
QEMU_CAPS_KVM,
|
|
|
edecca |
- QEMU_CAPS_ENABLE_KVM,
|
|
|
edecca |
QEMU_CAPS_PIIX3_USB_UHCI,
|
|
|
edecca |
QEMU_CAPS_CCID_PASSTHRU,
|
|
|
edecca |
QEMU_CAPS_SPICE,
|
|
|
edecca |
@@ -933,7 +932,7 @@ mymain(void)
|
|
|
edecca |
DO_TEST("eoi-enabled", NONE);
|
|
|
edecca |
DO_TEST("pv-spinlock-disabled", NONE);
|
|
|
edecca |
DO_TEST("pv-spinlock-enabled", NONE);
|
|
|
edecca |
- DO_TEST("kvmclock+eoi-disabled", QEMU_CAPS_ENABLE_KVM);
|
|
|
edecca |
+ DO_TEST("kvmclock+eoi-disabled", NONE);
|
|
|
edecca |
|
|
|
edecca |
DO_TEST("hyperv", NONE);
|
|
|
edecca |
DO_TEST("hyperv-off", NONE);
|
|
|
edecca |
--
|
|
|
edecca |
2.19.1
|
|
|
edecca |
|