From nobody Sun Nov 2 11:46:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527743960958292.7579454536283; Wed, 30 May 2018 22:19:20 -0700 (PDT) Received: from localhost ([::1]:42058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOFzc-0001MP-2n for importer@patchew.org; Thu, 31 May 2018 01:19:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOFxV-0000C3-I4 for qemu-devel@nongnu.org; Thu, 31 May 2018 01:17:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOFxU-0006IY-Dy for qemu-devel@nongnu.org; Thu, 31 May 2018 01:17:09 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58006 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fOFxU-0006I7-8o for qemu-devel@nongnu.org; Thu, 31 May 2018 01:17:08 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D301D859B3; Thu, 31 May 2018 05:17:07 +0000 (UTC) Received: from xz-mi.redhat.com (ovpn-12-18.pek2.redhat.com [10.72.12.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF84C208C6C2; Thu, 31 May 2018 05:17:02 +0000 (UTC) From: Peter Xu To: qemu-devel@nongnu.org Date: Thu, 31 May 2018 13:16:40 +0800 Message-Id: <20180531051641.8473-4-peterx@redhat.com> In-Reply-To: <20180531051641.8473-1-peterx@redhat.com> References: <20180531051641.8473-1-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 31 May 2018 05:17:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 31 May 2018 05:17:07 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'peterx@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [RFC v2 3/4] monitor: remove "x-oob", turn oob on by default X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Fam Zheng , Eric Auger , John Snow , peterx@redhat.com, Max Reitz , Christian Borntraeger , "Dr . David Alan Gilbert" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" There was a regression reported by Eric Auger before with OOB: http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html The fix is 951702f39c ("monitor: bind dispatch bh to iohandler context", 2018-04-10), which is in master already. For the bug, we turned Out-Of-Band feature of monitors off for 2.12 release. Now we turn that on again after the 2.12 release. This patch partly reverts be933ffc23 (monitor: new parameter "x-oob"), meanwhile turn it on again by default for non-MUX QMPs. Signed-off-by: Peter Xu --- include/monitor/monitor.h | 1 - monitor.c | 17 +---------------- tests/qmp-test.c | 2 +- vl.c | 5 ----- 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index d6ab70cae2..0cb0538a31 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -13,7 +13,6 @@ extern Monitor *cur_mon; #define MONITOR_USE_READLINE 0x02 #define MONITOR_USE_CONTROL 0x04 #define MONITOR_USE_PRETTY 0x08 -#define MONITOR_USE_OOB 0x10 =20 bool monitor_cur_is_qmp(void); =20 diff --git a/monitor.c b/monitor.c index 46814af533..f6f74239ad 100644 --- a/monitor.c +++ b/monitor.c @@ -4558,19 +4558,7 @@ void monitor_init(Chardev *chr, int flags) { Monitor *mon =3D g_malloc(sizeof(*mon)); bool use_readline =3D flags & MONITOR_USE_READLINE; - bool use_oob =3D flags & MONITOR_USE_OOB; - - if (use_oob) { - if (CHARDEV_IS_MUX(chr)) { - error_report("Monitor Out-Of-Band is not supported with " - "MUX typed chardev backend"); - exit(1); - } - if (use_readline) { - error_report("Monitor Out-Of-band is only supported by QMP"); - exit(1); - } - } + bool use_oob =3D (flags & MONITOR_USE_CONTROL) && !CHARDEV_IS_MUX(chr); =20 monitor_data_init(mon, false, use_oob); =20 @@ -4672,9 +4660,6 @@ QemuOptsList qemu_mon_opts =3D { },{ .name =3D "pretty", .type =3D QEMU_OPT_BOOL, - },{ - .name =3D "x-oob", - .type =3D QEMU_OPT_BOOL, }, { /* end of list */ } }, diff --git a/tests/qmp-test.c b/tests/qmp-test.c index 88f867f8c0..c85a3964d9 100644 --- a/tests/qmp-test.c +++ b/tests/qmp-test.c @@ -89,7 +89,7 @@ static void test_qmp_protocol(void) g_assert(q); test_version(qdict_get(q, "version")); capabilities =3D qdict_get_qlist(q, "capabilities"); - g_assert(capabilities && qlist_empty(capabilities)); + g_assert(capabilities); qobject_unref(resp); =20 /* Test valid command before handshake */ diff --git a/vl.c b/vl.c index 038d7f8042..35e94a7032 100644 --- a/vl.c +++ b/vl.c @@ -2402,11 +2402,6 @@ static int mon_init_func(void *opaque, QemuOpts *opt= s, Error **errp) if (qemu_opt_get_bool(opts, "pretty", 0)) flags |=3D MONITOR_USE_PRETTY; =20 - /* OOB is off by default */ - if (qemu_opt_get_bool(opts, "x-oob", 0)) { - flags |=3D MONITOR_USE_OOB; - } - chardev =3D qemu_opt_get(opts, "chardev"); chr =3D qemu_chr_find(chardev); if (chr =3D=3D NULL) { --=20 2.17.0