From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5MsZ-0001hM-PL for qemu-devel@nongnu.org; Tue, 03 Nov 2009 12:09:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5MsV-0001aE-1R for qemu-devel@nongnu.org; Tue, 03 Nov 2009 12:09:11 -0500 Received: from [199.232.76.173] (port=39991 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5MsU-0001a1-SE for qemu-devel@nongnu.org; Tue, 03 Nov 2009 12:09:06 -0500 Received: from thoth.sbs.de ([192.35.17.2]:24005) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N5MsT-00036K-Sw for qemu-devel@nongnu.org; Tue, 03 Nov 2009 12:09:06 -0500 Message-ID: <4AF063A9.7000908@siemens.com> Date: Tue, 03 Nov 2009 18:08:57 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1257258596-4556-1-git-send-email-amit.shah@redhat.com> <1257258596-4556-2-git-send-email-amit.shah@redhat.com> <1257258596-4556-3-git-send-email-amit.shah@redhat.com> In-Reply-To: <1257258596-4556-3-git-send-email-amit.shah@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 2/3] char: Remove special init_reset handling List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu-devel@nongnu.org Amit Shah wrote: > The initial_reset sent to chardevs doesn't do much other than setting > a bool to true. Char devices are interested in the open event and > that gets sent whenever the device is opened. Have you checked with the monitor in all use cases (dedicated & muxed console, stdio & SDL console, etc.)? It was introduced once to fix a corner case, I think it's even documented... Jan > > Moreover, the reset logic breaks as and when qemu's bh scheduling > changes. > > Signed-off-by: Amit Shah > --- > qemu-char.c | 9 --------- > qemu-char.h | 1 - > vl.c | 1 - > 3 files changed, 0 insertions(+), 11 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index 1f63019..d78bae3 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -128,15 +128,6 @@ void qemu_chr_reset(CharDriverState *s) > } > } > > -void qemu_chr_initial_reset(void) > -{ > - CharDriverState *chr; > - > - QTAILQ_FOREACH(chr, &chardevs, next) { > - qemu_chr_reset(chr); > - } > -} > - > int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len) > { > return s->chr_write(s, buf, len); > diff --git a/qemu-char.h b/qemu-char.h > index 05fe15d..b420111 100644 > --- a/qemu-char.h > +++ b/qemu-char.h > @@ -83,7 +83,6 @@ void qemu_chr_add_handlers(CharDriverState *s, > void *opaque); > int qemu_chr_ioctl(CharDriverState *s, int cmd, void *arg); > void qemu_chr_reset(CharDriverState *s); > -void qemu_chr_initial_reset(void); > int qemu_chr_can_read(CharDriverState *s); > void qemu_chr_read(CharDriverState *s, uint8_t *buf, int len); > int qemu_chr_get_msgfd(CharDriverState *s); > diff --git a/vl.c b/vl.c > index e57f58f..5ad4e42 100644 > --- a/vl.c > +++ b/vl.c > @@ -5750,7 +5750,6 @@ int main(int argc, char **argv, char **envp) > } > > text_consoles_set_display(display_state); > - qemu_chr_initial_reset(); > > for (i = 0; i < MAX_MONITOR_DEVICES; i++) { > if (monitor_devices[i] && monitor_hds[i]) {