qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P . Berrange" <berrange@redhat.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Fam Zheng" <famz@redhat.com>, "Kevin Wolf" <kwolf@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	peterx@redhat.com, "Eric Auger" <eric.auger@redhat.com>,
	"Eric Blake" <eblake@redhat.com>, "John Snow" <jsnow@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Markus Armbruster" <armbru@redhat.com>
Subject: [Qemu-devel] [RFC] monitor: turn on Out-Of-Band by default again
Date: Mon, 21 May 2018 16:42:49 +0800	[thread overview]
Message-ID: <20180521084249.10640-1-peterx@redhat.com> (raw)

We turned Out-Of-Band feature of monitors off for 2.12 release.  Now we
try to turn that on again.

Signed-off-by: Peter Xu <peterx@redhat.com>
--
Now OOB should be okay with all known tests (except iotest qcow2, since
it is still broken on master), and AFAIK now we should also be okay with
ARM+Libvirt (not testsed, but Eric Auger helped to verify that before
the release).  So I think it's now safe to turn OOB on again.  Please
feel free to test this against any of existing testsuites to see whether
it'll still break any stuff.  Thanks,

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 monitor.c        | 13 +++----------
 tests/qmp-test.c |  2 +-
 vl.c             |  9 ++++-----
 3 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/monitor.c b/monitor.c
index 46814af533..ce5cc5e34e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4560,16 +4560,9 @@ void monitor_init(Chardev *chr, int flags)
     bool use_readline = flags & MONITOR_USE_READLINE;
     bool use_oob = 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);
-        }
+    if (CHARDEV_IS_MUX(chr)) {
+        /* MUX is still not supported for Out-Of-Band */
+        use_oob = false;
     }
 
     monitor_data_init(mon, false, use_oob);
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 = qdict_get_qlist(q, "capabilities");
-    g_assert(capabilities && qlist_empty(capabilities));
+    g_assert(capabilities);
     qobject_unref(resp);
 
     /* Test valid command before handshake */
diff --git a/vl.c b/vl.c
index 3b39bbd7a8..b71fb8eb25 100644
--- a/vl.c
+++ b/vl.c
@@ -2394,6 +2394,10 @@ static int mon_init_func(void *opaque, QemuOpts *opts, Error **errp)
         flags = MONITOR_USE_READLINE;
     } else if (strcmp(mode, "control") == 0) {
         flags = MONITOR_USE_CONTROL;
+        /* Out-Of-Band is on by default */
+        if (qemu_opt_get_bool(opts, "x-oob", 1)) {
+            flags |= MONITOR_USE_OOB;
+        }
     } else {
         error_report("unknown monitor mode \"%s\"", mode);
         exit(1);
@@ -2402,11 +2406,6 @@ static int mon_init_func(void *opaque, QemuOpts *opts, Error **errp)
     if (qemu_opt_get_bool(opts, "pretty", 0))
         flags |= MONITOR_USE_PRETTY;
 
-    /* OOB is off by default */
-    if (qemu_opt_get_bool(opts, "x-oob", 0)) {
-        flags |= MONITOR_USE_OOB;
-    }
-
     chardev = qemu_opt_get(opts, "chardev");
     chr = qemu_chr_find(chardev);
     if (chr == NULL) {
-- 
2.17.0

             reply	other threads:[~2018-05-21  8:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21  8:42 Peter Xu [this message]
2018-05-21  8:59 ` [Qemu-devel] [RFC] monitor: turn on Out-Of-Band by default again Daniel P. Berrangé
2018-05-21 10:41   ` Peter Xu
2018-05-21 14:13 ` Eric Blake
2018-05-22  3:39   ` Peter Xu
2018-05-24  7:08     ` Markus Armbruster
2018-05-24  7:34       ` Peter Xu
2018-05-29 19:00         ` Dr. David Alan Gilbert
2018-06-01 12:39       ` Stefan Hajnoczi
2018-05-22 18:40   ` John Snow
2018-05-30  8:04     ` Peter Xu
2018-05-30 12:10       ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180521084249.10640-1-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=eblake@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=famz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).