提交 6c6795b4 编写于 作者: J Ján Tomko

Deprecate QEMU_CAPS_NESTING

Unused since commit <a7424faf>.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 fc66d240
......@@ -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 */
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册