From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPFMo-0004HE-5e for qemu-devel@nongnu.org; Wed, 25 May 2011 10:47:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPFMm-0007lj-BX for qemu-devel@nongnu.org; Wed, 25 May 2011 10:47:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPFMm-0007lN-4G for qemu-devel@nongnu.org; Wed, 25 May 2011 10:47:20 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4PDrqNh023511 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 May 2011 09:53:52 -0400 From: Alon Levy Date: Wed, 25 May 2011 16:53:49 +0300 Message-Id: <1306331629-31041-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [RFC] reduce reported VGA framebuffer to 8 MiB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kraxel@redhat.com Without this windows xp guests set a 4 bits per pixel graphics mode. With it we get the same behavior as with -vga std, that is a 32 bpp graphics mode. This fits the size reported by hw/vga-pci.c . --- Sending as RFC since I'm not sure if this is the right thing, nor that it doesn't actually interfere with anything else. I did however do the testing with and without mentioned in the patch comment and code comment. --- hw/qxl.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 9a0f588..f6ff9f2 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1332,7 +1332,14 @@ static int qxl_init_primary(PCIDevice *dev) if (ram_size < 32 * 1024 * 1024) { ram_size = 32 * 1024 * 1024; } - vga_common_init(vga, ram_size); + /* + * windows xp guests don't like larger then VGA_RAM_SIZE (8 MiB), + * wrongly setting the display to 4 bit color depth. This fix doesn't + * affect native mode, where we have modes that require larger amounts + * of ram. (The maximum that VBE reports is 1600x1200 32 bit color depth + * which fits) + */ + vga_common_init(vga, VGA_RAM_SIZE); vga_init(vga); register_ioport_write(0x3c0, 16, 1, qxl_vga_ioport_write, vga); register_ioport_write(0x3b4, 2, 1, qxl_vga_ioport_write, vga); -- 1.7.5.1