From patchwork Wed Feb 3 08:53:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 44364 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 19AB1B7D11 for ; Wed, 3 Feb 2010 20:29:35 +1100 (EST) Received: from localhost ([127.0.0.1]:60320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcbYC-0007ok-2c for incoming@patchwork.ozlabs.org; Wed, 03 Feb 2010 04:29:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ncb05-00026J-L9 for qemu-devel@nongnu.org; Wed, 03 Feb 2010 03:54:18 -0500 Received: from [199.232.76.173] (port=56391 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ncb04-00025m-6p for qemu-devel@nongnu.org; Wed, 03 Feb 2010 03:54:16 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ncazp-00079p-UD for qemu-devel@nongnu.org; Wed, 03 Feb 2010 03:54:15 -0500 Received: from goliath.siemens.de ([192.35.17.28]:20928) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ncazo-00079I-MO for qemu-devel@nongnu.org; Wed, 03 Feb 2010 03:54:01 -0500 Received: from mail3.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o138rwvK013769; 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 o138rkCL012112; Wed, 3 Feb 2010 09:53:58 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Wed, 3 Feb 2010 09:53:45 +0100 Message-Id: <3c0c513de451b49d0c89006f4d8568fb0dde168b.1265187223.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: Anthony Liguori , Glauber Costa , Alexander Graf , kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH v2 20/21] 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 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 5cfeb6a..5a19378 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,