From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcJTS-0006HU-Qy for qemu-devel@nongnu.org; Tue, 02 Feb 2010 09:11:26 -0500 Received: from [199.232.76.173] (port=49972 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcJTS-0006HM-HE for qemu-devel@nongnu.org; Tue, 02 Feb 2010 09:11:26 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcJTQ-0001nn-VK for qemu-devel@nongnu.org; Tue, 02 Feb 2010 09:11:26 -0500 Received: from mx20.gnu.org ([199.232.41.8]:32872) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NcJTQ-0001nQ-Ld for qemu-devel@nongnu.org; Tue, 02 Feb 2010 09:11:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NcJTP-0001Tl-TA for qemu-devel@nongnu.org; Tue, 02 Feb 2010 09:11:24 -0500 Date: Tue, 2 Feb 2010 16:11:19 +0200 From: Gleb Natapov Message-ID: <20100202141119.GG739@redhat.com> References: <363f516310b5e3fbdb2f4461d725d7e0406a6fef.1265098708.git.jan.kiszka@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <363f516310b5e3fbdb2f4461d725d7e0406a6fef.1265098708.git.jan.kiszka@siemens.com> Subject: [Qemu-devel] Re: [PATCH 20/21] qemu-kvm: Move kvm_set_boot_cpu_id List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , kvm@vger.kernel.org, Glauber Costa , Marcelo Tosatti , Alexander Graf , qemu-devel@nongnu.org, Avi Kivity On Tue, Feb 02, 2010 at 09:19:06AM +0100, Jan Kiszka wrote: > Setting the boot CPU ID is arch-specific KVM stuff. So push it where it > belongs to. > pc_init1 is also arch-specific, no? TCG should also be able to have BSP apic_id != 0. > 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 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, > -- > 1.6.0.2 > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Gleb.