From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKcNO-0005f0-9w for qemu-devel@nongnu.org; Sun, 20 Jul 2008 13:07:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKcNM-0005eW-Qh for qemu-devel@nongnu.org; Sun, 20 Jul 2008 13:07:14 -0400 Received: from [199.232.76.173] (port=33818 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKcNM-0005eQ-Iw for qemu-devel@nongnu.org; Sun, 20 Jul 2008 13:07:12 -0400 Received: from an-out-0708.google.com ([209.85.132.240]:7243) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KKcNM-0007rA-2M for qemu-devel@nongnu.org; Sun, 20 Jul 2008 13:07:12 -0400 Received: by an-out-0708.google.com with SMTP id d18so539869and.130 for ; Sun, 20 Jul 2008 10:07:10 -0700 (PDT) Message-ID: Date: Sun, 20 Jul 2008 19:07:10 +0200 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] [PATCH 6/6] kvm: qemu: fix vga screendump In-Reply-To: <4882A407.5060004@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1216329580-20804-1-git-send-email-aliguori@us.ibm.com> <1216329580-20804-6-git-send-email-aliguori@us.ibm.com> <4882A407.5060004@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 2008/7/20 Anthony Liguori : > andrzej zaborowski wrote: >> >> 2008/7/17 Anthony Liguori : >> >>> >>> From: Avi Kivity >>> Commit 737d2050 ("Implement resolution switching in common console code") >>> uses qemu_console_resize() instead of dpy_resize(). This means >>> console->ds >>> is examined instead of the VGA private ds, and the resize does not take >>> place, >>> leading to a segfault. >>> >>> Fix by modifying the DisplayState directly rather than swapping the >>> pointer. >>> >> >> The screen dumping is hacky but maybe it's a good idea to keep the >> hacks local to hw/vga.c, with something like the following diff. I >> think we need to fix the screen dumping globally (some graphic cards >> will need fixing too). >> > > I agree the screen dumping is pretty hacky right now. Instead of installing > a new DisplayState, I've never understood why we can't just dump ds->data > after an appropriate translation. With -no-graphic there's no ds->data, or it can have lower bpp than what's otherwise available. > > I think your patch looks better, but I can also code up a new screen dumping > mechanism that doesn't take over DisplayState unless I'm missing something > obvious. It's worth a try, dumping ds->data is perhaps the way to go but ds->depth is being set to 32bit and various video cards are optimised on the assumption that ds->depth doesn't change, so maybe there should be a notification callback. Regards