Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc
On 31/01/2016 16:54, Mark Cave-Ayland wrote: > Aha! A quick test here shows that the patch fixes the serial port > appearing on stdout and entering the monitor, but I still see the > multiple echo problem in the GTK GUI. And this should be it; if this fixes all your problems I will submit it for inclusion. Thanks, Paolo - 8< --- From: Paolo BonziniSubject: [PATCH] gtk: fix uninitialized temporary VirtualConsole Only the echo field is used in the temporary VirtualConsole, so the damage was limited. But still, if echo was incorrectly set to true, the result would be some puzzling output in VTE monitor and serial consoles. Fixes: fba958c692e47a373d15c1fd3d72b255bf76adbd Signed-off-by: Paolo Bonzini diff --git a/ui/gtk.c b/ui/gtk.c index c8dbd5c..e106493 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1612,7 +1612,7 @@ static CharDriverState *gd_vc_handler(ChardevVC *vc, Error **errp) chr->chr_set_echo = gd_vc_chr_set_echo; /* Temporary, until gd_vc_vte_init runs. */ -chr->opaque = g_new(VirtualConsole, 1); +chr->opaque = g_new0(VirtualConsole, 1); /* defer OPENED events until our vc is fully initialized */ chr->explicit_be_open = true;
Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc
On 08/02/16 09:08, Paolo Bonzini wrote: > On 31/01/2016 16:54, Mark Cave-Ayland wrote: >> Aha! A quick test here shows that the patch fixes the serial port >> appearing on stdout and entering the monitor, but I still see the >> multiple echo problem in the GTK GUI. > > And this should be it; if this fixes all your problems I will submit > it for inclusion. > > Thanks, > > Paolo > > - 8< --- > From: Paolo Bonzini> Subject: [PATCH] gtk: fix uninitialized temporary VirtualConsole > > Only the echo field is used in the temporary VirtualConsole, so the > damage was limited. But still, if echo was incorrectly set to true, > the result would be some puzzling output in VTE monitor and serial > consoles. > > Fixes: fba958c692e47a373d15c1fd3d72b255bf76adbd > Signed-off-by: Paolo Bonzini > > diff --git a/ui/gtk.c b/ui/gtk.c > index c8dbd5c..e106493 100644 > --- a/ui/gtk.c > +++ b/ui/gtk.c > @@ -1612,7 +1612,7 @@ static CharDriverState *gd_vc_handler(ChardevVC *vc, > Error **errp) > chr->chr_set_echo = gd_vc_chr_set_echo; > > /* Temporary, until gd_vc_vte_init runs. */ > -chr->opaque = g_new(VirtualConsole, 1); > +chr->opaque = g_new0(VirtualConsole, 1); > > /* defer OPENED events until our vc is fully initialized */ > chr->explicit_be_open = true; Hi Paolo, Thanks for the patch, I can confirm it fixes the local echo issue for me. However I still see one more issue in the GTK monitor (I seem to be doing well here) whereby the width of the GTK console changes size. With git master, I start up qemu-system-ppc with the GTK interface, switch to the monitor and type help which gives this output: https://www.ilande.co.uk/tmp/help1.png. If I then type help again then the output looks like https://www.ilande.co.uk/tmp/help2.png. In effect, it looks like the width of the window is 3 characters too wide but only for the first command. ATB, Mark.
Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc
On 31/01/16 21:57, Paolo Bonzini wrote: > On 31/01/2016 18:54, Peter Maydell wrote: >> On 31 January 2016 at 17:19, Paolo Bonziniwrote: >>> On 31/01/2016 16:54, Mark Cave-Ayland wrote: I also notice that with the above commit I lose cycling through history in the GTK monitor - even with the multiple echo, instead of the up/down arrow keys cycling through the history instead I see the codes ^[[B and ^[[A being output to the window instead. >>> >>> That is probably me. The echo feature was introduced for QMP, but in >>> theory it should have been limited to that. I'll check it, thanks. >> >> I've also seen echo, but only intermittently... > > That smells like uninitialized memory or something like that. > > Actually I'm fairly sure I tested "-monitor vc" at least, so perhaps > it's an interaction between the echo feature and "qemu-char: add logfile > facility to all chardev backends". Anyway I'll look at it. Yeah I think you're right. I did a little bit of testing yesterday and the echo disappeared until I remembered that I'd been testing a self-built OpenBIOS - and as soon as I reintroduced this option onto the command line, the echo magically re-appeared. I can reproduce this consistently under qemu-system-ppc git master like this: make distclean STRIP= './configure' '--target-list=ppc-softmmu' '--prefix=/home/build/rel-qemu-git' '--enable-gtk' '--disable-pie' and then specifying a -bios parameter on the command line (even if it is the same file as that normally used by QEMU): $ ./qemu-system-ppc -bios ../share/qemu/openbios-ppc Now try typing into the GTK monitor window and hopefully you should be able to see the problem. ATB, Mark.
Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc
On 31/01/2016 18:54, Peter Maydell wrote: > On 31 January 2016 at 17:19, Paolo Bonziniwrote: >> On 31/01/2016 16:54, Mark Cave-Ayland wrote: >>> I also notice that with the above commit I lose cycling through history >>> in the GTK monitor - even with the multiple echo, instead of the up/down >>> arrow keys cycling through the history instead I see the codes ^[[B and >>> ^[[A being output to the window instead. >> >> That is probably me. The echo feature was introduced for QMP, but in >> theory it should have been limited to that. I'll check it, thanks. > > I've also seen echo, but only intermittently... That smells like uninitialized memory or something like that. Actually I'm fairly sure I tested "-monitor vc" at least, so perhaps it's an interaction between the echo feature and "qemu-char: add logfile facility to all chardev backends". Anyway I'll look at it. Paolo
Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc
On 31/01/2016 16:54, Mark Cave-Ayland wrote: > Aha! A quick test here shows that the patch fixes the serial port > appearing on stdout and entering the monitor, but I still see the > multiple echo problem in the GTK GUI. > > I also notice that with the above commit I lose cycling through history > in the GTK monitor - even with the multiple echo, instead of the up/down > arrow keys cycling through the history instead I see the codes ^[[B and > ^[[A being output to the window instead. That is probably me. The echo feature was introduced for QMP, but in theory it should have been limited to that. I'll check it, thanks. Paolo
Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc
On 31 January 2016 at 17:19, Paolo Bonziniwrote: > On 31/01/2016 16:54, Mark Cave-Ayland wrote: >> I also notice that with the above commit I lose cycling through history >> in the GTK monitor - even with the multiple echo, instead of the up/down >> arrow keys cycling through the history instead I see the codes ^[[B and >> ^[[A being output to the window instead. > > That is probably me. The echo feature was introduced for QMP, but in > theory it should have been limited to that. I'll check it, thanks. I've also seen echo, but only intermittently... thanks -- PMM
Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc
On 31/01/16 15:34, Peter Maydell wrote: > On 31 January 2016 at 15:19, Mark Cave-Ayland >wrote: >> Hi Daniel, >> >> Commit d0d7708ba29cbcc343364a46bff981e0ff88366f "qemu-char: add logfile >> facility to all chardev backends" appears to be causing problems with >> the monitor and stdin/stdout on both qemu-system-sparc/qemu-system-ppc here. > > These should be fixed by https://patchwork.ozlabs.org/patch/571128/ > I think (the duplicate output at least; the multiple-echoback I'm > not so sure about). Aha! A quick test here shows that the patch fixes the serial port appearing on stdout and entering the monitor, but I still see the multiple echo problem in the GTK GUI. I also notice that with the above commit I lose cycling through history in the GTK monitor - even with the multiple echo, instead of the up/down arrow keys cycling through the history instead I see the codes ^[[B and ^[[A being output to the window instead. ATB, Mark.
Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc
On 31 January 2016 at 15:19, Mark Cave-Aylandwrote: > Hi Daniel, > > Commit d0d7708ba29cbcc343364a46bff981e0ff88366f "qemu-char: add logfile > facility to all chardev backends" appears to be causing problems with > the monitor and stdin/stdout on both qemu-system-sparc/qemu-system-ppc here. These should be fixed by https://patchwork.ozlabs.org/patch/571128/ I think (the duplicate output at least; the multiple-echoback I'm not so sure about). thanks -- PMM