From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDiz5-0007S2-D2 for qemu-devel@nongnu.org; Tue, 11 Oct 2011 16:31:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDiz3-00025l-LG for qemu-devel@nongnu.org; Tue, 11 Oct 2011 16:31:31 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:56771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDiz3-00025b-6m for qemu-devel@nongnu.org; Tue, 11 Oct 2011 16:31:29 -0400 Message-ID: <4E94A79F.7070305@web.de> Date: Tue, 11 Oct 2011 22:31:27 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20111011093616.GA32387@bow.tlv.redhat.com> <4E947E9B.2000906@siemens.com> <20111011174442.GJ1049@bow.tlv.redhat.com> In-Reply-To: <20111011174442.GJ1049@bow.tlv.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFA124BB585E7664EFE68F147" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] "console: Properly switch consoles for screen dumps" breaks qxl screen dump List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFA124BB585E7664EFE68F147 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-10-11 19:44, Alon Levy wrote: > On Tue, Oct 11, 2011 at 07:36:27PM +0200, Jan Kiszka wrote: >> On 2011-10-11 11:36, Alon Levy wrote: >>> Hi Jan, >>> >>> I've recently found the $SUBJECT, it's commit >>> f81bdefb63243e82d16ce49332f7cf74d10b8f27. >>> >>> I'd like to fix it without breaking anything, can you provide me wit= h >>> the test that your original patch fixed? >> >> Have monitor on virtual console, switch to monitor and trigger screen >> dump. So far that caused the to be dumped screen been written to the >> monitor console, the console was furthermore resized, but all that mes= s >> was left behind once dumping was finished. No we switch to the graphic= >> console first and restore the monitor afterwards. >=20 > I don't follow. Can you provide a qemu command line? how do I run the m= onitor > on a virtual console? It's there by default unless you specify something else via -mon[itor]. In that case you can add another one via -monitor vc. >=20 >> >>> >>> Alon >>> >>> p.s. for a simple command line with a single console (not even sure h= ow >>> to get multiple) the following fixes my problem, I expect it doesn't >>> introduce any problems? >>> >>> >>> diff --git a/console.c b/console.c >>> index 6dfcc47..5a709fe 100644 >>> --- a/console.c >>> +++ b/console.c >>> @@ -1067,6 +1067,10 @@ void console_select(unsigned int index) >>> =20 >>> if (index >=3D MAX_CONSOLES) >>> return; >>> + if (active_console =3D=3D consoles[index]) { >>> + fprintf(stderr, "not changing console, not required\n"); >>> + return; >>> + } >>> if (active_console) { >>> active_console->g_width =3D ds_get_width(active_console->ds)= ; >>> active_console->g_height =3D ds_get_height(active_console->d= s); >> >> I suspect this papers over some QXL bug. SDL has no issues when I >> trigger the screen dump from a monitor console that requires no switch= ing. >=20 > You are absolutely right. So far I haven't managed to find the exact bu= g > (I have been looking without applying this patch). So I've sent this > patch anyway. the rest of console_select reallocates the surface, which= > is not terrible (this isn't high frequency) but still redundant. Yeah, I see. No concerns. Jan --------------enigFA124BB585E7664EFE68F147 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6Up58ACgkQitSsb3rl5xQoWQCdFiv0gAo/7OJs1RiegNboMRgu iJIAn21qxX1Q0NjIWBEUssNvrHniMP6D =PhnZ -----END PGP SIGNATURE----- --------------enigFA124BB585E7664EFE68F147--