From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: Handle INIT before SIPI. Date: Wed, 22 Oct 2008 14:48:01 +0200 Message-ID: <20081022124801.GA14838@redhat.com> References: <20081016152057.GV11435@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "avi@redhat.com" , "kvm@vger.kernel.org" , "kvm-ia64@vger.kernel.org" To: "Xu, Dongxiao" Return-path: Received: from il.qumranet.com ([212.179.150.194]:44723 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753387AbYJVMsE (ORCPT ); Wed, 22 Oct 2008 08:48:04 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Oct 21, 2008 at 10:34:12AM +0800, Xu, Dongxiao wrote: > Hi, Gleb, > It seems that this patch is x86 specific, and it breaks the IA-64 compilation. Do you have any good idea to solve this? Thanks! > Solve this by ifdefs for now. For better solution cleanup of SMP handling is needed. Signed-off-by: Gleb Natapov diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 67d1de9..c5f3f29 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -353,16 +353,20 @@ static void update_regs_for_sipi(CPUState *env) static void update_regs_for_init(CPUState *env) { +#ifdef TARGET_I386 SegmentCache cs = env->segs[R_CS]; +#endif cpu_reset(env); +#ifdef TARGET_I386 /* restore SIPI vector */ if(vcpu_info[env->cpu_index].sipi_needed) env->segs[R_CS] = cs; - kvm_arch_load_regs(env); vcpu_info[env->cpu_index].init = 0; +#endif + kvm_arch_load_regs(env); } static void setup_kernel_sigmask(CPUState *env) -- Gleb.