From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v8 11/15] ARM: KVM: World-switch implementation Date: Mon, 02 Jul 2012 16:07:49 +0300 Message-ID: <4FF19D25.8080809@redhat.com> References: <20120615190553.24590.18391.stgit@ubuntu> <20120615190845.24590.52952.stgit@ubuntu> <4FDF3013.5040904@redhat.com> <4FE0436F.8070408@redhat.com> <4FE2D7B9.9060401@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: android-virt@lists.cs.columbia.edu, kvm@vger.kernel.org To: Christoffer Dall Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53470 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750861Ab2GBNIC (ORCPT ); Mon, 2 Jul 2012 09:08:02 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 06/21/2012 08:54 PM, Christoffer Dall wrote: >>> @@ -504,6 +514,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu >>> *vcpu, struct kvm_run *run) >>> */ >>> preempt_disable(); >>> local_irq_disable(); >>> + >>> + if (check_new_vmid_gen(kvm)) { >>> + local_irq_enable(); >>> + preempt_enable(); >>> + continue; >>> + } >>> + >> >> I see the same race with signals. Your signal_pending() check needs to >> be after the local_irq_disable(), otherwise we can enter a guest with a >> pending signal. >> > > that's not functionally incorrect though is it? It may simply increase > the latency for the signal delivery as far as I can see, but I > definitely don't mind changing this path in any case. Nothing guarantees that there will be a next exit. I think we still run the timer tick on guest entry, so we'll exit after a few milliseconds, but there are patches to disable the timer tick if only one task is queued. -- error compiling committee.c: too many arguments to function