From patchwork Tue Feb 2 08:19:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 76316 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 o128JipC030321 for ; Tue, 2 Feb 2010 08:19:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754899Ab0BBITn (ORCPT ); Tue, 2 Feb 2010 03:19:43 -0500 Received: from goliath.siemens.de ([192.35.17.28]:18320 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754626Ab0BBITh (ORCPT ); Tue, 2 Feb 2010 03:19:37 -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 o128JHoY013883; Tue, 2 Feb 2010 09:19:17 +0100 Received: from localhost.localdomain ([139.25.173.39]) by mail2.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o128J7sa008551; Tue, 2 Feb 2010 09:19:17 +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 20/21] qemu-kvm: Move kvm_set_boot_cpu_id Date: Tue, 2 Feb 2010 09:19:06 +0100 Message-Id: <363f516310b5e3fbdb2f4461d725d7e0406a6fef.1265098708.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]); Tue, 02 Feb 2010 08:19:45 +0000 (UTC) diff --git a/hw/pc.c b/hw/pc.c index 6c15a9f..3df6195 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -803,9 +803,6 @@ static void pc_init1(ram_addr_t ram_size, #endif } - if (kvm_enabled()) { - kvm_set_boot_cpu_id(0); - } for (i = 0; i < smp_cpus; i++) { env = pc_new_cpu(cpu_model); } diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 9de018e..0f34451 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -695,7 +695,8 @@ int kvm_arch_qemu_create_context(void) if (kvm_check_extension(kvm_state, KVM_CAP_ADJUST_CLOCK)) vmstate_register(0, &vmstate_kvmclock, &kvmclock_data); #endif - return 0; + + return kvm_set_boot_cpu_id(0); } static void set_msr_entry(struct kvm_msr_entry *entry, uint32_t index,