From patchwork Thu Dec 7 16:14:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 121016 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8556261qgn; Thu, 7 Dec 2017 08:16:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMYYBEVSkj9fatI1gWQstb0oIs8XUThKvW7obdFN7D87gie8pYtCtUldcaRRIVV27U67oVFB X-Received: by 10.107.11.91 with SMTP id v88mr39602724ioi.179.1512663398231; Thu, 07 Dec 2017 08:16:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512663398; cv=none; d=google.com; s=arc-20160816; b=ZViaHTw8qquI9jWDp68uRSKJXq3Roqt8puaho+ln+PEOKOsPn7QiZO5fxpS1rA1qzs 8+7Nq3zF52SrN/i0vAk75SDPSvzqyAcEsI+Z0SpWZ6S7NIBzfizgucwF3B8vgBEMuE1G jv4utELC6cB+Bm/sXxRh8WJe8EISvT6IDNLT+wE8QSGdq/G+KKIdUKReq+V4Xs+ahPZz 03sMkFzeFWTl5ymHzie3YvTW22IM8yiKPYiTL4HRHW0Da+P8LasIkW9KAsA52hvn0lLI UwoLSd4Q5OERWk3b6fQ/o61zSxZFc5s6lyxpv2TuWruC7PbQUtPp0T3IizHTHNQmTv0Q VOLA== 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=O5B7jipqttgvLFzIkA1xDbEdzJ5k5mAsORu9Px+8vHY=; b=ZVnvfrjha0AJecxDP1aEH6Zo/RcZNMR7ABJ9zdE9IQ1zYiysSPISmuTYlGNAAIxwGG xzSPEIt0tr9hH0xWFSziyhgqtmFyXbS5aGqbPRynzlMoWr0lMB5MPSLEaqe3mhVnT3YP WR6MNlmlIONJ0E5ivkCGbyxordMafksVgUd8yBryF79SAVRVchiIN/7sRlEggoxkQf/+ Ik32ctDneuVDRKg1hTXqtX1Y0cxUgQnrqs5VostP9YJmrFPbLyG7qxt0M48/Hu0S8JfQ ECflmEy2keH2cQCGGBNiGnXtu65mxUGpkKRbBf2sakq/zn5ArfLw2CS3u0Z0guHoH1Yu 7s9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=H5Bl3PEL; 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 f125si4128314ith.62.2017.12.07.08.16.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 08:16:38 -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=H5Bl3PEL; 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 1eMyoZ-0002CL-2r; Thu, 07 Dec 2017 16:14:23 +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 1eMyoY-0002Bq-9z for xen-devel@lists.xenproject.org; Thu, 07 Dec 2017 16:14:22 +0000 X-Inumbo-ID: a097a898-db69-11e7-b4a6-bc764e045a96 Received: from mail-wr0-x241.google.com (unknown [2a00:1450:400c:c0c::241]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id a097a898-db69-11e7-b4a6-bc764e045a96; Thu, 07 Dec 2017 17:13:57 +0100 (CET) Received: by mail-wr0-x241.google.com with SMTP id v22so8072856wrb.0 for ; Thu, 07 Dec 2017 08:14:21 -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=xMnnDoDtGI7U7bf0jwWfY3DX/E1vL+jtB9ll6iu82ic=; b=H5Bl3PELVV4eYm7gUxt4+SGd/FZgC4RtDeQXVoLM+otQOtKnFmdzXsf6le7DrV+RYL otyAAMvelBO63QoBG5lX8OYY5yKQPQGKCk+FYE91xw/Cuc1O6+QFLVMKqRzB7xa8cdgL OnXsO5R8VT68EteOk7bUu4wy+nnkh6MtieKjk= 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=xMnnDoDtGI7U7bf0jwWfY3DX/E1vL+jtB9ll6iu82ic=; b=A/So6abgcjX8ypqtjC+ksWSsbi7XIzwaw/E3ZIjUQmw8tC0akpQ+eyMf56Jo23oz5b WutXNy3JyUWJdm1xxK4JbkHx6lWB694StjBv4M+TvBAFQpRhKR9jfbVobVLvmzHuLPCF wNMIZB+3mGvGDuwWfbzg2MUjB8jFEM3wVVe8culAJEj0qu7sHxUs/auS9/NX/7209caC WANgqlimHuoUNFG2akLuJELpM2ZP62SmkkW0tktWQmFgAgCfg3cCRITctrZbroKCzCPj MPQWpGYVqy/enqFoiRb5qJJj75HJbvgGECzEXThADg8p3lmqPx2vfHC7+yIPABBlnM9j CJDQ== X-Gm-Message-State: AJaThX7wob/yynqMaB4a5sKiA1cDUy6GLE9zdqt/otCIcaWbXyJEkPcp 5rP8npHrD8KRA4pnr9BT7PwyOQ== X-Received: by 10.223.195.113 with SMTP id e46mr22892403wrg.149.1512663260111; Thu, 07 Dec 2017 08:14:20 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id f18sm6090624wrg.66.2017.12.07.08.14.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Dec 2017 08:14:19 -0800 (PST) From: Andre Przywara To: Stefano Stabellini , Julien Grall Date: Thu, 7 Dec 2017 16:14:11 +0000 Message-Id: <20171207161415.20380-7-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171207161415.20380-1-andre.przywara@linaro.org> References: <20171207161415.20380-1-andre.przywara@linaro.org> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH v2 06/10] 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 73f4d4b2b2..5d2943b800 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -942,6 +942,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 971b3bfe37..90b827c574 100644 --- a/xen/arch/arm/gic-vgic.c +++ b/xen/arch/arm/gic-vgic.c @@ -403,6 +403,17 @@ void gic_inject(struct vcpu *v) gic_hw_ops->update_hcr_status(GICH_HCR_UIE, 1); } +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 28cf16654a..4f4fd555c1 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);