[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 2/7] qemu: remove all support for kQEMU



The kQEMU accelerator was deleted in QEMU 0.12, so we no
longer need to support it in the QEMU driver.

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 src/qemu/qemu_capabilities.c | 18 ------------------
 src/qemu/qemu_capabilities.h |  4 ++--
 src/qemu/qemu_command.c      | 23 ++---------------------
 3 files changed, 4 insertions(+), 41 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c888547..bbb9e9c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -865,7 +865,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
 {
     virCapsGuestPtr guest;
     bool haskvm = false;
-    bool haskqemu = false;
     virCapsGuestMachinePtr *machines = NULL;
     size_t nmachines = 0;
     int ret = -1;
@@ -880,10 +879,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
          kvmbin))
         haskvm = true;
 
-    if (virFileExists("/dev/kqemu") &&
-        virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KQEMU))
-        haskqemu = true;
-
     if (virQEMUCapsGetMachineTypesCaps(qemubinCaps, &nmachines, &machines) < 0)
         goto cleanup;
 
@@ -926,15 +921,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
                                       NULL) == NULL)
         goto cleanup;
 
-    if (haskqemu &&
-        virCapabilitiesAddGuestDomain(guest,
-                                      VIR_DOMAIN_VIRT_KQEMU,
-                                      NULL,
-                                      NULL,
-                                      0,
-                                      NULL) == NULL)
-        goto cleanup;
-
     if (haskvm) {
         virCapsGuestDomainPtr dom;
 
@@ -1103,10 +1089,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
     const char *p;
     const char *fsdev, *netdev;
 
-    if (strstr(help, "-no-kqemu"))
-        virQEMUCapsSet(qemuCaps, QEMU_CAPS_KQEMU);
-    if (strstr(help, "-enable-kqemu"))
-        virQEMUCapsSet(qemuCaps, QEMU_CAPS_ENABLE_KQEMU);
     if (strstr(help, "-no-kvm"))
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_KVM);
     if (strstr(help, "-enable-kvm"))
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index b883315..0c3cf66 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -33,7 +33,7 @@
 /* Internal flags to keep track of qemu command line capabilities */
 typedef enum {
     /* 0 */
-    QEMU_CAPS_KQEMU, /* Whether KQEMU is compiled in */
+    X_QEMU_CAPS_KQEMU, /* Whether KQEMU is compiled in */
     QEMU_CAPS_VNC_COLON, /* VNC takes or address + display */
     QEMU_CAPS_NO_REBOOT, /* Is the -no-reboot flag available */
     QEMU_CAPS_DRIVE, /* Is the new -drive arg available */
@@ -86,7 +86,7 @@ typedef enum {
     QEMU_CAPS_PCI_CONFIGFD, /* pci-assign.configfd */
     QEMU_CAPS_NODEFCONFIG, /* -nodefconfig */
     QEMU_CAPS_BOOT_MENU, /* -boot menu=on support */
-    QEMU_CAPS_ENABLE_KQEMU, /* -enable-kqemu flag */
+    X_QEMU_CAPS_ENABLE_KQEMU, /* -enable-kqemu flag */
 
     /* 40 */
     QEMU_CAPS_FSDEV, /* -fstype filesystem passthrough */
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 8824541..26dc354 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7707,36 +7707,21 @@ qemuBuildObsoleteAccelArg(virCommandPtr cmd,
                           const virDomainDef *def,
                           virQEMUCapsPtr qemuCaps)
 {
-    bool disableKQEMU = false;
-    bool enableKQEMU = false;
     bool disableKVM = false;
     bool enableKVM = false;
 
     switch (def->virtType) {
     case VIR_DOMAIN_VIRT_QEMU:
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KQEMU))
-            disableKQEMU = true;
         if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
             disableKVM = true;
         break;
 
     case VIR_DOMAIN_VIRT_KQEMU:
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
-            disableKVM = true;
-
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_KQEMU)) {
-            enableKQEMU = true;
-        } else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KQEMU)) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                           _("the QEMU binary does not support kqemu"));
-            return -1;
-        }
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                       _("the QEMU binary does not support kqemu"));
         break;
 
     case VIR_DOMAIN_VIRT_KVM:
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KQEMU))
-            disableKQEMU = true;
-
         if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ENABLE_KVM)) {
             enableKVM = true;
         } else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
@@ -7757,10 +7742,6 @@ qemuBuildObsoleteAccelArg(virCommandPtr cmd,
         return -1;
     }
 
-    if (disableKQEMU)
-        virCommandAddArg(cmd, "-no-kqemu");
-    else if (enableKQEMU)
-        virCommandAddArgList(cmd, "-enable-kqemu", "-kernel-kqemu", NULL);
     if (disableKVM)
         virCommandAddArg(cmd, "-no-kvm");
     if (enableKVM)
-- 
2.5.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]