From patchwork Fri Jan 20 17:21:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 137073 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 442ADB6F98 for ; Sat, 21 Jan 2012 05:29:14 +1100 (EST) Received: from localhost ([::1]:38192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoIAW-0003C5-FD for incoming@patchwork.ozlabs.org; Fri, 20 Jan 2012 12:22:28 -0500 Received: from eggs.gnu.org ([140.186.70.92]:48329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoI9u-0001ae-4M for qemu-devel@nongnu.org; Fri, 20 Jan 2012 12:21:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoI9o-0004p4-7O for qemu-devel@nongnu.org; Fri, 20 Jan 2012 12:21:50 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:37125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoI9n-0004ni-Se for qemu-devel@nongnu.org; Fri, 20 Jan 2012 12:21:44 -0500 X-IronPort-AV: E=Sophos;i="4.71,543,1320642000"; d="scan'208";a="178450575" Received: from ftlpmailmx01.citrite.net ([10.13.107.65]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 20 Jan 2012 12:21:43 -0500 Received: from smtp01.ad.xensource.com (10.219.128.104) by smtprelay.citrix.com (10.13.107.65) with Microsoft SMTP Server id 8.3.213.0; Fri, 20 Jan 2012 12:21:43 -0500 Received: from localhost.localdomain (kaball.uk.xensource.com [10.80.2.59]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id q0KHLOUf016285; Fri, 20 Jan 2012 09:21:31 -0800 From: Stefano Stabellini To: xen-devel@lists.xensource.com Date: Fri, 20 Jan 2012 17:21:23 +0000 Message-ID: <1327080085-8673-4-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.63 Cc: Stefano Stabellini , jan.kiszka@siemens.com, qemu-devel@nongnu.org, avi@redhat.com, Anthony PERARD Subject: [Qemu-devel] [PATCH v4 4/6] cirrus_vga: do not reset videoram on resume 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 From: Anthony PERARD When resuming we shouldn't set the videoram to 0xff considering that we are about to read it from the savefile. Signed-off-by: Anthony PERARD Signed-off-by: Stefano Stabellini --- hw/cirrus_vga.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index f7b1d3d..eec2fc0 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -32,6 +32,7 @@ #include "console.h" #include "vga_int.h" #include "loader.h" +#include "sysemu.h" /* * TODO: @@ -2760,9 +2761,11 @@ static void cirrus_reset(void *opaque) } s->vga.cr[0x27] = s->device_id; - /* Win2K seems to assume that the pattern buffer is at 0xff - initially ! */ - memset(s->vga.vram_ptr, 0xff, s->real_vram_size); + if (!runstate_check(RUN_STATE_INMIGRATE)) { + /* Win2K seems to assume that the pattern buffer is at 0xff + initially ! */ + memset(s->vga.vram_ptr, 0xff, s->real_vram_size); + } s->cirrus_hidden_dac_lockindex = 5; s->cirrus_hidden_dac_data = 0;