From patchwork Fri Feb 9 14:39:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 127846 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp679913ljc; Fri, 9 Feb 2018 06:42:17 -0800 (PST) X-Google-Smtp-Source: AH8x224TCDb/t0JdqDTfSIVhYbc+KqdcNG9J4Wt2tIh48xb2Lc2MtJ/g/n/Debb3UY3ejDTuRB0+ X-Received: by 10.107.9.154 with SMTP id 26mr3273454ioj.52.1518187337132; Fri, 09 Feb 2018 06:42:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518187337; cv=none; d=google.com; s=arc-20160816; b=w18Oz/QxlFUm6NxxsFzT8WnBvtl6dbWyYxTu7U0bLspSztyXi3NHFNAKt36vhoxXIC jvU5JItNMJvS4C06ym5hUMSyh3AjBcvByQMvKxuYJD5XZmphBYtcJe2iLCjuD2KMElLp tfZGSRpKgMc4le4th4hwpBTgGN7CR+rL2we0NaiBLSvf4GWJlT9PnG8pbmwwImYSnnm6 4ZdAnvzycAWf/OOFS24tIXcrTq4Vdx9MBkeDO/zDLOe5dJrARQVl2zP+sorjmPTUlbxk aLEAcQv7IwO+DLay+sHMQyakhhA7pYmoMXUxApQVuYMZEk93O1tw6w26oYwaqHnBvhF1 n3bA== 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:references:in-reply-to:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=Nvyvh/eXGUnm60PsAnB+mmOsgByQk12D2d9AajT+yXA=; b=aeN/qir/8n9ArwwKR/9nHnywueprGAEsP781W7BrBfboRIwOU7o9IelVfx+BKenDTd n2zXyCokCKQ0xFhriAUsx7+Vo2VTb5s4cFKycnXR6o9AJabTIg9BfPteS0sSbHK9uYho rbng6k31tTLpV/MW1laMP3MpY/Hnu8KtnL6qDlNBTsVO7kzGaJ/TPCmZYedT0G4kb9iM voOLFBj8KCbq3zZhMw6DBts4cwyNjvVEuQ5BiNHtZF21xM3sBdi/GPUhqTf3GjaiNaKt Zie2nbwfXmRULxt2N9cPvTJnb/RlNHAghA/iXgstzP/y9pfn8B5/XohVCQOtvfvdCKuG 3Emg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kyAuuI/+; 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 x68si1665328iof.264.2018.02.09.06.42.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 06:42:17 -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=kyAuuI/+; 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 1ek9qq-0001mG-04; Fri, 09 Feb 2018 14:40:32 +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 1ek9qo-0001g0-F9 for xen-devel@lists.xenproject.org; Fri, 09 Feb 2018 14:40:30 +0000 X-Inumbo-ID: 1b71b6fc-0da7-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 1b71b6fc-0da7-11e8-ba59-bc764e045a96; Fri, 09 Feb 2018 15:40:01 +0100 (CET) Received: by mail-wr0-x244.google.com with SMTP id 41so8461913wrc.9 for ; Fri, 09 Feb 2018 06:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=ZvxV5wWpJ3MMGPBw6gbY248ISesx05xZ/TaPiy9yNSI=; b=kyAuuI/+Z5SZWBB80bQw1cb5cvx1H1Hc/6x5xMnF2pM+bDtImfJ+eX1J/rCUKdIcCg fZPYp8loZ4Du1yppe7BleEIC/zeGTt2gn1XyXEaeAP9ldHhj0uEexGKUxLxFFSi+hl3P E7G3xy+0jVpxiGjj+AdoYmzD/nF5vAAy8cudw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=ZvxV5wWpJ3MMGPBw6gbY248ISesx05xZ/TaPiy9yNSI=; b=EUa5aa4opD27+B5myRAIcw82MtLrwAa2gDIMItoWV2uuY0WlrYg0Dx+CuwtaDe2ENU FhNVEoFR3rynQh1/mXpHftLpUV8nYqHKwWJxNfIdevSNjW8uqGORpjLg5GWe4xB8t5YK ssuTN9vhc7AGmMOXQ+cIpeRq7qnf1pzlj6TEcu3f6KqRQ1KaTxRwETByQXDNU6K0UYOR F6hajIyiuzr7KgpV1hQCAHbNGwVfOaZV3JUQ1Ut0ezZnsGjo6/p2O1cCcPSx8aGP/X2k U/+zXBLby+/t9SrNx4ejDeAFBEMWVNlaECAL/gYQD0YYMcjz0sY/0jHG6oXH3TWFk1e9 UUVQ== X-Gm-Message-State: APf1xPBMtlUyBVoqGDrI2cUVabFKy1kEAEiaZ2jrEkVGilzWtdmNRAgx T675eazPXg3nTfwv2JBRbF8QMg== X-Received: by 10.223.172.52 with SMTP id v49mr2568241wrc.125.1518187228378; Fri, 09 Feb 2018 06:40:28 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id b35sm2552229wra.13.2018.02.09.06.40.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Feb 2018 06:40:27 -0800 (PST) From: Andre Przywara To: Stefano Stabellini , Julien Grall , xen-devel@lists.xenproject.org Date: Fri, 9 Feb 2018 14:39:29 +0000 Message-Id: <20180209143937.28866-42-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180209143937.28866-1-andre.przywara@linaro.org> References: <20180209143937.28866-1-andre.przywara@linaro.org> Subject: [Xen-devel] [RFC PATCH 41/49] ARM: new VGIC: dump virtual IRQ info 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" When we dump guest state on the Xen console, we also print the state of IRQs that are on a VCPU. Add the code to dump the state of an IRQ handled by the new VGIC. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic/vgic.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xen/arch/arm/vgic/vgic.c b/xen/arch/arm/vgic/vgic.c index 3b475ed1a4..97ffdba5ad 100644 --- a/xen/arch/arm/vgic/vgic.c +++ b/xen/arch/arm/vgic/vgic.c @@ -757,6 +757,19 @@ void vgic_free_virq(struct domain *d, unsigned int virq) clear_bit(virq, d->arch.vgic.allocated_irqs); } +void gic_dump_vgic_info(struct vcpu *v) +{ + struct vgic_cpu *vgic_cpu = &v->arch.vgic_cpu; + struct vgic_irq *irq; + + list_for_each_entry(irq, &vgic_cpu->ap_list_head, ap_list) + printk(" on CPU: %s %s irq %u: %spending, %sactive, %senabled\n", + irq->hw ? "hardware" : "virtual", + irq->config == VGIC_CONFIG_LEVEL ? "level" : "edge", + irq->intid, irq_is_pending(irq) ? "" : "not ", + irq->active ? "" : "not ", irq->enabled ? "" : "not "); +} + struct irq_desc *vgic_get_hw_irq_desc(struct domain *d, struct vcpu *v, unsigned int virq) {