public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: marc.zyngier@arm•com (Marc Zyngier)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] KVM: arm/arm64: vgic: Fix kvm_vgic_map_is_active's dist check
Date: Fri, 11 Dec 2015 09:16:47 +0000	[thread overview]
Message-ID: <566A947F.8090804@arm.com> (raw)
In-Reply-To: <1449784010-21761-1-git-send-email-christoffer.dall@linaro.org>

On 10/12/15 21:46, Christoffer Dall wrote:
> External inputs to the vgic from time to time need to poke into the
> state of a virtual interrupt, the prime example is the architected timer
> code.
> 
> Since the IRQ's active state can be represented in two places; the LR or
> the distributor, we first loop over the LRs but if not active in the LRs
> we just return if *any* IRQ is active on the VCPU in question.
> 
> This is of course bogus, as we should check if the specific IRQ in
> quesiton is active on the distributor instead.
> 
> Reported-by: Eric Auger <eric.auger@linaro•org>
> Signed-off-by: Christoffer Dall <christoffer.dall@linaro•org>
> ---
>  virt/kvm/arm/vgic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
> index 65461f8..7a2f449 100644
> --- a/virt/kvm/arm/vgic.c
> +++ b/virt/kvm/arm/vgic.c
> @@ -1114,7 +1114,7 @@ bool kvm_vgic_map_is_active(struct kvm_vcpu *vcpu, struct irq_phys_map *map)
>  			return true;
>  	}
>  
> -	return dist_active_irq(vcpu);
> +	return vgic_irq_is_active(vcpu, map->virt_irq);
>  }
>  
>  /*
> 

Damn!

Acked-by: Marc Zyngier <marc.zyngier@arm•com>

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2015-12-11  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 21:46 [PATCH] KVM: arm/arm64: vgic: Fix kvm_vgic_map_is_active's dist check Christoffer Dall
2015-12-11  9:16 ` Marc Zyngier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-12-18 14:05 [PULL take #2] KVM/ARM fixes for v4.4-rc6 Marc Zyngier
2015-12-18 14:05 ` [PATCH] KVM: arm/arm64: vgic: Fix kvm_vgic_map_is_active's dist check Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=566A947F.8090804@arm.com \
    --to=marc.zyngier@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox