From: "Marc-André Lureau" <mlureau@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-devel@nongnu.org, berrange@redhat.com,
imbrenda@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 0/9] Fix mux regression (commit 949055a2)
Date: Thu, 13 Oct 2016 07:50:10 -0400 (EDT) [thread overview]
Message-ID: <73175669.690710.1476359410901.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <7b7a92e4-ea4a-0a64-5b35-4d2ede2849e1@redhat.com>
Hi
----- Original Message -----
>
>
> On 13/10/2016 13:14, Marc-André Lureau wrote:
> > Hi,
> >
> > Commit 949055a2 "char: use a fixed idx for child muxed chr" introduced
> > a regression in mux usage, since it wrongly interpreted mux as muxing
> > various chr backend. Instead, it muxes frontends.
> >
> > The first patch reverts the broken change, the following patches add
> > tracking to frontend handler, finally the last patch adds some tests
> > that would have helped to track the crash and the regression. There is
> > also a small fix for ringbuf.
>
> In general I like the solution, but I dislike the API.
>
> Would it work if we had something like
>
> struct CharBackend {
> CharDriverState *chr;
> int tag;
> }
>
You mean front-end right?
> and we modified all qemu_chr_fe_* functions (plus
> qemu_chr_add_handlers[1]) to take a struct CharBackend. chardev
> properties would also take a struct CharBackend. Then removing handlers
> can still be done in release_chr, making the patches much smaller.
As long as they use chardev property, it's not always the case.
> The conversion is a bit tedious, but I think it's much easier compared
Yes, it's tedious :) Do you mind if I try to make the change on top? If it really reduces the patch 4/7, we could try to squash it?
> to patch 4. I feel bad for having you redo everything and in particular
> patch 7, but this is the model that the block layer uses and it works
> very well there.
Which function btw?
>
> [1] while at it, it's probably best to rename qemu_chr_add_handlers
> to qemu_chr_fe_add_handlers as the first patch in the series,
> so that qemu_chr_add_handlers(CharDriverState *chr, ..., int tag)
> can take the role of qemu_chr_set_handlers in this series.
next prev parent reply other threads:[~2016-10-13 11:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 11:14 [Qemu-devel] [PATCH 0/9] Fix mux regression (commit 949055a2) Marc-André Lureau
2016-10-13 11:14 ` [Qemu-devel] [PATCH 1/9] Revert "char: use a fixed idx for child muxed chr" Marc-André Lureau
2016-10-13 11:14 ` [Qemu-devel] [PATCH 2/9] char: return a tag when adding the fe handlers Marc-André Lureau
2016-10-13 11:14 ` [Qemu-devel] [PATCH 3/9] char: add qemu_chr_remove_handlers() Marc-André Lureau
2016-10-13 11:14 ` [Qemu-devel] [PATCH 4/9] char: keep track of qemu_chr_add_handlers() Marc-André Lureau
2016-10-13 11:14 ` [Qemu-devel] [PATCH 5/9] char: warn on unused qemu_chr_add_handlers() result Marc-André Lureau
2016-10-13 11:14 ` [Qemu-devel] [PATCH 6/9] qdev: remove call to qemu_chr_add_handlers() Marc-André Lureau
2016-10-13 11:14 ` [Qemu-devel] [PATCH 7/9] char: handle qemu_chr_add_handlers() error Marc-André Lureau
2016-10-13 11:14 ` [Qemu-devel] [PATCH 8/9] ringbuf: fix chr_write return value Marc-André Lureau
2016-10-13 11:14 ` [Qemu-devel] [PATCH 9/9] tests: start chardev unit tests Marc-André Lureau
2016-10-13 11:36 ` [Qemu-devel] [PATCH 0/9] Fix mux regression (commit 949055a2) Paolo Bonzini
2016-10-13 11:50 ` Marc-André Lureau [this message]
2016-10-13 11:58 ` Paolo Bonzini
2016-10-13 13:27 ` 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=73175669.690710.1476359410901.JavaMail.zimbra@redhat.com \
--to=mlureau@redhat.com \
--cc=berrange@redhat.com \
--cc=imbrenda@linux.vnet.ibm.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@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 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.