From patchwork Thu Dec 3 18:21:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 64592 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB3ILMg5019817 for ; Thu, 3 Dec 2009 18:21:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753604AbZLCSVO (ORCPT ); Thu, 3 Dec 2009 13:21:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753284AbZLCSVO (ORCPT ); Thu, 3 Dec 2009 13:21:14 -0500 Received: from thoth.sbs.de ([192.35.17.2]:19421 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752863AbZLCSVN (ORCPT ); Thu, 3 Dec 2009 13:21:13 -0500 Received: from mail2.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id nB3IL1FL021396; Thu, 3 Dec 2009 19:21:01 +0100 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail2.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id nB3IL1jE027563; Thu, 3 Dec 2009 19:21:01 +0100 Message-ID: <4B18018D.1060305@siemens.com> Date: Thu, 03 Dec 2009 19:21:01 +0100 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity , Marcelo Tosatti CC: kvm , Gleb Natapov Subject: [PATCH] qemu-kvm: x86: Fix mismerge in cpu_post_load Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/target-i386/machine.c b/target-i386/machine.c index 6bd447f..9ac477b 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -366,7 +366,15 @@ static int cpu_post_load(void *opaque, int version_id) hw_breakpoint_insert(env, i); tlb_flush(env, 1); - kvm_load_mpstate(env); + + if (kvm_enabled()) { + /* when in-kernel irqchip is used, env->halted causes deadlock + because no userspace IRQs will ever clear this flag */ + env->halted = 0; + + kvm_load_tsc(env); + kvm_load_mpstate(env); + } return 0; }