linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Peng Hao <peng.hao2@zte.com.cn>
Cc: <christoffer.dall@arm.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<kvmarm@lists.cs.columbia.edu>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]  kvm: arm/arm64 : fix vm's hanging at startup time
Date: Thu, 15 Nov 2018 15:06:19 +0000	[thread overview]
Message-ID: <868t1uwfbo.wl-marc.zyngier@arm.com> (raw)
In-Reply-To: <1542294848-73839-1-git-send-email-peng.hao2@zte.com.cn>

On Thu, 15 Nov 2018 15:14:08 +0000,
Peng Hao <peng.hao2@zte.com.cn> wrote:
> 
> When virtual machine starts, hang up. The kernel version of guest
> is 4.16. Host support vgic_v3.
> It was mainly due to the incorrect vgic_irq's(intid=27) group value
> during injection interruption. when kvm_vgic_vcpu_init is called,
> dist is not initialized at this time. Unable to get vgic V3 or V2
> correctly, so group is not set.
> group is setted to 1 when vgic_mmio_write_group is invoked at some
> time.
> when irq->group=0 (intid=27), No ICH_LR_GROUP flag was set and
> interrupt injection failed.
> 
> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
> ---
>  virt/kvm/arm/vgic/vgic-v3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/arm/vgic/vgic-v3.c b/virt/kvm/arm/vgic/vgic-v3.c
> index 9c0dd23..d101000 100644
> --- a/virt/kvm/arm/vgic/vgic-v3.c
> +++ b/virt/kvm/arm/vgic/vgic-v3.c
> @@ -198,7 +198,7 @@ void vgic_v3_populate_lr(struct kvm_vcpu *vcpu, struct vgic_irq *irq, int lr)
>  	if (vgic_irq_is_mapped_level(irq) && (val & ICH_LR_PENDING_BIT))
>  		irq->line_level = false;
>  
> -	if (irq->group)
> +	if (model == KVM_DEV_TYPE_ARM_VGIC_V3)
>  		val |= ICH_LR_GROUP;
>  
>  	val |= (u64)irq->priority << ICH_LR_PRIORITY_SHIFT;

This patch makes exactly zero sense. The group is a property of the
interrupt, and has nothing to do with the model used for the emulation

Which version of the kernel is this against? What userspace are you
using? How can I reproduce this issue?

Thanks,

	M.

-- 
Jazz is not dead, it just smell funny.

  parent reply	other threads:[~2018-11-15 15:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 15:14 [PATCH] kvm: arm/arm64 : fix vm's hanging at startup time Peng Hao
2018-11-15  9:42 ` Julien Thierry
2018-11-15 14:39 ` Andre Przywara
2018-11-15 15:06 ` Marc Zyngier [this message]
     [not found] <201811160823399069106@zte.com.cn>
2018-11-16 10:03 ` Julien Thierry
     [not found]   ` <201811171058376326562@zte.com.cn>
2018-11-19  9:10     ` Mark Rutland
2018-11-19  9:26       ` Marc Zyngier
2018-11-19 12:49       ` Marc Zyngier
     [not found]         ` <201811211656540883310@zte.com.cn>
2018-11-21 11:06           ` Christoffer Dall
2018-11-21 12:17             ` Julien Thierry
2018-11-21 15:24               ` Christoffer Dall
2018-11-21 15:53                 ` Julien Thierry
2018-11-22 10:45                   ` Christoffer Dall
     [not found]             ` <201811231401560886603@zte.com.cn>
2018-11-23 10:03               ` Christoffer Dall
     [not found] <201811151822532422079@zte.com.cn>
2018-11-15 11:10 ` Julien Thierry

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=868t1uwfbo.wl-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=christoffer.dall@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peng.hao2@zte.com.cn \
    /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).