From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrILq-0003X6-3L for qemu-devel@nongnu.org; Tue, 07 Apr 2009 16:56:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrILk-0003Sw-QV for qemu-devel@nongnu.org; Tue, 07 Apr 2009 16:56:57 -0400 Received: from [199.232.76.173] (port=49047 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrILk-0003Sn-JE for qemu-devel@nongnu.org; Tue, 07 Apr 2009 16:56:52 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:43980) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LrILk-0003zx-0z for qemu-devel@nongnu.org; Tue, 07 Apr 2009 16:56:52 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e32.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n37Krsob003995 for ; Tue, 7 Apr 2009 14:53:54 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n37KunwT185682 for ; Tue, 7 Apr 2009 14:56:49 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n37Kunbi009557 for ; Tue, 7 Apr 2009 14:56:49 -0600 Message-ID: <49DBBE0F.5060904@us.ibm.com> Date: Tue, 07 Apr 2009 15:56:47 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1239096832-25757-1-git-send-email-avi@redhat.com> In-Reply-To: <1239096832-25757-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Fix crash on resolution change -> screen dump -> vga redraw Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Avi Kivity wrote: > The vga screen dump function updates last_width and last_height, > but does not change the DisplaySurface that these variables describe. > A consequent vga_draw_graphic() will therefore fail to resize the > surface and crash. > > Fix by invalidating the display state after a screen dump, forcing > vga_draw_graphic() to reallocate the DisplaySurface. > > Signed-off-by: Avi Kivity > Applied. Thanks. Regards, Anthony Liguori > --- > hw/vga.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/hw/vga.c b/hw/vga.c > index b1e4373..4d1049b 100644 > --- a/hw/vga.c > +++ b/hw/vga.c > @@ -2678,4 +2678,5 @@ static void vga_screen_dump(void *opaque, const char *filename) > vga_screen_dump_graphic(s, filename); > else > vga_screen_dump_text(s, filename); > + vga_invalidate_display(s); > } > -- Regards, Anthony Liguori