From nobody Fri May 3 10:20:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525682338141331.8654086347758; Mon, 7 May 2018 01:38:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9187930001DC; Mon, 7 May 2018 08:38:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3749D9ACC6; Mon, 7 May 2018 08:38:56 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A15D14CAA7; Mon, 7 May 2018 08:38:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w478css5009944 for ; Mon, 7 May 2018 04:38:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0D11F215CDAA; Mon, 7 May 2018 08:38:54 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5146215CDA7 for ; Mon, 7 May 2018 08:38:53 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 7 May 2018 10:38:52 +0200 Message-Id: <899856b19b8aba09e11ddfc19fdcdfef1c2bcbc2.1525682262.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2] Deprecate QEMU_CAPS_NESTING X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 07 May 2018 08:38:57 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Unused since commit . Signed-off-by: J=C3=A1n Tomko Reviewed-by: John Ferlan --- 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 */ =20 /* 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=3D available */ X_QEMU_CAPS_DRIVE_READONLY, /* -drive readonly=3Don|off */ X_QEMU_CAPS_SMBIOS_TYPE, /* Is -smbios type=3D 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 =3D virArchFromHost(); char *cpu =3D NULL, *cpu_flags =3D NULL; - bool hasHwVirt =3D false; int ret =3D -1; virBuffer cpu_buf =3D VIR_BUFFER_INITIALIZER; virBuffer buf =3D VIR_BUFFER_INITIALIZER; @@ -6662,26 +6661,6 @@ qemuBuildCpuCommandLine(virCommandPtr cmd, (def->cpu->mode !=3D 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 =3D=3D VIR_DOMAIN_VIRT_KVM) { - virCPUDefPtr cpuDef =3D NULL; - - if (def->cpu->mode =3D=3D VIR_CPU_MODE_CUSTOM) - cpuDef =3D def->cpu; - else if (def->cpu->mode =3D=3D VIR_CPU_MODE_HOST_PASSTHROUGH) - cpuDef =3D virQEMUCapsGetHostModel(qemuCaps, def->virtType, - VIR_QEMU_CAPS_HOST_CPU_RE= PORTED); - - if (cpuDef) { - int svm =3D virCPUCheckFeature(def->os.arch, cpuDef, "svm"= ); - if (svm < 0) - goto cleanup; - hasHwVirt =3D 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"); } =20 ret =3D 0; --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list