From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsXQy-0007SM-14 for qemu-devel@nongnu.org; Fri, 28 Jun 2013 08:05:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsXQu-0001g2-P4 for qemu-devel@nongnu.org; Fri, 28 Jun 2013 08:05:47 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:34884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsXQu-0001fX-AK for qemu-devel@nongnu.org; Fri, 28 Jun 2013 08:05:44 -0400 Message-ID: <51CD7C16.3040208@msgid.tls.msk.ru> Date: Fri, 28 Jun 2013 16:05:42 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1371645291-3178-1-git-send-email-mjt@msgid.tls.msk.ru> <51CD73A4.2050107@msgid.tls.msk.ru> <51CD775A.3070006@suse.de> <51CD7899.1090909@msgid.tls.msk.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] display: stop using DT_NOGRAPHIC, use DT_NONE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , Anthony Liguori , "Todd T. Fries" , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , qemu-devel@nongnu.org 28.06.2013 15:55, Peter Maydell wrote: > On 28 June 2013 12:50, Michael Tokarev wrote: >> This ctrl+c handling is only about when you explicitly redirected >> some other char device to guest, such as serial port. Which don't >> have much to do with display I think, hence I don't understand the >> logic here. >=20 > The point is that one of the things -nographic does, as well > as disabling the graphics display, is to redirect the serial > port (among other things) to stdio. That's why there's code > in the char backend that cares about "did you say -nographic": > because -nographic means "no graphic display, serial port on > terminal, send ctrl-c in terminal to guest rather than killing > qemu, [some other stuff]". That's exactly why I don't think looking at -nographic here in serial code is wrong. It should do the same regardless of -nographic - if, say, serial is redirected to stdio, it should always pass Ctrl+C to guest instead of killing it. So I'm not really sure we should test for -display none here, either. > It would be nice to be able to say "-nographic is equivalent to > '-display none -serial stdio -disable-ctrl-c -other-things'" > but I'm not sure exactly what the -other-things are or even > if we can set them all on the command line specifically. We have some code in sun4 which also enabled serial ports differently with and without -nographic, maybe because of the same thing (which is what this all is about!). And there's also another place, passing this NOGRAPHIC thing to bios. So far that's all. With chardev you can explicitly control Ctrl+C behavour using signal=3D{on|off} attribute. 28.06.2013 15:56, Andreas F=C3=A4rber wrote: [] > The logic is that a) -nographic does have serial I/O on stdio and b) > emulated serial ports may get repurposed (change order/usage) for this > to work. CC'ing Alex and Blue who might remember more details. > > So in the end it boils down to whether we consider stdio a "display" an= d > whether we may want to split this out into its own global variable to > cleanly separate it from graphical DT_* options. This is still wrong because it works differently if we explicitly redirected serial port to stdio and used -display none, or it was due to -nographic. Thanks, /mjt