From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 2/4] sipi and init: move common code Date: Wed, 3 Jun 2009 22:53:05 +0300 Message-ID: <20090603195305.GB18757@redhat.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@redhat.com To: Glauber Costa Return-path: Received: from mx2.redhat.com ([66.187.237.31]:51476 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754795AbZFCTxF (ORCPT ); Wed, 3 Jun 2009 15:53:05 -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 n53Jr7og008348 for ; Wed, 3 Jun 2009 15:53:07 -0400 Content-Disposition: inline In-Reply-To: <1244053544-12074-3-git-send-email-glommer@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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. -- Gleb.