* [Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression @ 2014-07-25 12:38 Paolo Bonzini 2014-07-25 12:38 ` [Qemu-devel] [PULL v2 1/1] qemu-char: ignore flow control if a PTY's slave is not connected Paolo Bonzini 2014-07-25 16:26 ` [Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression Peter Maydell 0 siblings, 2 replies; 3+ messages in thread From: Paolo Bonzini @ 2014-07-25 12:38 UTC (permalink / raw) To: qemu-devel The following changes since commit f368c33d5ab09dd5656924185cd975b11838cd25: Update version for v2.1.0-rc3 release (2014-07-22 18:17:03 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to 62c339c5272ce8fbe8ca52695cee8ff40da7872e: qemu-char: ignore flow control if a PTY's slave is not connected (2014-07-25 14:36:07 +0200) ---------------------------------------------------------------- Here is the serial fix for 2.1. ---------------------------------------------------------------- Paolo Bonzini (1): qemu-char: ignore flow control if a PTY's slave is not connected qemu-char.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL v2 1/1] qemu-char: ignore flow control if a PTY's slave is not connected 2014-07-25 12:38 [Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression Paolo Bonzini @ 2014-07-25 12:38 ` Paolo Bonzini 2014-07-25 16:26 ` [Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression Peter Maydell 1 sibling, 0 replies; 3+ messages in thread From: Paolo Bonzini @ 2014-07-25 12:38 UTC (permalink / raw) To: qemu-devel After commit f702e62 (serial: change retry logic to avoid concurrency, 2014-07-11), guest boot hangs if the backend is an unconnected PTY. The reason is that PTYs do not support G_IO_HUP, and serial_xmit is never called. To fix this, simply invoke serial_xmit immediately (via g_idle_source_new) when this happens. Tested-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- qemu-char.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index 7acc03f..956be49 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1168,6 +1168,9 @@ static int pty_chr_write(CharDriverState *chr, const uint8_t *buf, int len) static GSource *pty_chr_add_watch(CharDriverState *chr, GIOCondition cond) { PtyCharDriver *s = chr->opaque; + if (!s->connected) { + return NULL; + } return g_io_create_watch(s->fd, cond); } @@ -3664,6 +3667,10 @@ int qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond, } src = s->chr_add_watch(s, cond); + if (!src) { + return -EINVAL; + } + g_source_set_callback(src, (GSourceFunc)func, user_data, NULL); tag = g_source_attach(src, NULL); g_source_unref(src); -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression 2014-07-25 12:38 [Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression Paolo Bonzini 2014-07-25 12:38 ` [Qemu-devel] [PULL v2 1/1] qemu-char: ignore flow control if a PTY's slave is not connected Paolo Bonzini @ 2014-07-25 16:26 ` Peter Maydell 1 sibling, 0 replies; 3+ messages in thread From: Peter Maydell @ 2014-07-25 16:26 UTC (permalink / raw) To: Paolo Bonzini; +Cc: QEMU Developers On 25 July 2014 13:38, Paolo Bonzini <pbonzini@redhat.com> wrote: > The following changes since commit f368c33d5ab09dd5656924185cd975b11838cd25: > > Update version for v2.1.0-rc3 release (2014-07-22 18:17:03 +0100) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git tags/for-upstream > > for you to fetch changes up to 62c339c5272ce8fbe8ca52695cee8ff40da7872e: > > qemu-char: ignore flow control if a PTY's slave is not connected (2014-07-25 14:36:07 +0200) > > ---------------------------------------------------------------- > Here is the serial fix for 2.1. > > ---------------------------------------------------------------- > Paolo Bonzini (1): > qemu-char: ignore flow control if a PTY's slave is not connected Applied this pullreq rather than the other (see comments on that one). thanks -- PMM ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-25 16:26 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-07-25 12:38 [Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression Paolo Bonzini 2014-07-25 12:38 ` [Qemu-devel] [PULL v2 1/1] qemu-char: ignore flow control if a PTY's slave is not connected Paolo Bonzini 2014-07-25 16:26 ` [Qemu-devel] [PULL v2 0/1] Fix for "-serial pty" regression 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).