From: Paolo Bonzini Subject: Re: [PATCH v6] KVM: arm/arm64: Route vtimer events to user space Date: Fri, 23 Sep 2016 14:11:41 +0200 Message-ID: References: <1474628854-69945-1-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9C87949B5B for ; Fri, 23 Sep 2016 08:02:34 -0400 (EDT) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LwFjP4WBhUvq for ; Fri, 23 Sep 2016 08:02:32 -0400 (EDT) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id C12DC49B44 for ; Fri, 23 Sep 2016 08:02:32 -0400 (EDT) Received: by mail-wm0-f67.google.com with SMTP id l132so2488960wmf.1 for ; Fri, 23 Sep 2016 05:11:44 -0700 (PDT) In-Reply-To: <1474628854-69945-1-git-send-email-agraf@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Alexander Graf , kvmarm@lists.cs.columbia.edu Cc: kvm@vger.kernel.org, marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu On 23/09/2016 13:07, Alexander Graf wrote: > + timer_ret = kvm_timer_sync_hwstate(vcpu); > > kvm_vgic_sync_hwstate(vcpu); > > preempt_enable(); > > ret = handle_exit(vcpu, run, ret); > + > + if ((ret == 1) && timer_ret) { > + /* > + * We have to exit straight away to ensure that we only > + * ever notify user space once about a level change > + */ Is this really a requirement? It complicates the logic noticeably. Paolo > + ret = -EINTR; > + run->exit_reason = KVM_EXIT_INTR; > + } > }