qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Cc: QEMU <qemu-devel@nongnu.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Li Zhang" <li.zhang@cloud.ionos.com>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"Pankaj Gupta" <pankaj.gupta@ionos.com>,
	"Li Zhang" <zhlcindy@gmail.com>
Subject: Re: [PATCHv2 1/1] Support monitor chardev hotswap with QMP
Date: Tue, 4 May 2021 09:38:25 +0100	[thread overview]
Message-ID: <YJEIAfs4tNRN52K4@redhat.com> (raw)
In-Reply-To: <CAM9Jb+g0jUy5uEYmpu0nTYogRoDN1VZayLD_0xQ2ZZqB5tr21Q@mail.gmail.com>

On Tue, May 04, 2021 at 08:29:50AM +0200, Pankaj Gupta wrote:
> +CC Danpb
> 
> > >>> Marc-André, I'd like your opinion for this one, in particular the use of
> > >>> g_source_remove().
> > >>>
> > >>
> > >> My opinion isn't really worth much, my review would have a bit more value.
> > >>
> > >> GSource has indeed some peculiar lifetime management, that I got wrong in
> > >> the past. So I would be extra careful.
> > >>
> > >> But before spending time on review, I would also clarify the motivation
> > >> and ask for testing.
> > >>
> > >> Markus, hot-adding/removing monitors isn't supported?
> > >>
> > >>
> > > I realize you answered my question below. That's surprising me. Wouldn't it
> > > make more sense to support it rather than having a pre-opened null-based
> > > monitor that can have its chardev swapped?
> >
> > Yes, it would.  Patches welcome.
> >
> > This patch is a somewhat ham-fisted and limited solution to the problem
> > stated in the commit message.  However, it might *also* be a reasonable
> > improvement to chardev-change on its own.  Not for me to judge.
> >
> > chardev-change comes with a number of restrictions.  Let's have a closer
> > look.  It fails
> >
> > 1. when no such character device exists (d'oh)
> >
> > 2. for chardev-mux devices
> >
> > 3. in record/replay mode
> >
> > 4. when a backend is connected that doesn't implement the chr_be_change()
> >    method
> >
> > 5. when chr_be_change() fails
> >
> > 6. when creating the new chardev fails[*]
> >
> > Items 2, 3, 4 are restrictions.  I figure 2 and 4 are simply not
> > implemented, yet.  I'm not sure about 3.
> >
> > Whether we want to accept patches lifting restrictions is up to the
> > chardev maintainers.
> 
> Maybe we can handle or already handle the restrictions at libvirt side?

From the libvirt side I'd just like to see the real problem addressed.
ie actally implement monitor hotplug/unplug, instead of this hack
where you pre-create a monitor with null backend.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2021-05-04  8:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 21:34 [PATCHv2 1/1] Support monitor chardev hotswap with QMP Li Zhang
2021-04-15 15:07 ` Li Zhang
2021-04-16 14:50 ` Markus Armbruster
2021-04-16 14:59   ` Marc-André Lureau
2021-04-16 15:28     ` Marc-André Lureau
2021-04-16 15:46       ` Li Zhang
2021-04-17  8:02       ` Markus Armbruster
2021-04-19 11:56         ` Li Zhang
2021-05-04  6:29         ` Pankaj Gupta
2021-05-04  8:38           ` Daniel P. Berrangé [this message]
2021-04-16 15:20   ` Li Zhang
2021-04-17  8:05     ` Markus Armbruster

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=YJEIAfs4tNRN52K4@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=li.zhang@cloud.ionos.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=pankaj.gupta.linux@gmail.com \
    --cc=pankaj.gupta@ionos.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhlcindy@gmail.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).