From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56312 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaSKd-0000HU-8w for qemu-devel@nongnu.org; Wed, 05 Jan 2011 07:19:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaSKX-0001Ls-OM for qemu-devel@nongnu.org; Wed, 05 Jan 2011 07:19:11 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:40653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaSKX-0001Jq-Ge for qemu-devel@nongnu.org; Wed, 05 Jan 2011 07:19:05 -0500 Message-ID: <4D2461AD.3060907@web.de> Date: Wed, 05 Jan 2011 13:18:53 +0100 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH 11.5/21] Synchronize VCPU states before reset List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity , Marcelo Tosatti Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Huang Ying From: Jan Kiszka 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 --- This must be applied before "Drop MCE MSRs write back restrictions" (I don't want to resend the whole series for this). vl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 768dbf4..20e5dda 100644 --- a/vl.c +++ b/vl.c @@ -1422,6 +1422,7 @@ static void main_loop(void) } if (qemu_reset_requested()) { pause_all_vcpus(); + cpu_synchronize_all_states(); qemu_system_reset(); resume_all_vcpus(); }