From: Alexander Graf Subject: Re: [PATCH v6] KVM: arm/arm64: Route vtimer events to user space Date: Fri, 23 Sep 2016 14:36:51 +0200 Message-ID: References: <1474628854-69945-1-git-send-email-agraf@suse.de> Mime-Version: 1.0 (1.0) Content-Type: multipart/mixed; boundary="===============5595334666704486149==" Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6D5DD49B63 for ; Fri, 23 Sep 2016 08:27:46 -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 3bFegp1KQe+f for ; Fri, 23 Sep 2016 08:27:45 -0400 (EDT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 2B12349B5D for ; Fri, 23 Sep 2016 08:27:44 -0400 (EDT) In-Reply-To: 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: Paolo Bonzini Cc: kvm@vger.kernel.org, marc.zyngier@arm.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu --===============5595334666704486149== Content-Type: multipart/alternative; boundary=Apple-Mail-664A768C-5FBF-40D0-8DFE-B10CA48E3407 Content-Transfer-Encoding: 7bit --Apple-Mail-664A768C-5FBF-40D0-8DFE-B10CA48E3407 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable > Am 23.09.2016 um 14:11 schrieb Paolo Bonzini : >=20 >=20 >=20 >> On 23/09/2016 13:07, Alexander Graf wrote: >> + timer_ret =3D kvm_timer_sync_hwstate(vcpu); >>=20 >> kvm_vgic_sync_hwstate(vcpu); >>=20 >> preempt_enable(); >>=20 >> ret =3D handle_exit(vcpu, run, ret); >> + >> + if ((ret =3D=3D 1) && timer_ret) { >> + /* >> + * We have to exit straight away to ensure that we only >> + * ever notify user space once about a level change >> + */ >=20 > Is this really a requirement? It complicates the logic noticeably. The alternative would be to track the state on ioctl entry, which Christoffe= r disliked :). Alex --Apple-Mail-664A768C-5FBF-40D0-8DFE-B10CA48E3407 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


Am 23.09.2016 um 14:11 schrieb Paolo Bonzini <pbonzini@redhat.com>:

=


On 23= /09/2016 13:07, Alexander Graf wrote:
+        timer_ret =3D kvm_timer_sync_hwstate(vcpu);=

       kvm_vgic_sy= nc_hwstate(vcpu);

      &= nbsp;preempt_enable();

    &n= bsp;  ret =3D handle_exit(vcpu, run, ret);
+
+        if ((ret =3D=3D 1) && timer_ret= ) {
+     &= nbsp;      /*
+             * We have to exit straig= ht away to ensure that we only
+             * ever notify user spa= ce once about a level change
+             */

Is this really a requirement?  It complicates t= he logic noticeably.

The alternative would b= e to track the state on ioctl entry, which Christoffer disliked :).


Alex

= --Apple-Mail-664A768C-5FBF-40D0-8DFE-B10CA48E3407-- --===============5595334666704486149== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm --===============5595334666704486149==--