From patchwork Tue Feb 6 17:08:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 127058 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3107671ljc; Tue, 6 Feb 2018 09:11:23 -0800 (PST) X-Google-Smtp-Source: AH8x225cI52QpAY+8A/ptQ6iUJebXBK8JYchFgh/4d0s5bUXjDS2xQfGcg5QXRoSKBWMNq6HQH4p X-Received: by 10.107.146.86 with SMTP id u83mr3639375iod.3.1517937083168; Tue, 06 Feb 2018 09:11:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517937083; cv=none; d=google.com; s=arc-20160816; b=GvqjdmgBAtUpAgnxWSfelJw7q06se1JGQtaCUU1AUHWxxHcqEyuXxLGzM2T71dIOsn baixN5ea9u0OZDGFENobI8oybNl8TFZb2wqO/msQz7LozNrgZPI1riGybtathwjHpq+h 1tCHfxD03QGvzM2QYsnlPNI7CSNjxvq04K2ahKi3mo1Wdb5qgmPCKqBDiB4ISECkH9p/ Cz+R8oeojuVxhclqv+530cK+yozTPhhJxntm9t2Ya3IkyYSYUsPRfen21pVPCk4Usw/o +4s5vfZRpm6c60HIW9c4a6VxMNIkDu2kYgwKVOXDj/Qvn97CceQW3FkVV7IuuVrZR9Eh DBbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=j0baPCtF8vxiGIaoZtx4TAUrWT46p9jfJhQ9hKLuCEA=; b=bF71tCv1h68Mu1rxON7q+rOxe3pIOOv1C7clkJqZs1R79s2mBwEys8iTgsfagg5vcY sa8JizgZ0wkJotxVOXakjs8ad1L6o4pVp09WjpK3TSL8WI1E7ImXaZP11A27VteTA+EN yv78uGdOSmt1ysNPh3/IrP3uh0D8cHG14QZAQSouyeNZlRTeHYiPNsNh7QdfnnVlEEG1 S4Syz2dpTLDdSmPmHxsHunP8RpKNN2vJZX6I/DuMhDaZ21HyA+GjUVpOPEmKros8Yjoy s3XJijCbBL/SGpJYbSpPEvJT82YeE6vDKFAmI4LDWyGJXp4iHQkuSk7QX+i2bK2Cbvye hgkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jRADkLVY; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id d1si4486646ita.57.2018.02.06.09.11.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 09:11:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jRADkLVY; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ej6k7-0003nN-Oh; Tue, 06 Feb 2018 17:09:15 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ej6k6-0003ml-So for xen-devel@lists.xenproject.org; Tue, 06 Feb 2018 17:09:14 +0000 X-Inumbo-ID: 662c7e4a-0b60-11e8-ba59-bc764e045a96 Received: from mail-wr0-x244.google.com (unknown [2a00:1450:400c:c0c::244]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 662c7e4a-0b60-11e8-ba59-bc764e045a96; Tue, 06 Feb 2018 18:08:50 +0100 (CET) Received: by mail-wr0-x244.google.com with SMTP id w50so2732771wrc.2 for ; Tue, 06 Feb 2018 09:09:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=V9O0yGbfbuwKE/Jn6ep1USi8h8sFNcBXxxsx4NjUgQM=; b=jRADkLVYQFd8H/vga7U2gNMaL2Tj2nEVtvoGkjJAkCMdOaWxbfAZK99MhuWpzoISt3 MAyyRt5PMmC1x5rcpo5f8VSlWnPAfVmGKDu4kJbruxCCHr0kZXHRWia5no41c74uuQqG N1XMxLiWk+4lNyJt88q4N1Zyr8ECK29PClBD8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V9O0yGbfbuwKE/Jn6ep1USi8h8sFNcBXxxsx4NjUgQM=; b=O0ifYHI/N18OxriYMz7uZFQtrTAnurq6rKdf7md9AW00lpsKTobaUhCfFP7CEFEaHA MI/DpGS3G52w+bHMa3kSWeJugIFFUA+Wx+stCpyQMorj7OLgnuUrj6Tc8tJF+lnB6KQf PTJfm5ZSIji3ej0LXpW/2axSLMPdvc3tL5+Gwv6J0t4OpKIyNeWel8QjRQhMB1yRzWAD n3C0vNm8Oc9ZI8W+v/IUnUwzSUBa30S2Hb/LgZG1ufsG/4tPlzAwCZLXDVfcIVPU+g45 pAM392mQDQoXt8f1aWdjpQLqicgXJ70YcbWB0DvmRAdzO9qackilBs5QGtkFRogZtcpB pmdw== X-Gm-Message-State: APf1xPB0nQZ4arXbg0UUdOL3GMkXrCgC29TZTXuHfYeb9dp48MWkSGay rnUQocOldhDcOq5T445S/Y2kqQ== X-Received: by 10.223.184.200 with SMTP id c8mr2967869wrg.105.1517936952678; Tue, 06 Feb 2018 09:09:12 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id n2sm7885819wra.41.2018.02.06.09.09.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Feb 2018 09:09:12 -0800 (PST) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Tue, 6 Feb 2018 17:08:58 +0000 Message-Id: <20180206170903.30637-4-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180206170903.30637-1-andre.przywara@linaro.org> References: <20180206170903.30637-1-andre.przywara@linaro.org> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH v5 3/8] ARM: VGIC: split up gic_dump_info() to cover virtual part separately X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Currently gic_dump_info() not only dumps the hardware state of the GIC, but also the VGIC internal virtual IRQ lists. Split the latter off and move it into gic-vgic.c to observe the abstraction. Signed-off-by: Andre Przywara Reviewed-by: Stefano Stabellini --- xen/arch/arm/domain.c | 1 + xen/arch/arm/gic-vgic.c | 11 +++++++++++ xen/arch/arm/gic.c | 12 ------------ xen/include/asm-arm/gic.h | 1 + 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index eb8c8f6176..a010443bfd 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -941,6 +941,7 @@ long arch_do_vcpu_op(int cmd, struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg) void arch_dump_vcpu_info(struct vcpu *v) { gic_dump_info(v); + gic_dump_vgic_info(v); } void vcpu_mark_events_pending(struct vcpu *v) diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c index 74d8ea7c96..8221ae557c 100644 --- a/xen/arch/arm/gic-vgic.c +++ b/xen/arch/arm/gic-vgic.c @@ -386,6 +386,17 @@ void gic_inject(void) gic_hw_ops->update_hcr_status(GICH_HCR_UIE, true); } +void gic_dump_vgic_info(struct vcpu *v) +{ + struct pending_irq *p; + + list_for_each_entry ( p, &v->arch.vgic.inflight_irqs, inflight ) + printk("Inflight irq=%u lr=%u\n", p->irq, p->lr); + + list_for_each_entry( p, &v->arch.vgic.lr_pending, lr_queue ) + printk("Pending irq=%d\n", p->irq); +} + /* * Local variables: * mode: C diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 04e6d66b69..4cb74d449e 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -443,20 +443,8 @@ static void maintenance_interrupt(int irq, void *dev_id, struct cpu_user_regs *r void gic_dump_info(struct vcpu *v) { - struct pending_irq *p; - printk("GICH_LRs (vcpu %d) mask=%"PRIx64"\n", v->vcpu_id, v->arch.lr_mask); gic_hw_ops->dump_state(v); - - list_for_each_entry ( p, &v->arch.vgic.inflight_irqs, inflight ) - { - printk("Inflight irq=%u lr=%u\n", p->irq, p->lr); - } - - list_for_each_entry( p, &v->arch.vgic.lr_pending, lr_queue ) - { - printk("Pending irq=%d\n", p->irq); - } } void init_maintenance_interrupt(void) diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h index 71e5354427..1a142d6e9f 100644 --- a/xen/include/asm-arm/gic.h +++ b/xen/include/asm-arm/gic.h @@ -287,6 +287,7 @@ extern void send_SGI_allbutself(enum gic_sgi sgi); /* print useful debug info */ extern void gic_dump_info(struct vcpu *v); +extern void gic_dump_vgic_info(struct vcpu *v); /* Number of interrupt lines */ extern unsigned int gic_number_lines(void);