From: Marc Zyngier <marc.zyngier@arm.com>
To: Andrew Jones <drjones@redhat.com>, kvmarm@lists.cs.columbia.edu
Cc: cdall@linaro.org
Subject: Re: [PATCH 5/5] KVM: arm/arm64: kvm_arch_vcpu_runnable: don't miss injected irqs
Date: Thu, 5 Oct 2017 10:37:32 +0100 [thread overview]
Message-ID: <f94ab402-e108-baf7-1d4f-9e465a5b0f7f@arm.com> (raw)
In-Reply-To: <20170929113041.24371-6-drjones@redhat.com>
On 29/09/17 12:30, Andrew Jones wrote:
> When the vPMU is in use if a VCPU's perf event overflow handler
> were to fire after the VCPU started waiting, then the wake up
> done by the kvm_vcpu_kick() call in the handler would do nothing,
> as no "pmu overflow" state is checked in kvm_arch_vcpu_runnable().
> Fix this by checking the IRQ_PENDING VCPU request in runnable().
> Checking the request also sufficiently covers all the cases that
> kvm_vgic_vcpu_pending_irq() cover, so we can just replace that.
>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
> virt/kvm/arm/arm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
> index 5bc9b0d2fd0f..725527f491e4 100644
> --- a/virt/kvm/arm/arm.c
> +++ b/virt/kvm/arm/arm.c
> @@ -423,7 +423,7 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
> return !vcpu_should_sleep(vcpu) &&
> (vcpu->arch.mp_state != KVM_MP_STATE_HALTED ||
> (!!vcpu->arch.irq_lines ||
> - kvm_vgic_vcpu_pending_irq(vcpu)));
> + kvm_test_request(KVM_REQ_IRQ_PENDING, vcpu)));
> }
>
> bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu)
>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
On a side note, I just had a look at our usage of KVM_REQ_IRQ_PENDING,
and we always seem to have a make_request/kick pair (which definitely
makes sense). Maybe there is room for a bit of consolidation there too.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2017-10-05 9:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 11:30 [PATCH 0/5] kvm_arch_vcpu_runnable related improvements Andrew Jones
2017-09-29 11:30 ` [PATCH 1/5] KVM: arm/arm64: tidy 'should sleep' conditions Andrew Jones
2017-10-05 8:13 ` Marc Zyngier
2017-09-29 11:30 ` [PATCH 2/5] KVM: arm/arm64: replace power_off with mp_state=STOPPED Andrew Jones
2017-10-05 8:32 ` Marc Zyngier
2017-10-10 13:26 ` Andrew Jones
2017-10-14 19:12 ` Christoffer Dall
2017-10-18 12:04 ` Andrew Jones
2017-09-29 11:30 ` [PATCH 3/5] KVM: arm/arm64: factor out common wfe/wfi emulation code Andrew Jones
2017-10-05 8:36 ` Marc Zyngier
2017-10-14 19:13 ` Christoffer Dall
2017-10-18 12:06 ` Andrew Jones
2017-09-29 11:30 ` [PATCH 4/5] KVM: arm/arm64: improve kvm_arch_vcpu_runnable Andrew Jones
2017-10-05 9:19 ` Marc Zyngier
2017-10-14 19:13 ` Christoffer Dall
2017-10-18 12:09 ` Andrew Jones
2017-09-29 11:30 ` [PATCH 5/5] KVM: arm/arm64: kvm_arch_vcpu_runnable: don't miss injected irqs Andrew Jones
2017-10-05 9:37 ` Marc Zyngier [this message]
2017-10-10 13:28 ` Andrew Jones
2017-10-14 19:13 ` Christoffer Dall
2017-10-18 12:13 ` Andrew Jones
2017-10-18 13:18 ` Christoffer Dall
2017-10-18 13:55 ` Andrew Jones
2017-10-18 14:14 ` Christoffer Dall
2017-10-02 8:31 ` [PATCH 6/5] KVM: arm/arm64: make kvm_vgic_vcpu_pending_irq static Andrew Jones
2017-10-05 9:37 ` 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=f94ab402-e108-baf7-1d4f-9e465a5b0f7f@arm.com \
--to=marc.zyngier@arm.com \
--cc=cdall@linaro.org \
--cc=drjones@redhat.com \
--cc=kvmarm@lists.cs.columbia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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