From patchwork Wed Feb 24 14:17:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 46124 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 44DEFB6F08 for ; Thu, 25 Feb 2010 01:46:34 +1100 (EST) Received: from localhost ([127.0.0.1]:54929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkITa-0007bV-Au for incoming@patchwork.ozlabs.org; Wed, 24 Feb 2010 09:44:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkIRU-0006rX-St for qemu-devel@nongnu.org; Wed, 24 Feb 2010 09:42:24 -0500 Received: from [199.232.76.173] (port=60628 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkIRU-0006qw-Fq for qemu-devel@nongnu.org; Wed, 24 Feb 2010 09:42:24 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NkIRT-0007eq-6S for qemu-devel@nongnu.org; Wed, 24 Feb 2010 09:42:24 -0500 Received: from goliath.siemens.de ([192.35.17.28]:23958) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NkIRS-0005PW-IW for qemu-devel@nongnu.org; Wed, 24 Feb 2010 09:42:23 -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 o1OEHwhN016344; 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 o1OEHvk8006898; Wed, 24 Feb 2010 15:17:58 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Wed, 24 Feb 2010 15:17:57 +0100 Message-Id: <25f4b459d78fbfed6059feac10d560c0a684edfd.1267021065.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Cc: Gleb Natapov , qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH v3 09/10] qemu-kvm: Move kvm_set_boot_cpu_id X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Setting the boot CPU ID is arch-specific KVM stuff. So push it where it belongs to. Signed-off-by: Jan Kiszka --- hw/pc.c | 3 --- qemu-kvm-x86.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 8b5af35..971ae70 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -804,9 +804,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 1ac5dbf..b0592ed 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,