From patchwork Wed Feb 24 14:17:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 81743 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1OEIPHV021125 for ; Wed, 24 Feb 2010 14:18:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755390Ab0BXOSX (ORCPT ); Wed, 24 Feb 2010 09:18:23 -0500 Received: from goliath.siemens.de ([192.35.17.28]:19286 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754636Ab0BXOSW (ORCPT ); Wed, 24 Feb 2010 09:18:22 -0500 Received: from mail2.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o1OEHwi9016350; Wed, 24 Feb 2010 15:17:58 +0100 Received: from localhost.localdomain (mchn012c.ww002.siemens.net [139.25.109.167] (may be forged)) by mail2.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o1OEHvk9006898; Wed, 24 Feb 2010 15:17:58 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, Gleb Natapov Subject: [PATCH v3 10/10] qemu-kvm: Bring qemu_init_vcpu back home Date: Wed, 24 Feb 2010 15:17:58 +0100 Message-Id: <86f919e356c26e17bc85aece207e588f07a3388c.1267021065.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: References: In-Reply-To: References: Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 24 Feb 2010 14:18:26 +0000 (UTC) diff --git a/hw/pc.c b/hw/pc.c index 971ae70..a83f96e 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -752,11 +752,6 @@ CPUState *pc_new_cpu(const char *cpu_model) } else { qemu_register_reset((QEMUResetHandler*)cpu_reset, env); } - - /* kvm needs this to run after the apic is initialized. Otherwise, - * it can access invalid state and crash. - */ - qemu_init_vcpu(env); return env; } diff --git a/target-i386/helper.c b/target-i386/helper.c index f9d63f6..f83e8cc 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1953,6 +1953,8 @@ CPUX86State *cpu_x86_init(const char *cpu_model) } mce_init(env); + qemu_init_vcpu(env); + return env; }