qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
	qemu-stable@nongnu.org, "Bohdan Kostiv" <bogdan.kostiv@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH 2/2] qemu-options.hx: Improve -serial option documentation
Date: Mon, 22 Jan 2024 17:55:30 +0000	[thread overview]
Message-ID: <CAFEAcA_Cg1nButGjwOtz9QQMgQS9eY37V-xoC4m=hLnr35DYCg@mail.gmail.com> (raw)
In-Reply-To: <ceb451fd-c7c6-4ddd-861f-df8e4d897dc5@linaro.org>

On Mon, 22 Jan 2024 at 17:46, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Hi,
>
> On 22/1/24 17:36, Peter Maydell wrote:
> > The -serial option documentation is a bit brief about '-serial none'
> > and '-serial null'. In particular it's not very clear about the
> > difference between them, and it doesn't mention that it's up to
> > the machine model whether '-serial none' means "don't create the
> > serial port" or "don't wire the serial port up to anything".
> >
> > Expand on these points.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> >   qemu-options.hx | 14 +++++++++++---
> >   1 file changed, 11 insertions(+), 3 deletions(-)
> >
> > diff --git a/qemu-options.hx b/qemu-options.hx
> > index ced82848637..d8c3fe91de1 100644
> > --- a/qemu-options.hx
> > +++ b/qemu-options.hx
> > @@ -4129,7 +4129,8 @@ SRST
> >       This option can be used several times to simulate up to 4 serial
> >       ports.
> >
> > -    Use ``-serial none`` to disable all serial ports.
> > +    You can use ``-serial none`` to suppress the creation of default
> > +    serial devices.
> >
> >       Available character devices are:
> >
> > @@ -4151,10 +4152,17 @@ SRST
> >           [Linux only] Pseudo TTY (a new PTY is automatically allocated)
> >
> >       ``none``
> > -        No device is allocated.
> > +        No device is allocated. Note that
>
> >          for machine types which
> > +        emulate systems where a serial device is always present in
> > +        real hardware, this may be equivalent to the ``null`` option,
> > +        in that the serial device is still present but all output
> > +        is discarded.
>
> Should we deprecate this broken case, suggesting to use ``null``
> instead?

It's machine specific. On systems with pluggable serial devices
it makes sense to use '-serial none' to get rid of them
entirely. On systems where the UARTs are hardwired into the
board, having '-serial none' literally delete the UART device
just breaks guests, which is why those boards make it behave
like '-serial null'. But users should still be able to use
'-serial none' to say "I don't really care about serial here".

(This is why in commit 12051d82f004024d5d we made the chardev
frontend functions cope with having a NULL backend, to avoid
boards having to say "oh, serial_hd(n) is NULL, I must create
a 'null' backend for it", which half of them didn't do.)

thanks
-- PMM


  reply	other threads:[~2024-01-22 17:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 16:36 [PATCH 0/2] system: Fix handling of '-serial none -serial something' Peter Maydell
2024-01-22 16:36 ` [PATCH 1/2] system/vl.c: " Peter Maydell
2024-01-22 16:42   ` Daniel P. Berrangé
2024-01-23 15:57   ` Richard Henderson
2024-01-22 16:36 ` [PATCH 2/2] qemu-options.hx: Improve -serial option documentation Peter Maydell
2024-01-22 16:41   ` Daniel P. Berrangé
2024-01-22 17:46   ` Philippe Mathieu-Daudé
2024-01-22 17:55     ` Peter Maydell [this message]
2024-02-01 13:35 ` [PATCH 0/2] system: Fix handling of '-serial none -serial something' Peter Maydell

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='CAFEAcA_Cg1nButGjwOtz9QQMgQS9eY37V-xoC4m=hLnr35DYCg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=bogdan.kostiv@gmail.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=thuth@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 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).