From patchwork Wed May 25 13:53:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 97362 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3770CB6F94 for ; Thu, 26 May 2011 00:47:30 +1000 (EST) Received: from localhost ([::1]:34678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPFMu-0004HY-17 for incoming@patchwork.ozlabs.org; Wed, 25 May 2011 10:47:28 -0400 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 Received: from playa.tlv.redhat.com (dhcp-3-110.tlv.redhat.com [10.35.3.110]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4PDroPx006546; Wed, 25 May 2011 09:53:51 -0400 From: Alon Levy To: qemu-devel@nongnu.org Date: Wed, 25 May 2011 16:53:49 +0300 Message-Id: <1306331629-31041-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kraxel@redhat.com Subject: [Qemu-devel] [RFC] reduce reported VGA framebuffer to 8 MiB X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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);