From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BCD8C43441 for ; Thu, 15 Nov 2018 15:06:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F4B420818 for ; Thu, 15 Nov 2018 15:06:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F4B420818 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388548AbeKPBOd (ORCPT ); Thu, 15 Nov 2018 20:14:33 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35708 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388294AbeKPBOd (ORCPT ); Thu, 15 Nov 2018 20:14:33 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0A26BEBD; Thu, 15 Nov 2018 07:06:21 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C3F723F5BD; Thu, 15 Nov 2018 07:06:20 -0800 (PST) Date: Thu, 15 Nov 2018 15:06:19 +0000 Message-ID: <868t1uwfbo.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Peng Hao Cc: , , , Subject: Re: [PATCH] kvm: arm/arm64 : fix vm's hanging at startup time In-Reply-To: <1542294848-73839-1-git-send-email-peng.hao2@zte.com.cn> References: <1542294848-73839-1-git-send-email-peng.hao2@zte.com.cn> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Nov 2018 15:14:08 +0000, Peng Hao 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 > --- > 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.