All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Octavian Purdila <tavip@google.com>,
	 qemu-devel@nongnu.org, marcandre.lureau@redhat.com,
	 eblake@redhat.com,  berrange@redhat.com,
	Paulo Neves <ptsneves@gmail.com>
Subject: Re: [PATCH v3] chardev: add path option for pty backend
Date: Thu, 18 Jul 2024 11:47:32 +0200	[thread overview]
Message-ID: <87msmfkp57.fsf@pond.sub.org> (raw)
In-Reply-To: <CAFEAcA8nFz_4M3s4NoWpfhJZ=pxRc92shSKfoL6iN=_Oqmc-tw@mail.gmail.com> (Peter Maydell's message of "Thu, 18 Jul 2024 10:22:01 +0100")

Peter Maydell <peter.maydell@linaro.org> writes:

> On Thu, 18 Jul 2024 at 07:15, Markus Armbruster <armbru@redhat.com> wrote:
>>
>> Looks like this one fell through the cracks.
>>
>> Octavian Purdila <tavip@google.com> writes:
>>
>> > Add path option to the pty char backend which will create a symbolic
>> > link to the given path that points to the allocated PTY.
>> >
>> > This avoids having to make QMP or HMP monitor queries to find out what
>> > the new PTY device path is.
>>
>> QMP commands chardev-add and chardev-change return the information you
>> want:
>>
>>     # @pty: name of the slave pseudoterminal device, present if and only
>>     #     if a chardev of type 'pty' was created
>>
>> So does HMP command chardev-add.  HMP chardev apparently doesn't, but
>> that could be fixed.
>>
>> So, the use case is basically the command line, right?
>
>> The feature feels rather doubtful to me, to be honest.
>
> The command line is an important use-case, though. Not every
> user of QEMU is libvirt with a QMP/HMP connection readily
> to hand that they would prefer to use for all configuration...

In general yes.  But what are the use cases for this one?

To me, specifying path=/mumble/symlink plus the bother of cleaning up
stale ones doesn't feel like much of an improvement over reading the pty
name from "info chardev".  I guess I'm missing something.  Tell me!

If we decide we want this, then the QMP interface needs to be fixed:
Call the argument @path for consistency, and document it properly.
Actually straightforward, just create a new struct instead of pressing
ChardevHostdev into service.

Some advice on robust use of @path could be useful, in particular on
guarding against QEMU leaving stale links behind.

Additional decision: whether to extend the old-style syntax.



  reply	other threads:[~2024-07-18  9:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 18:50 [PATCH v3] chardev: add path option for pty backend Octavian Purdila
2024-07-18  6:15 ` Markus Armbruster
2024-07-18  9:22   ` Peter Maydell
2024-07-18  9:47     ` Markus Armbruster [this message]
2024-07-18 10:04       ` Paulo Neves
2024-07-22  8:46       ` Marc-André Lureau
2024-07-18  9:34   ` Daniel P. Berrangé
2024-07-18 10:21     ` Markus Armbruster
2024-07-18 17:30       ` Octavian Purdila

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=87msmfkp57.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=ptsneves@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tavip@google.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.