Unused since commit <a7424fa>.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
v2: also delete the hasHwVirt variable as well as the whole 'svm'
checking
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 24 ------------------------
2 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index abd6eff14a..b9628b8266 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -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 */
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 50b0ffcf94..22c560c67c 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6652,7 +6652,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;
@@ -6662,26 +6661,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
@@ -6870,9 +6849,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;
--
2.16.1
Show replies by date
On 05/07/2018 04:38 AM, Ján Tomko wrote:
Unused since commit <a7424fa>.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
v2: also delete the hasHwVirt variable as well as the whole 'svm'
checking
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 24 ------------------------
2 files changed, 1 insertion(+), 25 deletions(-)
Reviewed-by: John Ferlan <jferlan(a)redhat.com>
John