From patchwork Thu Jan 19 11:56:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 136872 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 5FFA3B6EFE for ; Fri, 20 Jan 2012 04:29:59 +1100 (EST) Received: from localhost ([::1]:57758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnvS7-0005tr-0S for incoming@patchwork.ozlabs.org; Thu, 19 Jan 2012 12:07:07 -0500 Received: from eggs.gnu.org ([140.186.70.92]:35299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rnqav-0002As-8C for qemu-devel@nongnu.org; Thu, 19 Jan 2012 06:55:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rnqap-0005AZ-OP for qemu-devel@nongnu.org; Thu, 19 Jan 2012 06:55:53 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:48364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rnqap-00059V-Ct for qemu-devel@nongnu.org; Thu, 19 Jan 2012 06:55:47 -0500 X-IronPort-AV: E=Sophos;i="4.71,535,1320642000"; d="scan'208";a="178190248" Received: from ftlpmailmx01.citrite.net ([10.13.107.65]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 19 Jan 2012 06:55:46 -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; Thu, 19 Jan 2012 06:55:46 -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 q0JBtRJ1011858; Thu, 19 Jan 2012 03:55:34 -0800 From: Stefano Stabellini To: qemu-devel@nongnu.org Date: Thu, 19 Jan 2012 11:56:19 +0000 Message-ID: <1326974181-32511-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 X-Mailman-Approved-At: Thu, 19 Jan 2012 12:07:03 -0500 Cc: xen-devel@lists.xensource.com, Stefano Stabellini , jan.kiszka@siemens.com, avi@redhat.com, Anthony PERARD Subject: [Qemu-devel] [PATCH v3 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;