From: Glauber Costa Subject: Re: [PATCH 2/4] sipi and init: move common code Date: Wed, 3 Jun 2009 18:11:10 -0300 Message-ID: <20090603211110.GE30777@poweredge.glommer> References: <1244053544-12074-1-git-send-email-glommer@redhat.com> <1244053544-12074-2-git-send-email-glommer@redhat.com> <1244053544-12074-3-git-send-email-glommer@redhat.com> <20090603195305.GB18757@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@redhat.com To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:47713 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753646AbZFCVFW (ORCPT ); Wed, 3 Jun 2009 17:05:22 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n53L5PU7003868 for ; Wed, 3 Jun 2009 17:05:25 -0400 Content-Disposition: inline In-Reply-To: <20090603195305.GB18757@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jun 03, 2009 at 10:53:05PM +0300, Gleb Natapov wrote: > On Wed, Jun 03, 2009 at 02:25:42PM -0400, Glauber Costa wrote: > > @@ -407,12 +393,12 @@ static int kvm_main_loop_cpu(CPUState *env) > > if (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) > > env->halted = 0; > > if (!kvm_irqchip_in_kernel(kvm_context)) { > > - if (env->kvm_cpu_state.init) > > + if (apic_init_received(env)) > > update_regs_for_init(env); > > - if (env->kvm_cpu_state.sipi_needed) > > + if (apic_sipi_needed(env)) > > update_regs_for_sipi(env); > > } > > - if (!env->halted && !env->kvm_cpu_state.init) > > + if (!env->halted) > You remove checking of init here. Why? It looks like it can be safely > removed, but can you do it as a separate patch with explanation why it > is not needed here. I'll update it to not touch this code, since it is not the aim of this series. we can remove it later.