From: Marc Zyngier <marc.zyngier@arm.com>
To: Pavel Fedin <p.fedin@samsung.com>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Cc: Christoffer Dall <christoffer.dall@linaro.org>,
Eric Auger <eric.auger@linaro.org>
Subject: Re: [PATCH v2 1/3] KVM: arm: Fix NULL pointer dereference if KVM is used without in-kernel irqchip
Date: Fri, 17 Jul 2015 17:47:51 +0100 [thread overview]
Message-ID: <55A931B7.4000905@arm.com> (raw)
In-Reply-To: <644bce2849b89bc8520c7efcb7752c92e31f9ccd.1436874248.git.p.fedin@samsung.com>
On 14/07/15 13:06, Pavel Fedin wrote:
> Makes qemu working again with kernel-irqchip=off option
I'd appreciate a better commit log. Which patch broke it, why is that
necessary.
>
> Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
> ---
> arch/arm/kvm/arm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
> index d9631ec..5668c4e 100644
> --- a/arch/arm/kvm/arm.c
> +++ b/arch/arm/kvm/arm.c
> @@ -450,7 +450,7 @@ static int kvm_vcpu_first_run_init(struct kvm_vcpu *vcpu)
> * Map the VGIC hardware resources before running a vcpu the first
> * time on this VM.
> */
> - if (unlikely(!vgic_ready(kvm))) {
> + if (irqchip_in_kernel(kvm) && unlikely(!vgic_ready(kvm))) {
I think you should factor the irqchip_in_kernel() inside the unlikely
clause. Something like
bool vgic_needs_init = irqchip_in_kernel(kvm) && !vgic_ready(kvm);
if (unlikely(vfic_needs_init)) {
...
}
> ret = kvm_vgic_map_resources(kvm);
> if (ret)
> return ret;
>
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2015-07-17 16:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 12:06 [PATCH v2 0/3] KVM: arm/arm64: Allow to use KVM without in-kernel irqchip Pavel Fedin
2015-07-14 12:06 ` [PATCH v2 1/3] KVM: arm: Fix NULL pointer dereference if KVM is used " Pavel Fedin
2015-07-17 16:47 ` Marc Zyngier [this message]
2015-07-19 14:19 ` Pavel Fedin
2015-07-14 12:06 ` [PATCH v2 2/3] KVM: arm: Detect vGIC presence at runtime Pavel Fedin
2015-07-17 17:14 ` Marc Zyngier
2015-07-14 12:06 ` [PATCH v2 3/3] KVM: arm64: Introduce default dummy save/restore functions Pavel Fedin
2015-07-14 12:28 ` Marc Zyngier
2015-07-14 13:02 ` Pavel Fedin
2015-07-16 13:30 ` Christoffer Dall
2015-07-14 14:15 ` Pavel Fedin
2015-07-17 16:59 ` [PATCH v2 0/3] KVM: arm/arm64: Allow to use KVM without in-kernel irqchip Marc Zyngier
2015-07-19 14:05 ` Pavel Fedin
2015-07-20 8:08 ` Marc Zyngier
2015-07-22 7:19 ` Pavel Fedin
2015-07-23 16:48 ` Marc Zyngier
2015-07-24 15:27 ` Pavel Fedin
2015-07-24 16:06 ` Marc Zyngier
2015-07-26 12:50 ` Pavel Fedin
2015-07-27 7:28 ` Marc Zyngier
2015-07-27 8:36 ` Pavel Fedin
2015-07-27 9:02 ` 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=55A931B7.4000905@arm.com \
--to=marc.zyngier@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=eric.auger@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=p.fedin@samsung.com \
/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;
as well as URLs for NNTP newsgroup(s).