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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2F59C433F5 for ; Mon, 20 Dec 2021 16:49:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232072AbhLTQtB (ORCPT ); Mon, 20 Dec 2021 11:49:01 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:34046 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237112AbhLTQs7 (ORCPT ); Mon, 20 Dec 2021 11:48:59 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id D59ADB80E22 for ; Mon, 20 Dec 2021 16:48:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95413C36AE2; Mon, 20 Dec 2021 16:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640018936; bh=5ihySwJ5y2hKi7bVdPtbp3EMwutWSo79JXHlA2mWp8c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=D6MsX7a1uAx26hCw/EjhZjzNnvJA/fuviGpv5svcXhyCPtjZL75F+UfzWgrn0NI6Z DV0cGlvPudrVz4z5NnkTd8W7LznIVIBDVR2LJX8kqWW7UTWlx6K2+kK8vBSoslarMh q3uPkSAii3yV/lryweRMRxXBQ8VdMPpTaY6ApHyUUPLBXROOARTsDfPAWa+Ij43g6o iglnEk73gxOIB4PZZssCQOuL4vVXWTKJyqj2MMNJj9LsjOupLztkH+g9dGo91inkFS duRl6jm/8BAjJ4kawH1rGtwLRMo3NN2fIcFm/wqOJt4o+/mXOcMtghCj99PcQzg9k+ 32ZW9gqHwhKNw== Received: from cfbb000407.r.cam.camfibre.uk ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mzLqI-00DLyU-JY; Mon, 20 Dec 2021 16:48:54 +0000 Date: Mon, 20 Dec 2021 16:48:54 +0000 Message-ID: <874k73w7bd.wl-maz@kernel.org> From: Marc Zyngier To: Lorenzo Pieralisi Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , kernel-team@android.com, Jay Chen Subject: Re: [PATCH] irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time In-Reply-To: <20211216190315.GA14220@lpieralisi> References: <20211216144804.1578566-1-maz@kernel.org> <20211216190315.GA14220@lpieralisi> 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") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: lorenzo.pieralisi@arm.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, kernel-team@android.com, jkchen@linux.alibaba.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Dec 2021 19:03:15 +0000, Lorenzo Pieralisi wrote: > > On Thu, Dec 16, 2021 at 02:48:04PM +0000, Marc Zyngier wrote: > > Jay Chen reported that using a kdump kernel on a GICv4.1 system > > results in a RAS error being delivered when the secondary kernel > > configures the ITS's view of the new VPE table. > > > > As it turns out, that's because each RD still has a pointer to > > the previous instance of the VPE table, and that particular > > implementation is very upset by seeing two bits of the HW that > > should point to the same table with different values. > > > > To solve this, let's invalidate any reference that any RD has to > > the VPE table when discovering the RDs. The ITS can then be > > programmed as expected. > > It makes sense. I believe there is an additional question though, > related to ITSes sharing the VPE table (SVPET) with RDs. > > IIUC, all ITSes within a given affinity (that therefore are sharing the > VPE table) need to be quiesced before allocating a new VPE table. Yes, there is that too. I think we need a first pass iterating over the ITSs and invalidate their VPE table pointers, as they may well be in a shared state. If they are, the ITSs would be liable to generating RAS errors as well, just like we just saw when sharing the table between ITS and RDs. > Again, I am off the radar for a while and this patch makes sense on its > own, just raising the question since I was trying to understand whether > that can be an additional issue to solve on kexec; I will follow up > on this query. Yeah, please ping me in the new year if you don't hear from me, and we'll fix that one too. > It would be nice to know Alibaba's GIC HW topology if possible. Indeed. > Thanks for putting together the fix and merging it. Thanks, M. -- Without deviation from the norm, progress is not possible.