All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kashyap Chamarthy <kchamart@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	patches@linaro.org
Subject: Re: [Qemu-trivial] [PATCH] qemu-options.hx: Improve documentation of chardev multiplexing mode
Date: Tue, 16 Feb 2016 17:36:31 +0100	[thread overview]
Message-ID: <20160216163631.GD19823@tesla.redhat.com> (raw)
In-Reply-To: <1455638581-5912-1-git-send-email-peter.maydell@linaro.org>

On Tue, Feb 16, 2016 at 04:03:01PM +0000, Peter Maydell wrote:
> The current documentation of chardev mux=on is rather brief and opaque;
> expand it to hopefully be a bit more helpful.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>
> ---
> There was some discussion on #qemu yesterday evening about multiplexing,
> and "make the docs a bit less confusing" was one suggestion...
> ---

Thanks for following up with the clarifying write-up.

>  qemu-options.hx | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 2f0465e..6b46dd4 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -2162,8 +2162,26 @@ All devices must have an id, which can be any string up to 127 characters long.
>  It is used to uniquely identify this device in other command line directives.
>  
>  A character device may be used in multiplexing mode by multiple front-ends.
> +Specify @option{mux=on} to enable this mode.
> +A multiplexer is a "1:N" device, and here the "1" end is your specified chardev
> +backend, and the "N" end is the various parts of QEMU that can talk to a chardev.
> +If you create a chardev with @option{id=myid} and @option{mux=on}, QEMU will
> +create a multiplexer with your specified ID, and you can then configure multiple
> +front ends to use that chardev ID for their input/output. Up to four different
> +front ends can be connected to a single multiplexed chardev. (Without
> +multiplexing enabled, a chardev can only be used by a single front end.)
> +For instance you could use this to allow a single stdio chardev to be used by
> +two serial ports and the QEMU monitor.

Just noting for convenience here, looking at an old commit[1 that
notes the syntax for multiplexing 'stdio', which you mention above in
prose:

    [...]
    Muxing can be done this way:
    
        -chardev stdio,id=mux,mux=on
        -serial chardev:mux
        -monitor chardev:mux"
    [...]

[1] http://git.qemu.org/?p=qemu.git;a=commitdiff;h=c845f40

> +
>  The key sequence of @key{Control-a} and @key{c} will rotate the input focus
> -between attached front-ends. Specify @option{mux=on} to enable this mode.
> +of a multiplexed character device between attached front-ends.
> +
> +You can have more than one multiplexer in a system configuration; for instance
> +you could have a TCP port multiplexed between UART 0 and UART 1, and stdio
> +multiplexed between the QEMU monitor and a parallel port.
> +
> +There is currently no support for multiplexing in the other direction
> +(where a single QEMU front end takes input and output from multiple chardevs).
>  
>  Every backend supports the @option{logfile} option, which supplies the path
>  to a file to record all data transmitted via the backend. The @option{logappend}

Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>

-- 
/kashyap


WARNING: multiple messages have this Message-ID (diff)
From: Kashyap Chamarthy <kchamart@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] qemu-options.hx: Improve documentation of chardev multiplexing mode
Date: Tue, 16 Feb 2016 17:36:31 +0100	[thread overview]
Message-ID: <20160216163631.GD19823@tesla.redhat.com> (raw)
In-Reply-To: <1455638581-5912-1-git-send-email-peter.maydell@linaro.org>

On Tue, Feb 16, 2016 at 04:03:01PM +0000, Peter Maydell wrote:
> The current documentation of chardev mux=on is rather brief and opaque;
> expand it to hopefully be a bit more helpful.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>
> ---
> There was some discussion on #qemu yesterday evening about multiplexing,
> and "make the docs a bit less confusing" was one suggestion...
> ---

Thanks for following up with the clarifying write-up.

>  qemu-options.hx | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 2f0465e..6b46dd4 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -2162,8 +2162,26 @@ All devices must have an id, which can be any string up to 127 characters long.
>  It is used to uniquely identify this device in other command line directives.
>  
>  A character device may be used in multiplexing mode by multiple front-ends.
> +Specify @option{mux=on} to enable this mode.
> +A multiplexer is a "1:N" device, and here the "1" end is your specified chardev
> +backend, and the "N" end is the various parts of QEMU that can talk to a chardev.
> +If you create a chardev with @option{id=myid} and @option{mux=on}, QEMU will
> +create a multiplexer with your specified ID, and you can then configure multiple
> +front ends to use that chardev ID for their input/output. Up to four different
> +front ends can be connected to a single multiplexed chardev. (Without
> +multiplexing enabled, a chardev can only be used by a single front end.)
> +For instance you could use this to allow a single stdio chardev to be used by
> +two serial ports and the QEMU monitor.

Just noting for convenience here, looking at an old commit[1 that
notes the syntax for multiplexing 'stdio', which you mention above in
prose:

    [...]
    Muxing can be done this way:
    
        -chardev stdio,id=mux,mux=on
        -serial chardev:mux
        -monitor chardev:mux"
    [...]

[1] http://git.qemu.org/?p=qemu.git;a=commitdiff;h=c845f40

> +
>  The key sequence of @key{Control-a} and @key{c} will rotate the input focus
> -between attached front-ends. Specify @option{mux=on} to enable this mode.
> +of a multiplexed character device between attached front-ends.
> +
> +You can have more than one multiplexer in a system configuration; for instance
> +you could have a TCP port multiplexed between UART 0 and UART 1, and stdio
> +multiplexed between the QEMU monitor and a parallel port.
> +
> +There is currently no support for multiplexing in the other direction
> +(where a single QEMU front end takes input and output from multiple chardevs).
>  
>  Every backend supports the @option{logfile} option, which supplies the path
>  to a file to record all data transmitted via the backend. The @option{logappend}

Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>

-- 
/kashyap

  parent reply	other threads:[~2016-02-16 16:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 16:03 [Qemu-trivial] [PATCH] qemu-options.hx: Improve documentation of chardev multiplexing mode Peter Maydell
2016-02-16 16:03 ` [Qemu-devel] " Peter Maydell
2016-02-16 16:20 ` [Qemu-trivial] " Paolo Bonzini
2016-02-16 16:20   ` [Qemu-devel] " Paolo Bonzini
2016-02-16 16:27 ` [Qemu-trivial] " Eric Blake
2016-02-16 16:27   ` Eric Blake
2016-02-16 16:32 ` [Qemu-trivial] " Laszlo Ersek
2016-02-16 16:32   ` Laszlo Ersek
2016-02-16 17:02   ` [Qemu-trivial] " Paolo Bonzini
2016-02-16 17:02     ` Paolo Bonzini
2016-02-16 17:57     ` [Qemu-trivial] " Laszlo Ersek
2016-02-16 17:57       ` Laszlo Ersek
2016-02-16 18:07       ` [Qemu-trivial] " Peter Maydell
2016-02-16 18:07         ` Peter Maydell
2016-02-16 16:36 ` Kashyap Chamarthy [this message]
2016-02-16 16:36   ` Kashyap Chamarthy

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=20160216163631.GD19823@tesla.redhat.com \
    --to=kchamart@redhat.com \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.