char: fix avail_connections init in qemu_chr_open_eventfd()
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(-)
From: David Marchand <[email protected]>
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().
--- qemu-char.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
qemu-char.c +7 -1
@@ -2493,7 +2493,13 @@ static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)#ifndef _WIN32CharDriverState *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
Signature · 1 line
1.8.3.1
Peter Maydell
AppliedQuoted 14 lines · Gerd Hoffmann
Hi,
Chardev patch queue, with a single bugfix.
please pull,
GerdThe 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:
Quoted 9 lines
git://git.kraxel.org/qemutags/pull-chardev-20140613-1for you to fetch changes up to
e9d21c436f716603b3844513ba890ac570e642e1:char: fix
avail_connectionsinit inqemu_chr_open_eventfd()(2014-06-13 12:34:55 +0200)----------------------------------------------------------------
char: fixavail_connectionsinit inqemu_chr_open_eventfd()
Applied, thanks.
-- PMM