mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
Deprecate QEMU_CAPS_NESTING
Unused since commit <a7424fa>. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
fc66d24066
commit
6c6795b4d7
@ -105,7 +105,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
|||||||
|
|
||||||
/* 40 */
|
/* 40 */
|
||||||
X_QEMU_CAPS_FSDEV, /* -fstype filesystem passthrough */
|
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_NAME_PROCESS, /* Is -name process= available */
|
||||||
X_QEMU_CAPS_DRIVE_READONLY, /* -drive readonly=on|off */
|
X_QEMU_CAPS_DRIVE_READONLY, /* -drive readonly=on|off */
|
||||||
X_QEMU_CAPS_SMBIOS_TYPE, /* Is -smbios type= available */
|
X_QEMU_CAPS_SMBIOS_TYPE, /* Is -smbios type= available */
|
||||||
|
@ -6638,7 +6638,6 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
|
|||||||
{
|
{
|
||||||
virArch hostarch = virArchFromHost();
|
virArch hostarch = virArchFromHost();
|
||||||
char *cpu = NULL, *cpu_flags = NULL;
|
char *cpu = NULL, *cpu_flags = NULL;
|
||||||
bool hasHwVirt = false;
|
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
virBuffer cpu_buf = VIR_BUFFER_INITIALIZER;
|
virBuffer cpu_buf = VIR_BUFFER_INITIALIZER;
|
||||||
virBuffer 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)) {
|
(def->cpu->mode != VIR_CPU_MODE_CUSTOM || def->cpu->model)) {
|
||||||
if (qemuBuildCpuModelArgStr(driver, def, &cpu_buf, qemuCaps) < 0)
|
if (qemuBuildCpuModelArgStr(driver, def, &cpu_buf, qemuCaps) < 0)
|
||||||
goto cleanup;
|
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 {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Need to force a 32-bit guest CPU type if
|
* Need to force a 32-bit guest CPU type if
|
||||||
@ -6856,9 +6835,6 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
|
|||||||
if (cpu) {
|
if (cpu) {
|
||||||
virCommandAddArg(cmd, "-cpu");
|
virCommandAddArg(cmd, "-cpu");
|
||||||
virCommandAddArgFormat(cmd, "%s%s", cpu, cpu_flags ? cpu_flags : "");
|
virCommandAddArgFormat(cmd, "%s%s", cpu, cpu_flags ? cpu_flags : "");
|
||||||
|
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NESTING) && hasHwVirt)
|
|
||||||
virCommandAddArg(cmd, "-enable-nesting");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user