From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964793AbdKGViK (ORCPT ); Tue, 7 Nov 2017 16:38:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45898 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934101AbdKGViI (ORCPT ); Tue, 7 Nov 2017 16:38:08 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5CDD66A7D2 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eric.auger@redhat.com Subject: Re: [PATCH v5 18/26] KVM: arm/arm64: GICv4: Use pending_last as a scheduling hint To: Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171027142855.21584-1-marc.zyngier@arm.com> <20171027142855.21584-19-marc.zyngier@arm.com> Cc: Mark Rutland , Christoffer Dall , Andre Przywara , Shameerali Kolothum Thodi , Christoffer Dall , Shanker Donthineni From: Auger Eric Message-ID: Date: Tue, 7 Nov 2017 22:38:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20171027142855.21584-19-marc.zyngier@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 07 Nov 2017 21:38:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 27/10/2017 16:28, Marc Zyngier wrote: > When a vPE exits, the pending_last flag is set when there are > pending VLPIs stored in the pending table. Similarily, we set > this flag when a doorbell interrupt fires, as it indicates the > same condition. This is actually done in the next patch. Besides: Reviewed-by: Eric Auger Thanks Eric > > Let's update kvm_vgic_vcpu_pending_irq() to account for that > flag as well, making a vcpu runnable when set. > > Acked-by: Christoffer Dall > Signed-off-by: Marc Zyngier > --- > virt/kvm/arm/vgic/vgic.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c > index 9d557efd1f7d..0691a2250949 100644 > --- a/virt/kvm/arm/vgic/vgic.c > +++ b/virt/kvm/arm/vgic/vgic.c > @@ -769,6 +769,9 @@ int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu) > if (!vcpu->kvm->arch.vgic.enabled) > return false; > > + if (vcpu->arch.vgic_cpu.vgic_v3.its_vpe.pending_last) > + return true; > + > spin_lock(&vgic_cpu->ap_list_lock); > > list_for_each_entry(irq, &vgic_cpu->ap_list_head, ap_list) { >