Skip to content

Commit

Permalink
KVM: arm/arm64: GICv4: Use pending_last as a scheduling hint
Browse files Browse the repository at this point in the history
When a vPE exits, the pending_last flag is set when there are pending
VLPIs stored in the pending table. Similarily, this flag will be set
when a doorbell interrupt fires, as it indicates the same condition.

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 <cdall@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
  • Loading branch information
Marc Zyngier authored and chazy committed Nov 10, 2017
1 parent 6ce18e3 commit c971968
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions virt/kvm/arm/vgic/vgic.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,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_irqsave(&vgic_cpu->ap_list_lock, flags);

list_for_each_entry(irq, &vgic_cpu->ap_list_head, ap_list) {
Expand Down

0 comments on commit c971968

Please sign in to comment.