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 6D70DC636D4 for ; Wed, 15 Feb 2023 08:03:35 +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=XXqBO2UgknLETyppH/5XyZZRnre12cDq85oCT4sOjKo=; b=0COwvTRJNR96ca Ch/ix5/h17f/eMib1sz/KciVQHx8y6YfPwEeN0C3yzPtXT0R59Edfpzqre1Q38YuAGEQSy1lBldS2 mn5VQKV3AnTQUDrLh1C0waTZf2NNM69IskAEdsaBEy3vl8H3TEQrW+FR0Z9zOvHPEKBEa97B3VX5V R+OYXf0JyLBR1X/2qFrCb1TSu7IUpG4dDFzgPWAbqfpONhuee4/5g5MegC3kc10/IPc7CRXixY76h z73yiXcysn9EyQVn72GiHQX+Q4K5TO0o5Xj3tb+qJ2bIRjrhW0BKFpRnPmzbv7cVCXpqZPIrgnF4T H6XBjkcmlPb/lLq5aLow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSCkL-0057jL-0A; Wed, 15 Feb 2023 08:02:33 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSCkI-0057iY-FR for linux-arm-kernel@lists.infradead.org; Wed, 15 Feb 2023 08:02:31 +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 ams.source.kernel.org (Postfix) with ESMTPS id 20AF0B82045; Wed, 15 Feb 2023 08:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFF55C433EF; Wed, 15 Feb 2023 08:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676448147; bh=QDjPmZcGUSDtJoHRAZL8Zkp030l2cNP4ARA092+yGBA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qLtB8z4l/Av6UjfwI/XorTC/GS94J/S/RA+feMxvs3nli/F65LWibGxMDRZxmolkm 0q4E0UpkJuTLGc0NiaCedGVDJZ/PqyAl8AoA9cblsPzAhUrrrY4GNeosg3sIhH7tQ3 7u6bQaZj+smSuyPE3uwo3rXSmVZtsvLZg1vN9TJcsRBBzcK/0wKBaM6M35BHFBlXri zecbrQpsn3Je51InFHWPeDf9PubTClJvAf1f+55YoF42Emp1gaXhWODxkhYNg3251H mFr+IWYKcgx94BrX08JnkBEDO3BB5UsUFJWaSlnMLbwYnf+FTYh39YqjXbujvW+e9u eWz4XsHlCR6ng== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] 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 1pSCkC-00AX1J-M7; Wed, 15 Feb 2023 08:02:25 +0000 Date: Wed, 15 Feb 2023 08:02:20 +0000 Message-ID: <87o7pvz78z.wl-maz@kernel.org> From: Marc Zyngier To: Florian Fainelli Cc: linux-arm-kernel@lists.infradead.org, Thomas Gleixner , Oliver Upton , linux-kernel@vger.kernel.org (open list:IRQCHIP DRIVERS), Sudeep Holla , Broadcom internal kernel review list Subject: Re: [PATCH 3/3] irqchip/gic-v3: Save and restore distributor and re-distributor In-Reply-To: <20230214233426.2994501-4-f.fainelli@gmail.com> References: <20230214233426.2994501-1-f.fainelli@gmail.com> <20230214233426.2994501-4-f.fainelli@gmail.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: 185.104.136.29 X-SA-Exim-Rcpt-To: f.fainelli@gmail.com, linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, oliver.upton@linux.dev, linux-kernel@vger.kernel.org, sudeep.holla@arm.com, bcm-kernel-feedback-list@broadcom.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-20230215_000230_675900_94544B34 X-CRM114-Status: GOOD ( 17.10 ) 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 Tue, 14 Feb 2023 23:34:26 +0000, Florian Fainelli wrote: > > On platforms implementing Suspend to RAM where the GIC loses power, we > are not properly saving and restoring the GIC distributor and > re-distributor registers thus leading to the system resuming without any > functional interrupts. The real question is *why* we need any of this. On any decent system, this is the firmware's job. It was *never* the OS GIC driver's job the first place. Importantly, the OS cannot save the full state: a large part of it is only accessible via secure, and Linux doesn't run in secure mode. How do you restore the group configuration, for example? Oh wait, you don't even save it. So unless you have a single security state system, this cannot work. And apart from VMs (which by the way do not need any of this), there is no GICv3-based system without EL3. If you know of one, please let me know. And if it existed, then all the save/restore should happen only when GICD_CTLR.DS==1. To conclude, this patch doesn't do what it advertises, because it *cannot* do it, by definition. The secure firmware is the only place where this can be done. M. -- 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