qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Roman Penyaev <r.peniaev@gmail.com>
Cc: "Roman Penyaev" <r.peniaev@gmail.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-devel@nongnu.org
Subject: [PATCH v2 1/5] chardev/char: introduce `mux-be-id=ID` option and _MUX_BE type
Date: Wed,  9 Oct 2024 19:45:13 +0200	[thread overview]
Message-ID: <20241009174517.286935-2-r.peniaev@gmail.com> (raw)
In-Reply-To: <20241009174517.286935-1-r.peniaev@gmail.com>

Patch introduces `mux-be-id=ID` option for all chardev devices
and TYPE_CHARDEV_MUX_BE type for distinction different types
of multiplexers: frontend (current "mux" type) and backend
(new "mux-be" type). Actual attach of the chardev to the
multiplexer and mux-be implementation will follow.

Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org
---
 chardev/char.c         | 3 +++
 include/chardev/char.h | 1 +
 qapi/char.json         | 9 ++++++++-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/chardev/char.c b/chardev/char.c
index ba847b6e9eff..4b3e45b2a128 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -918,6 +918,9 @@ QemuOptsList qemu_chardev_opts = {
         },{
             .name = "mux",
             .type = QEMU_OPT_BOOL,
+        },{
+            .name = "mux-be-id",
+            .type = QEMU_OPT_STRING,
         },{
             .name = "signal",
             .type = QEMU_OPT_BOOL,
diff --git a/include/chardev/char.h b/include/chardev/char.h
index 01df55f9e8c8..f68f949f6ebc 100644
--- a/include/chardev/char.h
+++ b/include/chardev/char.h
@@ -232,6 +232,7 @@ OBJECT_DECLARE_TYPE(Chardev, ChardevClass, CHARDEV)
 
 #define TYPE_CHARDEV_NULL "chardev-null"
 #define TYPE_CHARDEV_MUX "chardev-mux"
+#define TYPE_CHARDEV_MUX_BE "chardev-mux-be"
 #define TYPE_CHARDEV_RINGBUF "chardev-ringbuf"
 #define TYPE_CHARDEV_PTY "chardev-pty"
 #define TYPE_CHARDEV_CONSOLE "chardev-console"
diff --git a/qapi/char.json b/qapi/char.json
index ef58445ceec9..30748784513b 100644
--- a/qapi/char.json
+++ b/qapi/char.json
@@ -199,11 +199,15 @@
 # @logappend: true to append instead of truncate (default to false to
 #     truncate)
 #
+# @mux-be-id: id of the mux-be device for backend multiplexing
+#     (since: 9.2)
+#
 # Since: 2.6
 ##
 { 'struct': 'ChardevCommon',
   'data': { '*logfile': 'str',
-            '*logappend': 'bool' } }
+            '*logappend': 'bool',
+            '*mux-be-id': 'str' } }
 
 ##
 # @ChardevFile:
@@ -440,6 +444,8 @@
 #
 # @mux: Since 1.5
 #
+# @mux-be: Since 9.2
+#
 # @msmouse: Since 1.5
 #
 # @wctablet: Since 2.9
@@ -482,6 +488,7 @@
             'pty',
             'null',
             'mux',
+            'mux-be',
             'msmouse',
             'wctablet',
             { 'name': 'braille', 'if': 'CONFIG_BRLAPI' },
-- 
2.43.0



  reply	other threads:[~2024-10-09 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 17:45 [PATCH v2 0/5] chardev: implement backend chardev multiplexing Roman Penyaev
2024-10-09 17:45 ` Roman Penyaev [this message]
2024-10-09 17:45 ` [PATCH v2 2/5] chardev/char: rename `mux_cnt` to `fe_cnt` for the `MuxChardev` Roman Penyaev
2024-10-09 17:45 ` [PATCH v2 3/5] chardev/char-mux: implement backend chardev multiplexing Roman Penyaev
2024-10-09 17:45 ` [PATCH v2 4/5] tests/unit/test-char: add unit test for the `mux-be` multiplexer Roman Penyaev
2024-10-09 17:45 ` [PATCH v2 5/5] qemu-options.hx: describe multiplexing of several backend devices Roman Penyaev
2024-10-09 18:23 ` [PATCH v2 0/5] chardev: implement backend chardev multiplexing Marc-André Lureau
2024-10-10  8:34   ` Roman Penyaev

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=20241009174517.286935-2-r.peniaev@gmail.com \
    --to=r.peniaev@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --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).