From patchwork Wed Mar 2 07:56:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 85038 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 384811007D3 for ; Wed, 2 Mar 2011 18:58:20 +1100 (EST) Received: from localhost ([127.0.0.1]:34953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pugwr-0005nE-6c for incoming@patchwork.ozlabs.org; Wed, 02 Mar 2011 02:58:17 -0500 Received: from [140.186.70.92] (port=41283 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PugvA-0005m3-Jb for qemu-devel@nongnu.org; Wed, 02 Mar 2011 02:56:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pugv9-0005Dl-PX for qemu-devel@nongnu.org; Wed, 02 Mar 2011 02:56:32 -0500 Received: from thoth.sbs.de ([192.35.17.2]:34702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pugv9-0005DG-H9 for qemu-devel@nongnu.org; Wed, 02 Mar 2011 02:56:31 -0500 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id p227uTwk028377; Wed, 2 Mar 2011 08:56:29 +0100 Received: from mchn199C.mchp.siemens.de ([146.254.217.97]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p227uKnM031204; Wed, 2 Mar 2011 08:56:29 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Wed, 2 Mar 2011 08:56:11 +0100 Message-Id: <9abcbd5321a7a6239b7f37c5b9d88e9eee826d0e.1299052578.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.2 Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH v3 08/17] Synchronize VCPU states before 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 This is required to support keeping VCPU states across a system reset. If we do not read the current state before the reset, cpu_synchronize_all_post_reset may write back incorrect state information. The first user of this will be MCE MSR synchronization which currently works around the missing cpu_synchronize_all_states. Signed-off-by: Jan Kiszka --- vl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index b436952..7751843 100644 --- a/vl.c +++ b/vl.c @@ -1452,6 +1452,7 @@ static void main_loop(void) } if (qemu_reset_requested()) { pause_all_vcpus(); + cpu_synchronize_all_states(); qemu_system_reset(); resume_all_vcpus(); }