From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KGEms-0002hZ-N4 for qemu-devel@nongnu.org; Tue, 08 Jul 2008 11:07:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KGEmr-0002fa-5P for qemu-devel@nongnu.org; Tue, 08 Jul 2008 11:07:25 -0400 Received: from [199.232.76.173] (port=40217 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGEmq-0002fX-W5 for qemu-devel@nongnu.org; Tue, 08 Jul 2008 11:07:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:44691) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KGEmq-00046R-KF for qemu-devel@nongnu.org; Tue, 08 Jul 2008 11:07:24 -0400 Message-ID: <48737693.5030300@suse.de> Date: Tue, 08 Jul 2008 16:15:47 +0200 From: Alexander Graf MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030606010705030704010304" Subject: [Qemu-devel] [PATCH] Initialize the VMware VGA console after vga_init 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 Cc: paul@codesourcery.com This is a multi-part message in MIME format. --------------030606010705030704010304 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, while trying the -vmwarevga switch I stumbled across this nifty problem: vga_common_init calls vga_reset, which memsets the whole VGAState to 0. Unfortunately the console initialization code is before that, so it gets overwritten by 0 which breaks later on. To circumvent this I reordered the console initialization to after the vga_init. I am not 100% sure if that's correct, but it works so far. Please double-check if this is the right approach. Alex Signed-off-by: Alexander Graf --------------030606010705030704010304 Content-Type: text/x-patch; name="qemu-vmwarevga.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-vmwarevga.patch" Index: hw/vmware_vga.c =================================================================== --- hw/vmware_vga.c (revision 4852) +++ hw/vmware_vga.c (working copy) @@ -1123,16 +1123,16 @@ vmsvga_reset(s); - s->console = graphic_console_init(ds, vmsvga_update_display, - vmsvga_invalidate_display, - vmsvga_screen_dump, - vmsvga_text_update, s); - #ifdef EMBED_STDVGA vga_common_init((VGAState *) s, ds, vga_ram_base, vga_ram_offset, vga_ram_size); vga_init((VGAState *) s); #endif + + s->console = graphic_console_init(ds, vmsvga_update_display, + vmsvga_invalidate_display, + vmsvga_screen_dump, + vmsvga_text_update, s); } static void pci_vmsvga_save(QEMUFile *f, void *opaque) --------------030606010705030704010304--