From patchwork Wed Jan 24 18:10:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 125696 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp581024ljf; Wed, 24 Jan 2018 10:13:40 -0800 (PST) X-Google-Smtp-Source: AH8x227ulauNAwrjexO81D9QS9UJzsRQk4EMPs00gvsih+qxDtp61fFi8khWf5Y6tYfUnBax4GSC X-Received: by 10.36.144.198 with SMTP id x189mr2097845itd.94.1516817620409; Wed, 24 Jan 2018 10:13:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516817620; cv=none; d=google.com; s=arc-20160816; b=UOKKxLalRtrrH5pIBAJ6HkPRu6TAix508pF9O7UAUjdou5ea+GZfOZr1GS78/E0KsP JSAq/WMgvlHH9vZMs0/AgfgpOzYXNUiVSAS6FXVgUoQbpnbeyptwP1OOBCQC+hwZR1eD 1Vnu4OPriL2Cxi2KAArHqMAwMEH7jpjjRqgwxH/Fzin0nSd85Jt+20iacwGy3NOSUul8 VIxhRpwk87wR60SCqFseAKcc4wB5V4KlO5nrXJ2dMOLVSe3Aj8cbwvRrcSJE4QUMbXa3 bay8D5t3umfog8vOD0MKOkC+YQzoDaU1lExqdOi+47lsaj/iwnBw/aEcVxnbxCZbRH2W a+pw== 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=3+SOFLS9VZE7fFoViWaJih6PbpiynIt/9CPcdIQE5lw=; b=JgUkAxADQL55Y5FaIS02LDYCGc6WcjfunVIR8tcKfhMfR04yMlrsbf3457Tme+ryd6 oqO+JL19DB9Q2RRBQbC8J4IsgwA3Ai44lGxONJDiRpIbA2jHY9Z6dDWnh7Ip9euGrHuA Wa7mYUIC5CWopG8k/lyKlf0cH4dsXel1N/4KWKKRF+v+ID9GOKFFfDCZgUIuUIW+ZpO6 b3of4lNzb9GqqH51izX8eRvpmRlLo1EZNv82+yFGtFD8EQK1yCw7X30/NmXz2PcKD+63 wm+E2XuTggGWf5Ogq2M/2IjZEdlCCsE80NLZKtEsQs+MPGVnepxIusaZXXiLagKbSfkl zQtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QFlc7x34; 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 z89si619689ita.9.2018.01.24.10.13.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 10:13:40 -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=QFlc7x34; 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 1eePVl-00077r-8b; Wed, 24 Jan 2018 18:11:01 +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 1eePVj-00077k-Rn for xen-devel@lists.xenproject.org; Wed, 24 Jan 2018 18:10:59 +0000 X-Inumbo-ID: ea545cd7-0131-11e8-ba59-bc764e045a96 Received: from mail-wm0-x244.google.com (unknown [2a00:1450:400c:c09::244]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id ea545cd7-0131-11e8-ba59-bc764e045a96; Wed, 24 Jan 2018 19:10:53 +0100 (CET) Received: by mail-wm0-x244.google.com with SMTP id v123so10327142wmd.5 for ; Wed, 24 Jan 2018 10:10:57 -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=bUT9tN+UsZpihetZQoTqsSM/ggqKltf2q95YeouNMqQ=; b=QFlc7x34GkcP1cbWbT7LKZroIozTaF4cDCxhTwy0yrlglrxueCWOh4G09O6TVdo/kS hZIPpaoWJp0pocNj9abWGZbmOKhTMwVR7MHIk4scRo7dzBYxAAA6ssAb0V0F2k8ixwoC RHIFrZQVsnt79LFU85FUy8h7tc4eFtlJsWneE= 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=bUT9tN+UsZpihetZQoTqsSM/ggqKltf2q95YeouNMqQ=; b=tQNKRHFmI6qwPlc6+fxheM4650U/AEux6W22b9K1GpwgQviPVtYsHkAriPIg10gctG xEUfh0igO5DnUCz51cx+s/qkN9+amA0SHstMPnhLwRujirms84XfHLspzDO3LBVv0whF fYIMz+58ShFAsWgqnx+PvrGUAFM6n2hAzD6ijh/fyxqFb0z1aOcYEzj3DTxtda0rykE5 p1r56nh9rFeTMhESWl18+r/tf3UgnGvPFDPhvvowXQ06WGoSCL+DMBuvElu2o/MGYDIb uedx0wuE9lMWoa2cMZM8hCvXTsPHVRY1WaeLNLZ9h1VfF85sTNr2Od3lBepRLNDoi4GS VcSQ== X-Gm-Message-State: AKwxytdM0oJBoCYdQ8Z3mJrcrzzvvOI4K0l34H6ZFFJhR747Sgt/Q/VA SrO1EysEo36jZgTBu4ncwpHTnw== X-Received: by 10.28.17.17 with SMTP id 17mr5919236wmr.123.1516817456521; Wed, 24 Jan 2018 10:10:56 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id r68sm899379wmd.47.2018.01.24.10.10.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jan 2018 10:10:56 -0800 (PST) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Wed, 24 Jan 2018 18:10:53 +0000 Message-Id: <20180124181058.6157-4-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180124181058.6157-1-andre.przywara@linaro.org> References: <20180124181058.6157-1-andre.przywara@linaro.org> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH v3 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 a74ff1c07c..8d7f1b7138 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 98df84e3d5..0a2958c5db 100644 --- a/xen/arch/arm/gic-vgic.c +++ b/xen/arch/arm/gic-vgic.c @@ -400,6 +400,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 587a14f8b9..b51b485c20 100644 --- a/xen/include/asm-arm/gic.h +++ b/xen/include/asm-arm/gic.h @@ -285,6 +285,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);