From patchwork Wed Feb 3 08:53:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 76640 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 o138scMA011775 for ; Wed, 3 Feb 2010 08:54:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756198Ab0BCIyf (ORCPT ); Wed, 3 Feb 2010 03:54:35 -0500 Received: from david.siemens.de ([192.35.17.14]:21688 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756063Ab0BCIya (ORCPT ); Wed, 3 Feb 2010 03:54:30 -0500 Received: from mail3.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o138rx6t031189; Wed, 3 Feb 2010 09:53:59 +0100 Received: from localhost.localdomain ([139.25.173.28]) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o138rkCM012112; Wed, 3 Feb 2010 09:53:59 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org, Anthony Liguori , Alexander Graf , Glauber Costa , qemu-devel@nongnu.org Subject: [PATCH v2 21/21] qemu-kvm: Bring qemu_init_vcpu back home Date: Wed, 3 Feb 2010 09:53:46 +0100 Message-Id: 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, 03 Feb 2010 08:54:38 +0000 (UTC) diff --git a/hw/pc.c b/hw/pc.c index 3df6195..cd0746c 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -751,11 +751,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; }