From patchwork Wed Jul 3 08:09:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 256549 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2AE962C00A4 for ; Wed, 3 Jul 2013 18:10:45 +1000 (EST) Received: from localhost ([::1]:53414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuI9D-0005NN-3e for incoming@patchwork.ozlabs.org; Wed, 03 Jul 2013 04:10:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuI8d-00056b-K8 for qemu-devel@nongnu.org; Wed, 03 Jul 2013 04:10:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuI8Y-0002Nn-MP for qemu-devel@nongnu.org; Wed, 03 Jul 2013 04:10:07 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:54100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuI8Y-0002Ih-9T for qemu-devel@nongnu.org; Wed, 03 Jul 2013 04:10:02 -0400 Received: from [192.168.88.2] (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id D705340445; Wed, 3 Jul 2013 12:10:00 +0400 (MSK) Message-ID: <51D3DC57.7070205@msgid.tls.msk.ru> Date: Wed, 03 Jul 2013 12:09:59 +0400 From: Michael Tokarev Organization: Telecom Service, JSC User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130529 Icedove/17.0.5 MIME-Version: 1.0 To: Paolo Bonzini References: <1372833874-21416-1-git-send-email-mjt@msgid.tls.msk.ru> <51D3CF36.2050302@redhat.com> In-Reply-To: <51D3CF36.2050302@redhat.com> X-Enigmail-Version: 1.5.1 OpenPGP: id=804465C5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: Anthony Liguori , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH v2 1/2] trap signals for "-serial mon:stdio" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 03.07.2013 11:13, Paolo Bonzini wrote: ... >> --- a/qemu-options.hx >> +++ b/qemu-options.hx >> @@ -842,7 +842,8 @@ STEXI >> Normally, QEMU uses SDL to display the VGA output. With this option, >> you can totally disable graphical output so that QEMU is a simple >> command line application. The emulated serial port is redirected on >> -the console. Therefore, you can still use QEMU to debug a Linux kernel >> +the console and muxed with the monitor (unless redirected elsewhere >> +explicitly). > > By default, the emulated serial port and the monitor are multiplexed on > the console; @option{-serial} and @option{-monitor} can be used to > change this default. > > Therefore, you can still use QEMU to debug a Linux kernel >> with a serial console. >> ETEXI >> >> @@ -2485,14 +2486,15 @@ same as if you had specified @code{-serial tcp} except the unix domain socket >> @item mon:@var{dev_string} >> This is a special option to allow the monitor to be multiplexed onto >> another serial port. The monitor is accessed with key sequence of >> -@key{Control-a} and then pressing @key{c}. See monitor access >> -@ref{pcsys_keys} in the -nographic section for more keys. >> +@key{Control-a} and then pressing @key{c}. >> @var{dev_string} should be any one of the serial devices specified >> above. An example to multiplex the monitor onto a telnet server >> listening on port 4444 would be: >> @table @code >> @item -serial mon:telnet::4444,server,nowait >> @end table >> +When monitor is multiplexed to stdio this way, Ctrl+C will not terminate >> +guest anymore but will be passed to the guest as is. > > will not terminate QEMU anymore... >> >> @item braille >> Braille device. This will use BrlAPI to display the braille output on a real >> > > Also, there is another reference to -nographic here: > > @item -echr @var{numeric_ascii_value} > @findex -echr > Change the escape character used for switching to the monitor when using > monitor and serial sharing. The default is @code{0x01} when using the > @code{-nographic} option. @code{0x01} is equal to pressing > @code{Control-a}. You can select a different character from the ascii > control keys where 1 through 26 map to Control-a through Control-z. For > instance you could use the either of the following to change the escape > character to Control-t. > > You could remove "when using the @code{-nographic} option" from this > paragraph. Ok. Thank you for the review. English isn't my native language so extra eyes on my wording is always apprecated. Here's a new diff just for the documentation part, based on your suggestions. I changed the wording a bit further, to make it all fit better with the surrounding text. I'll resend a v3 with this change. The first 1/2 patch (trap signals) and the actual code did not change. /mjt --- a/qemu-options.hx +++ b/qemu-options.hx @@ -825,7 +825,11 @@ a text mode. Generally only the VGA device models support text mode. @item none Do not display video output. The guest will still see an emulated graphics card, but its output will not be displayed to the QEMU -user. This option differs from the -nographic option in that it +user. The fact that we have no display is passed to firmware and +affects a few other places depending on the target architecture, +like switching console output to serial console or disabling keyboard +input. +This option differs from the -nographic option in that it only affects what is done with video output; -nographic also changes the destination of the serial and parallel port data. @item vnc @@ -841,10 +845,15 @@ STEXI @findex -nographic Normally, QEMU uses SDL to display the VGA output. With this option, you can totally disable graphical output so that QEMU is a simple -command line application. The emulated serial port is redirected on -the console and muxed with the monitor (unless redirected elsewhere -explicitly). Therefore, you can still use QEMU to debug a Linux kernel -with a serial console. +command line application. When this option is specified, unless +redirected explicitly, the emulated serial port and the monitor +are multiplexed on the console (stdio). +This option is equivalent for +@example +-display none -serial mon:stdio -parallel none +@end example +Since even with no display, emulated serial port is still available, +you can use QEMU to debug a Linux kernel with a serial console. ETEXI DEF("curses", 0, QEMU_OPTION_curses, @@ -2494,7 +2503,7 @@ listening on port 4444 would be: @item -serial mon:telnet::4444,server,nowait @end table When monitor is multiplexed to stdio this way, Ctrl+C will not terminate -guest anymore but will be passed to the guest as is. +QEMU anymore but will be passed to the guest instead. @item braille Braille device. This will use BrlAPI to display the braille output on a real @@ -2867,12 +2876,11 @@ STEXI @item -echr @var{numeric_ascii_value} @findex -echr Change the escape character used for switching to the monitor when using -monitor and serial sharing. The default is @code{0x01} when using the -@code{-nographic} option. @code{0x01} is equal to pressing -@code{Control-a}. You can select a different character from the ascii -control keys where 1 through 26 map to Control-a through Control-z. For -instance you could use the either of the following to change the escape -character to Control-t. +monitor and serial sharing. The default is @code{0x01}, which is equivalent +to pressing @code{Control-a}. +You can select a different character from the ascii control keys where +1 through 26 map to Control-a through Control-z. For instance you could +use the either of the following to change the escape character to Control-t. @table @code @item -echr 0x14 @item -echr 20