From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/6] env->kvm_cpu_state.init is always zero here. Date: Mon, 15 Jun 2009 13:05:35 +0300 Message-ID: <4A361CEF.8000701@redhat.com> References: <1244976742-22926-1-git-send-email-gleb@redhat.com> <4A361A8F.8030205@redhat.com> <20090615095844.GJ19508@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:41744 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753320AbZFOKFa (ORCPT ); Mon, 15 Jun 2009 06:05:30 -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 n5FA5XM8008292 for ; Mon, 15 Jun 2009 06:05:33 -0400 In-Reply-To: <20090615095844.GJ19508@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/15/2009 12:58 PM, Gleb Natapov wrote: > On Mon, Jun 15, 2009 at 12:55:27PM +0300, Avi Kivity wrote: > >> On 06/14/2009 01:52 PM, Gleb Natapov wrote: >> >>> Signed-off-by: Gleb Natapov >>> --- >>> qemu-kvm.c | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/qemu-kvm.c b/qemu-kvm.c >>> index 2aeb17c..ec911ef 100644 >>> --- a/qemu-kvm.c >>> +++ b/qemu-kvm.c >>> @@ -412,7 +412,7 @@ static int kvm_main_loop_cpu(CPUState *env) >>> if (env->kvm_cpu_state.sipi_needed) >>> update_regs_for_sipi(env); >>> } >>> - if (!env->halted&& !env->kvm_cpu_state.init) >>> + if (!env->halted) >>> kvm_cpu_exec(env); >>> env->exit_request = 0; >>> env->exception_index = EXCP_INTERRUPT; >>> >>> >> Are you sure? Can't a reset reenable it? >> >> > The thing is used only with userspace irq chip. If > env->kvm_cpu_state.init == 1 update_regs_for_init() is called > three line above and it will set kvm_cpu_state.init to zero. > Right, and nothing can sleep in between. -- error compiling committee.c: too many arguments to function