From patchwork Fri Feb 18 10:11:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 83569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C81F2B70F4 for ; Fri, 18 Feb 2011 22:01:59 +1100 (EST) Received: from localhost ([127.0.0.1]:34338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqNep-0003Jd-2X for incoming@patchwork.ozlabs.org; Fri, 18 Feb 2011 05:33:51 -0500 Received: from [140.186.70.92] (port=48322 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqNJP-0003Qe-GK for qemu-devel@nongnu.org; Fri, 18 Feb 2011 05:11:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqNJN-0002NV-9S for qemu-devel@nongnu.org; Fri, 18 Feb 2011 05:11:43 -0500 Received: from david.siemens.de ([192.35.17.14]:15228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqNJM-0002K3-RB for qemu-devel@nongnu.org; Fri, 18 Feb 2011 05:11:41 -0500 Received: from mail1.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.13.6/8.13.6) with ESMTP id p1IABTRG017687; Fri, 18 Feb 2011 11:11:30 +0100 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p1IABQYI014514; Fri, 18 Feb 2011 11:11:29 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Fri, 18 Feb 2011 11:11:13 +0100 Message-Id: <29e71b8ea899eba29d911060333bdfb5b390e3ba.1298023878.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.14 Cc: Hidetoshi Seto , Jin Dongming , qemu-devel@nongnu.org, kvm@vger.kernel.org, Huang Ying Subject: [Qemu-devel] [PATCH v2 02/15] x86: Perform implicit mcg_status reset X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Reorder mcg_status in CPUState to achieve automatic clearing on reset. Signed-off-by: Jan Kiszka CC: Huang Ying CC: Hidetoshi Seto CC: Jin Dongming --- target-i386/cpu.h | 3 ++- target-i386/helper.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 5f1df8b..75156e7 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -687,6 +687,8 @@ typedef struct CPUX86State { uint64_t pat; + uint64_t mcg_status; + /* exception/interrupt handling */ int error_code; int exception_is_int; @@ -741,7 +743,6 @@ typedef struct CPUX86State { struct DeviceState *apic_state; uint64_t mcg_cap; - uint64_t mcg_status; uint64_t mcg_ctl; uint64_t mce_banks[MCE_BANKS_DEF*4]; diff --git a/target-i386/helper.c b/target-i386/helper.c index f0c546d..f41416f 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -101,8 +101,6 @@ void cpu_reset(CPUX86State *env) env->dr[7] = DR7_FIXED_1; cpu_breakpoint_remove_all(env, BP_CPU); cpu_watchpoint_remove_all(env, BP_CPU); - - env->mcg_status = 0; } void cpu_x86_close(CPUX86State *env)