qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] char: fix avail_connections init in qemu_chr_open_eventfd()
@ 2014-06-13 11:18 Gerd Hoffmann
  2014-06-13 11:18 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
  2014-06-13 14:14 ` [Qemu-devel] [PULL 0/1] " Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2014-06-13 11:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

Chardev patch queue, with a single bugfix.

please pull,
  Gerd

The following changes since commit 2a2c4830c0068d70443f3dddc4cc668f0c601b5c:

  Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20140611-1' into staging (2014-06-12 09:51:41 +0100)

are available in the git repository at:


  git://git.kraxel.org/qemu tags/pull-chardev-20140613-1

for you to fetch changes up to e9d21c436f716603b3844513ba890ac570e642e1:

  char: fix avail_connections init in qemu_chr_open_eventfd() (2014-06-13 12:34:55 +0200)

----------------------------------------------------------------
char: fix avail_connections init in qemu_chr_open_eventfd()

----------------------------------------------------------------
David Marchand (1):
      char: fix avail_connections init in qemu_chr_open_eventfd()

 qemu-char.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 1/1] char: fix avail_connections init in qemu_chr_open_eventfd()
  2014-06-13 11:18 [Qemu-devel] [PULL 0/1] char: fix avail_connections init in qemu_chr_open_eventfd() Gerd Hoffmann
@ 2014-06-13 11:18 ` Gerd Hoffmann
  2014-06-13 14:14 ` [Qemu-devel] [PULL 0/1] " Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2014-06-13 11:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: David Marchand, Anthony Liguori, Gerd Hoffmann

From: David Marchand <david.marchand@6wind.com>

When trying to use a ivshmem server with qemu, ivshmem init code tries to
create a CharDriverState object for each eventfd retrieved from the server.
To create this object, a call to qemu_chr_open_eventfd() is done.
Right after this, before adding a frontend, qemu_chr_fe_claim_no_fail() is
called.
qemu_chr_open_eventfd() does not set avail_connections to 1, so no frontend can
be associated because qemu_chr_fe_claim_no_fail() makes qemu stop right away.

This problem comes from 456d60692310e7ac25cf822cc1e98192ad636ece
"qemu-char: Call fe_claim / fe_release when not using qdev chr properties".

Fix this, by setting avail_connections to 1 in qemu_chr_open_eventfd().

Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qemu-char.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/qemu-char.c b/qemu-char.c
index 4c04bbc..f918f90 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2493,7 +2493,13 @@ static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
 #ifndef _WIN32
 CharDriverState *qemu_chr_open_eventfd(int eventfd)
 {
-    return qemu_chr_open_fd(eventfd, eventfd);
+    CharDriverState *chr = qemu_chr_open_fd(eventfd, eventfd);
+
+    if (chr) {
+        chr->avail_connections = 1;
+    }
+
+    return chr;
 }
 #endif
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/1] char: fix avail_connections init in qemu_chr_open_eventfd()
  2014-06-13 11:18 [Qemu-devel] [PULL 0/1] char: fix avail_connections init in qemu_chr_open_eventfd() Gerd Hoffmann
  2014-06-13 11:18 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
@ 2014-06-13 14:14 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2014-06-13 14:14 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 13 June 2014 12:18, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> Chardev patch queue, with a single bugfix.
>
> please pull,
>   Gerd
>
> The following changes since commit 2a2c4830c0068d70443f3dddc4cc668f0c601b5c:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20140611-1' into staging (2014-06-12 09:51:41 +0100)
>
> are available in the git repository at:
>
>
>   git://git.kraxel.org/qemu tags/pull-chardev-20140613-1
>
> for you to fetch changes up to e9d21c436f716603b3844513ba890ac570e642e1:
>
>   char: fix avail_connections init in qemu_chr_open_eventfd() (2014-06-13 12:34:55 +0200)
>
> ----------------------------------------------------------------
> char: fix avail_connections init in qemu_chr_open_eventfd()
>

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-13 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 11:18 [Qemu-devel] [PULL 0/1] char: fix avail_connections init in qemu_chr_open_eventfd() Gerd Hoffmann
2014-06-13 11:18 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
2014-06-13 14:14 ` [Qemu-devel] [PULL 0/1] " Peter Maydell

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).