From nobody Thu May 2 04:48:03 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1505982518021105.41922376677917; Thu, 21 Sep 2017 01:28:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7DAF17E42F; Thu, 21 Sep 2017 08:28:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F38565C882; Thu, 21 Sep 2017 08:28:35 +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 DC9F01855946; Thu, 21 Sep 2017 08:28:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v8L88ss1027817 for ; Thu, 21 Sep 2017 04:08:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id B08575C8B2; Thu, 21 Sep 2017 08:08:54 +0000 (UTC) Received: from andariel.redhat.com (ovpn-204-169.brq.redhat.com [10.40.204.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F0A2171A5; Thu, 21 Sep 2017 08:08:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7DAF17E42F Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 21 Sep 2017 10:08:47 +0200 Message-Id: <40ad41f16b0fd86ea3cee959b71cef99d6f103eb.1505981227.git.pkrempa@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH] qemu: capabilities: Remove support for downstream-only QMP monitor backport 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 21 Sep 2017 08:28:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Some distros (see diff) chose to backport QMP support rather than rebase to newer version of qemu. As a hack they added the string 'libvirt' to the qemu -help output. Remove this as downstream-only hacks should be carried by downstream and not litter upstream. This effectively reverts commit ff88cd590572277f10ecee4ebb1174d9b70fc0d7 Reviewed-by: Pavel Hrdina --- src/qemu/qemu_capabilities.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7bfb71420..085910dd4 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1335,8 +1335,7 @@ virQEMUCapsComputeCmdFlags(const char *help, if ((netdev =3D strstr(help, "-netdev"))) { /* Disable -netdev on 0.12 since although it exists, * the corresponding netdev_add/remove monitor commands - * do not, and we need them to be able to do hotplug. - * But see below about RHEL build. */ + * do not, and we need them to be able to do hotplug. */ if (version >=3D 13000) { if (strstr(netdev, "bridge")) virQEMUCapsSet(qemuCaps, QEMU_CAPS_NETDEV_BRIDGE); @@ -1369,20 +1368,10 @@ virQEMUCapsComputeCmdFlags(const char *help, /* While JSON mode was available in 0.12.0, it was too * incomplete to contemplate using. The 0.13.0 release * is good enough to use, even though it lacks one or - * two features. This is also true of versions of qemu - * built for RHEL, labeled 0.12.1, but with extra text - * in the help output that mentions that features were - * backported for libvirt. The benefits of JSON mode now - * outweigh the downside. - */ + * two features. */ #if WITH_YAJL - if (version >=3D 13000) { - virQEMUCapsSet(qemuCaps, QEMU_CAPS_MONITOR_JSON); - } else if (version >=3D 12000 && - strstr(help, "libvirt")) { + if (version >=3D 13000) virQEMUCapsSet(qemuCaps, QEMU_CAPS_MONITOR_JSON); - virQEMUCapsSet(qemuCaps, QEMU_CAPS_NETDEV); - } #else /* Starting with qemu 0.15 and newer, upstream qemu no longer * promises to keep the human interface stable, but requests that @@ -1392,8 +1381,7 @@ virQEMUCapsComputeCmdFlags(const char *help, * telling them to recompile (the spec file includes the * dependency, so distros won't hit this). This check is * also in m4/virt-yajl.m4 (see $with_yajl). */ - if (version >=3D 15000 || - (version >=3D 12000 && strstr(help, "libvirt"))) { + if (version >=3D 15000) { if (check_yajl) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("this qemu binary requires libvirt to be " --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list