Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp335275rbb; Sat, 24 Feb 2024 02:41:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUKxoh8BETiCOiCnlCdxKW/wa6PrnBYjVv3u6rfzIXz0V/IpLbDxFuSUe9OYYEAOkF747RKjdydJoyi1/PILkqksnwNCxGJiOyIy4qnQg== X-Google-Smtp-Source: AGHT+IFkx719Z+Xxpnd1eriUFYrQObParq6E+/9AwalLKCmz344pSWIAVK6RhFdTlBG2beP6mTbt X-Received: by 2002:ad4:5764:0:b0:68f:89fe:28f2 with SMTP id r4-20020ad45764000000b0068f89fe28f2mr3627741qvx.9.1708771308268; Sat, 24 Feb 2024 02:41:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708771308; cv=pass; d=google.com; s=arc-20160816; b=hkwmiY/exTtOou/57fWUllqDq9GqXidJKR1EtO/cFsIj9B5h93x8t3BYV2GyJTe7yy P+ItFhBhKt6wZEC9NKBfpBbEzOT/jCc+JA9HGocXAMg21iGGK97byrzf4GKyBWlMuGsI 3Gw16xsI9z3rl1xrXx4Fvkq2SvdwRMd9tXLBh8C9eTHXcVkkSbbGbJ+yVW+tC/7koNY2 021XcAABq/k8G9LSeW7llGXhKWrhVOAeXV4bcsfW4ycIGuB7W9VxvGDoG5TgVitZT9AC AUvLgiJvwwi4Y+Gj28lz1p1nDhnI2354u4oAFnma+Wfx/XNbVLGoausit+RNZfuJGWIL 3dpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=rQyJPttulzwhDaqk/c4sTu+30igf3eKTA1ylD0MY9TE=; fh=dQXs0JPyEGmDvoejdwrM02hyCH/9ccLc5zzjeSl+udU=; b=A12ikd1KK5bfRzcOwNjJOLRHOjDmQ7VF74F6vAUVkxXPNMFPBLtoUBH//TMzdUZ2Lt x2p/uS7QqYt/7JOv+QkptIgFaqwgNypP4NSFZflCd7bnTCmduliteKkgem50Qzt22/D5 f0ck3Xv6RuuVRPE98TorueWQbhEOZvOJuzPwd7zfIVcBpG0ZUosc4OWAhGLcAW5GDGiI co920g8azIgR97IuN3sOi9os50CNzLerwYAdwh2zt3U63Sa1UKQaCVDyDQNDO2tRQPyr Dhadl3o0FngTw52H8Z0FUcP9SzauGRwuASIXiFsNXcfWkPnBLktA/Hy9zWvmyjUzq6kC 3SlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Uq2+nPV2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79570-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gg5-20020a056214252500b0068fe2d4317asi771074qvb.604.2024.02.24.02.41.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 02:41:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79570-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Uq2+nPV2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79570-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E6C121C218DA for ; Sat, 24 Feb 2024 10:41:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5453AD54; Sat, 24 Feb 2024 10:41:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Uq2+nPV2" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB0041B59C; Sat, 24 Feb 2024 10:41:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708771300; cv=none; b=LoFuZZ5C7OLbjlH4WDbm9QK8b2LxHkUr6u/xWtMsQtLOC1zDUVciOUtmVHsA0VspTgr/cGSWbGZV8nMQwfbcrZZsgWd23YZI6ICpMptux1cslf6BYidLnNkFMcsd4DZs29GWbKDjWPBkEDXDgzaGPHQkssLgKLI/eUu2ecThWaQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708771300; c=relaxed/simple; bh=El8Tx8z+w76H7TlIq7DwaR1/BFADl77wHAkdidcCCz8=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=MDuiEca6lIWBxyZadc/Q82ccyj4QV3ZYlJFjG9Lzr3W4hn6TyV8q86tKL1pgGQmFU6F3Oi3bAKwVSWkjMrUP1Khop4JEMNdjXwJ14MbOTR0csHmD5SvnTHJZDQuVFA2XvjUCid3KJrUctMegy/wgtFTEqklgnXdkRXPL+i94Qo0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Uq2+nPV2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C44DC433F1; Sat, 24 Feb 2024 10:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708771300; bh=El8Tx8z+w76H7TlIq7DwaR1/BFADl77wHAkdidcCCz8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Uq2+nPV2qDwwRd+8SJWZySXM2Z+a7VuqZIuLvLBUsVm72UcgEzLzd6O+4FgUsAwol dqSU6YsThde29eWsnyRpckCzQWrMh8NwZ7zOdzesnILnuKtbLwbt4DN/6QzvUvsJ0e oXasKsvHbQwZlCRpVVAc2WkvEgkcoVfNh67W5HiWgWo0JpXxBGSur4dfWen0AiUUfC 3kfS5OVx9+qfov6D0xne2nZimNoepeBVtGcZkSg3lePyOkiF6hqWNp04b3YSf5uSlu IdiIKAZCMeHXcHYijfvEsbPgplSdwgj1TFVfOVD9lymGN9NPZkn5dZMHr9mFV+/uvj O+cyHr8F1D4GQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rdpTN-006Lh6-RL; Sat, 24 Feb 2024 10:41:37 +0000 Date: Sat, 24 Feb 2024 10:41:36 +0000 Message-ID: <87bk869man.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Thomas Gleixner , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, Jing Zhang Subject: Re: [PATCH 3/3] irqchip/gic-v3-its: Print the vPE table installed in redistributor In-Reply-To: <20240219185809.286724-4-oliver.upton@linux.dev> References: <20240219185809.286724-1-oliver.upton@linux.dev> <20240219185809.286724-4-oliver.upton@linux.dev> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, tglx@linutronix.de, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, jingzhangos@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Mon, 19 Feb 2024 18:58:08 +0000, Oliver Upton wrote: >=20 > Hindsight is 20/20 of course, but the recent vPE table programming bug > could've been root caused a bit more quickly if we print the table > getting installed at every redistributor. >=20 > Promote to pr_info() and add some additional context, such as the > provenance of the installed vPE table. >=20 > Signed-off-by: Oliver Upton > --- > drivers/irqchip/irq-gic-v3-its.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v= 3-its.c > index 63d1743f08cc..c3ef9665a2ad 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -2835,7 +2835,8 @@ static int allocate_vpe_l1_table(void) > u64 val, gpsz, npg, pa; > unsigned int psz =3D SZ_64K; > unsigned int np, epp, esz; > - struct page *page; > + struct page *page =3D NULL; > + bool from_its =3D false; > =20 > if (!gic_rdists->has_rvpeid) > return 0; > @@ -2865,8 +2866,10 @@ static int allocate_vpe_l1_table(void) > return -ENOMEM; > =20 > val =3D inherit_vpe_l1_table_from_its(); > - if (val & GICR_VPROPBASER_4_1_VALID) > + if (val & GICR_VPROPBASER_4_1_VALID) { > + from_its =3D true; > goto out; > + } nit: from_its =3D val & GICR_VPROPBASER_4_1_VALID; if (from_its) ... > =20 > /* First probe the page size */ > val =3D FIELD_PREP(GICR_VPROPBASER_4_1_PAGE_SIZE, GIC_PAGE_SIZE_64K); > @@ -2945,9 +2948,12 @@ static int allocate_vpe_l1_table(void) > gicr_write_vpropbaser(val, vlpi_base + GICR_VPROPBASER); > cpumask_set_cpu(smp_processor_id(), gic_data_rdist()->vpe_table_mask); > =20 > - pr_debug("CPU%d: VPROPBASER =3D %llx %*pbl\n", > - smp_processor_id(), val, > - cpumask_pr_args(gic_data_rdist()->vpe_table_mask)); > + pr_info("CPU%d: Using %s vPE table @%llx (%s)\n", > + smp_processor_id(), > + (val & GICR_VPROPBASER_4_1_INDIRECT) ? "indirect" : "direct", > + val & GICR_VPROPBASER_4_1_ADDR, > + (page) ? "allocated" : > + ((from_its) ? "inherited from ITS" : "inherited from RD")); =46rom past experience, having the vpe_table_mask value displayed did help tracking VPE table affinity bugs. This said, my problem with this patch is that we already have tons of these statement printed once per CPU/RD. This is really huge and accounts for a significant part of the boot time on large machines (64+ CPUs). Before we add more of those, I'd really want to have a way to tone them down and only print them at runtime *if* required by the user. Kind of a dymanic debug, but driven from the command-line and present early enough. What do you think? M. --=20 Without deviation from the norm, progress is not possible.