From patchwork Mon Mar 1 17:17:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 83010 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 o21HIKmu025117 for ; Mon, 1 Mar 2010 17:18:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834Ab0CARSL (ORCPT ); Mon, 1 Mar 2010 12:18:11 -0500 Received: from david.siemens.de ([192.35.17.14]:23192 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695Ab0CARRy (ORCPT ); Mon, 1 Mar 2010 12:17:54 -0500 Received: from mail2.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o21HHVUY020551; Mon, 1 Mar 2010 18:17:31 +0100 Received: from localhost.localdomain (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 o21HHUx9000935; Mon, 1 Mar 2010 18:17:31 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, Gleb Natapov Subject: [PATCH v4 10/10] qemu-kvm: Bring qemu_init_vcpu back home Date: Mon, 1 Mar 2010 18:17:29 +0100 Message-Id: <190fe78f4c8c0a830189a6602d64ea463e0f2be8.1267463833.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]); Mon, 01 Mar 2010 17:18:22 +0000 (UTC) diff --git a/hw/pc.c b/hw/pc.c index d819fca..0aebae9 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -787,11 +787,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 73381e2..e595a3e 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -2285,6 +2285,8 @@ CPUX86State *cpu_x86_init(const char *cpu_model) } mce_init(env); + qemu_init_vcpu(env); + return env; }