Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp160828ybh; Tue, 17 Mar 2020 20:21:49 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtC97PODIF9Hbssv0bOhp8V3BJoRgcqf5ihue/t5+LIukHarR7oURPJMRSYyjleW8+vn7HF X-Received: by 2002:aca:dc8b:: with SMTP id t133mr1673591oig.98.1584501709701; Tue, 17 Mar 2020 20:21:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584501709; cv=none; d=google.com; s=arc-20160816; b=X9gArgAqj27Z6qZbHBdET2LUUc18GVRLFL/YHK8XcguFvUPu4zZlTSIEzsFo4qp+N+ WfjYST+/UQU3vN+81l4yuVPwE9AQhptk4bPRbuG4reQ7meE/6XGpLKY5AX8CqzvJUw3/ VLI/K5CKIbg9CwACboybQpV56ZrkrQOOCGQfAk21KpwQJRse4GcXzEAJNO9wvF4i+6u/ /cKXFFcwNRH0JWPK61aZY4ZmCgvV96G+j0btOqw+byhUerEAKWmm2ZJXmiRO2rjv5w7Q FDGSkYSxapfyKWCTISzfrHacu9V5pfh4lcqDy3h2S6Om9J9i8HYATkj4ioaLP8CETHzl AD6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=h7nlndIdbuCAOm41yuOE3sfjNhgaFDTt+BE8cyersB0=; b=CRQZF2Ezv5RVgROK7fv9VroW2diYYlv3sqx59p6+t5+OUGey2YZi7gMFFi4FhHMlBH 4b+ifoV9oZk2r9lCwB4jW+CqJWG/KhnDI9pnRuKTcODBGO54t/apZ9NNuRHg1MX1sLak EoFghobCYKPHJ5drAcT/rtGIfjA6RNvTZRODCJqwZuGlPzOmXQTnf332QQzzLZ7m3AjB yATSJPMKY5GbRExFumgVM2PzFtCUASerceNsSziaDNCjvlA9cf4/6Gi8tEIPzyaV70Hn MZVSsboMBSreEQlUpdzC2lgrdxSNQSQL2TKlBShShrBw11PtmZG/W3ONr7Sit/wtcW+a /J0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v18si2939755oth.1.2020.03.17.20.21.37; Tue, 17 Mar 2020 20:21:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726767AbgCRDUT (ORCPT + 99 others); Tue, 17 Mar 2020 23:20:19 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:47092 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726229AbgCRDUT (ORCPT ); Tue, 17 Mar 2020 23:20:19 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 1177339079FA78282461; Wed, 18 Mar 2020 11:20:10 +0800 (CST) Received: from [127.0.0.1] (10.173.222.27) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Wed, 18 Mar 2020 11:19:59 +0800 Subject: Re: [PATCH v5 23/23] KVM: arm64: GICv4.1: Expose HW-based SGIs in debugfs To: Marc Zyngier , , , , CC: Lorenzo Pieralisi , Jason Cooper , Robert Richter , "Thomas Gleixner" , Eric Auger , "James Morse" , Julien Thierry , Suzuki K Poulose References: <20200304203330.4967-1-maz@kernel.org> <20200304203330.4967-24-maz@kernel.org> From: Zenghui Yu Message-ID: <850438a7-2549-8b89-8d09-ee30198c4c6e@huawei.com> Date: Wed, 18 Mar 2020 11:19:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20200304203330.4967-24-maz@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.222.27] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 2020/3/5 4:33, Marc Zyngier wrote: > The vgic-state debugfs file could do with showing the pending state > of the HW-backed SGIs. Plug it into the low-level code. > > Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Thanks > --- > virt/kvm/arm/vgic/vgic-debug.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/virt/kvm/arm/vgic/vgic-debug.c b/virt/kvm/arm/vgic/vgic-debug.c > index cc12fe9b2df3..b13a9e3f99dd 100644 > --- a/virt/kvm/arm/vgic/vgic-debug.c > +++ b/virt/kvm/arm/vgic/vgic-debug.c > @@ -178,6 +178,8 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq, > struct kvm_vcpu *vcpu) > { > char *type; > + bool pending; > + > if (irq->intid < VGIC_NR_SGIS) > type = "SGI"; > else if (irq->intid < VGIC_NR_PRIVATE_IRQS) > @@ -190,6 +192,16 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq, > if (irq->intid ==0 || irq->intid == VGIC_NR_PRIVATE_IRQS) > print_header(s, irq, vcpu); > > + pending = irq->pending_latch; > + if (irq->hw && vgic_irq_is_sgi(irq->intid)) { > + int err; > + > + err = irq_get_irqchip_state(irq->host_irq, > + IRQCHIP_STATE_PENDING, > + &pending); > + WARN_ON_ONCE(err); > + } > + > seq_printf(s, " %s %4d " > " %2d " > "%d%d%d%d%d%d%d " > @@ -201,7 +213,7 @@ static void print_irq_state(struct seq_file *s, struct vgic_irq *irq, > "\n", > type, irq->intid, > (irq->target_vcpu) ? irq->target_vcpu->vcpu_id : -1, > - irq->pending_latch, > + pending, > irq->line_level, > irq->active, > irq->enabled, >