From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 472F2C61DA4 for ; Sat, 18 Mar 2023 09:45:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vO2NTjAtAmbjRKKEKrm0XnqMUIICFRNQTZdv2wAN11Y=; b=a97apVQrzqEKpO +wMqhflaJCXTiG9qzpX+5n0Q/mGP5erll/nJNCgPRrSSSZGY/0ri+PPOfpZXNU0sTHKAnJXDiuCD8 hwgbfQnxjweRlP4JjcHLywLc+XF5NPqGpR03lfjr6ZZ4XRXw4MnOHjXOXG93Jby2G+YN86wXVbF8P At/gMqw5P/WyPGAncd+1DCMj6wrVYL1Q7eTL1SeAMjfM31sxVe/fEuAsvjvwp6N/4fLf+L+O8hDfS wYTmrmVL0ILdBh8AkH//bkogNKtD5StI13OZNNvJjaAmzXdZw4bLyQJ8f+6fg6DWvWGXO3L4byMBO criYyGsautcIJuVC3jow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pdT78-004XuO-36; Sat, 18 Mar 2023 09:44:38 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pdT75-004Xty-1T for linux-arm-kernel@lists.infradead.org; Sat, 18 Mar 2023 09:44:37 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 925A360BA1; Sat, 18 Mar 2023 09:44:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4272C433D2; Sat, 18 Mar 2023 09:44:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679132671; bh=mrr0j/khM5AwvcCVKi0xcuU+LE8IekpC3wl3wRwhdZI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sDttUCCpDkq3F7IP3AgfrXkmbBLJR0/619wJJPOrZ3BuW6M6zvasuz/OyW/XsKnly Z18RRZIvaB1Uj0MV8wjkMhR6bVV75qAhHywPnHoDKlPlLd7dSXQaSYYMxhbd6l8xMC sX/YrFPdgAON5HzRKjqYAlzjIA46mUpv2C6i4yZ6rW1loS4RDacTik48ZuHOvDI3Va okE4mn+SIq9agdmC5xcQTi3Kl3/4Y+TIBN8vZJlFhllstOPAOo+u8c81XwclD0vDM7 BZFDHFTfcL8N/ZZwmJY9GL67S9lfwVDqyyG2yqnOjkQZDUDAaLndXeKwtwuVPKLhxA nu92LvN3qihPQ== Received: from [89.213.33.168] (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 1pdT6y-001Ago-Hs; Sat, 18 Mar 2023 09:44:28 +0000 Date: Sat, 18 Mar 2023 09:44:27 +0000 Message-ID: <87wn3egzr8.wl-maz@kernel.org> From: Marc Zyngier To: Shanker Donthineni Cc: Catalin Marinas , Will Deacon , Jonathan Corbet , Mark Rutland , Lorenzo Pieralisi , "Sudeep\ Holla" , Thomas Gleixner , , , , Vikram Sethi , Thierry Reding Subject: Re: [PATCH v4] irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4 In-Reply-To: <20230318045812.2043117-1-sdonthineni@nvidia.com> References: <20230318045812.2043117-1-sdonthineni@nvidia.com> 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/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 89.213.33.168 X-SA-Exim-Rcpt-To: sdonthineni@nvidia.com, catalin.marinas@arm.com, will@kernel.org, corbet@lwn.net, mark.rutland@arm.com, lpieralisi@kernel.org, sudeep.holla@arm.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, vsethi@nvidia.com, treding@nvidia.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230318_024435_595780_E82BB739 X-CRM114-Status: GOOD ( 27.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 18 Mar 2023 04:58:12 +0000, Shanker Donthineni wrote: > > The T241 platform suffers from the T241-FABRIC-4 erratum which causes > unexpected behavior in the GIC when multiple transactions are received > simultaneously from different sources. This hardware issue impacts > NVIDIA server platforms that use more than two T241 chips > interconnected. Each chip has support for 320 {E}SPIs. > > This issue occurs when multiple packets from different GICs are > incorrectly interleaved at the target chip. The erratum text below > specifies exactly what can cause multiple transfer packets susceptible > to interleaving and GIC state corruption. GIC state corruption can > lead to a range of problems, including kernel panics, and unexpected > behavior. > > From the erratum text: > "In some cases, inter-socket AXI4 Stream packets with multiple > transfers, may be interleaved by the fabric when presented to ARM > Generic Interrupt Controller. GIC expects all transfers of a packet > to be delivered without any interleaving. > > The following GICv3 commands may result in multiple transfer packets > over inter-socket AXI4 Stream interface: > - Register reads from GICD_I* and GICD_N* > - Register writes to 64-bit GICD registers other than GICD_IROUTERn* > - ITS command MOVALL > > Multiple commands in GICv4+ utilize multiple transfer packets, > including VMOVP, VMOVI, VMAPP, and 64-bit register accesses." > > This issue impacts system configurations with more than 2 sockets, > that require multi-transfer packets to be sent over inter-socket > AXI4 Stream interface between GIC instances on different sockets. > GICv4 cannot be supported. GICv3 SW model can only be supported > with the workaround. Single and Dual socket configurations are not > impacted by this issue and support GICv3 and GICv4." > > Link: https://developer.nvidia.com/docs/t241-fabric-4/nvidia-t241-fabric-4-errata.pdf > > Writing to the chip alias region of the GICD_In{E} registers except > GICD_ICENABLERn has an equivalent effect as writing to the global > distributor. The SPI interrupt deactivate path is not impacted by > the erratum. > > To fix this problem, implement a workaround that ensures read accesses > to the GICD_In{E} registers are directed to the chip that owns the > SPI, and disables GICv4.x features for KVM. To simplify code changes, > the gic_configure_irq() function uses the same alias region for both > read and write operations to GICD_ICFGR. > > Co-developed-by: Vikram Sethi > Signed-off-by: Vikram Sethi > Signed-off-by: Shanker Donthineni > --- > Changes since v2: > - Fix the build issue for the 32bit arch > Changes since v2: > - Add accessors for the SOC-ID version & revision > - Include "linux/bitfield.h" and "linux/bits.h" in irq-gic-v3.c > Changes since v1: > - Use SMCCC SOC-ID API for detecting the T241 chip > - Implement Marc's suggestions > - Edit commit text You seem to have ignored most of my comments on v2[1] apart from the SOC_ID stuff. I guess I'll wait for v5... M. [1] https://lore.kernel.org/all/871qlqif9v.wl-maz@kernel.org/ -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel