]> xenbits.xensource.com Git - libvirt.git/commitdiff
Deprecate QEMU_CAPS_NESTING
authorJán Tomko <jtomko@redhat.com>
Thu, 3 May 2018 10:14:41 +0000 (12:14 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 9 May 2018 11:55:04 +0000 (13:55 +0200)
Unused since commit <a7424fa>.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_capabilities.h
src/qemu/qemu_command.c

index abd6eff14a8870b5d1d94104c38b1b48c5831703..b9628b82663b5c87598eb757b5a97bddf7081ba8 100644 (file)
@@ -105,7 +105,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
 
     /* 40 */
     X_QEMU_CAPS_FSDEV, /* -fstype filesystem passthrough */
-    QEMU_CAPS_NESTING, /* -enable-nesting (SVM/VMX) */
+    X_QEMU_CAPS_NESTING, /* -enable-nesting (SVM/VMX) */
     X_QEMU_CAPS_NAME_PROCESS, /* Is -name process= available */
     X_QEMU_CAPS_DRIVE_READONLY, /* -drive readonly=on|off */
     X_QEMU_CAPS_SMBIOS_TYPE, /* Is -smbios type= available */
index c6bf6d5837991b6221c4c999a8514334c868aa7c..08f67a44b91c2b4f6a3cc8e5705485316d3e3cbe 100644 (file)
@@ -6638,7 +6638,6 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
 {
     virArch hostarch = virArchFromHost();
     char *cpu = NULL, *cpu_flags = NULL;
-    bool hasHwVirt = false;
     int ret = -1;
     virBuffer cpu_buf = VIR_BUFFER_INITIALIZER;
     virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -6648,26 +6647,6 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
         (def->cpu->mode != VIR_CPU_MODE_CUSTOM || def->cpu->model)) {
         if (qemuBuildCpuModelArgStr(driver, def, &cpu_buf, qemuCaps) < 0)
             goto cleanup;
-
-        /* Only 'svm' requires --enable-nesting. The nested 'vmx' patches now
-         * simply hook off the CPU features. */
-        if (ARCH_IS_X86(def->os.arch) &&
-            def->virtType == VIR_DOMAIN_VIRT_KVM) {
-            virCPUDefPtr cpuDef = NULL;
-
-            if (def->cpu->mode == VIR_CPU_MODE_CUSTOM)
-                cpuDef = def->cpu;
-            else if (def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH)
-                cpuDef = virQEMUCapsGetHostModel(qemuCaps, def->virtType,
-                                                 VIR_QEMU_CAPS_HOST_CPU_REPORTED);
-
-            if (cpuDef) {
-                int svm = virCPUCheckFeature(def->os.arch, cpuDef, "svm");
-                if (svm < 0)
-                    goto cleanup;
-                hasHwVirt = svm > 0;
-            }
-        }
     } else {
         /*
          * Need to force a 32-bit guest CPU type if
@@ -6856,9 +6835,6 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
     if (cpu) {
         virCommandAddArg(cmd, "-cpu");
         virCommandAddArgFormat(cmd, "%s%s", cpu, cpu_flags ? cpu_flags : "");
-
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NESTING) && hasHwVirt)
-            virCommandAddArg(cmd, "-enable-nesting");
     }
 
     ret = 0;