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 9C82EC05027 for ; Thu, 26 Jan 2023 08:54:00 +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=N/BqdP15Ye04XvIXZEAZZ+I0J6BMCvkFXyxBKQE91Ik=; b=JPqV3aXxEAvqaw Qm9IcR/EsJ/3Lof5zH411u/BKzWBKMsw3KljFSLcjrbT//BNZ8uTovRBTj8ymvMeVjgjtV4CNYE5w DxHZGdzxGkpAIRtRbRFpcvfmBx41jcRLg0iYHq23pU30k8aczFXQEPuUJBDFTxSRth4qRjSB5q92a GrgxFLRWuQPlYmh2kwcdjdnKCVNtBc2N/wywMpQCpYBWWQwIyCdbQanYZ2lCvMhgwg6HS/ZJ/W+Yj PG1HSZetfDuA56V4+QqcwrpeYKN2ryMFxFAf7UBRRRhRB041jbKlmsPA1Ho5ma8WZqDwk/O5gCBo+ 9iYrgO2gnbJU2j0ONqag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKy04-00A7yP-Vf; Thu, 26 Jan 2023 08:52:53 +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 1pKxzW-00A7ie-DT for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2023 08:52:19 +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 EDEA8B81D16; Thu, 26 Jan 2023 08:52:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97FC1C433EF; Thu, 26 Jan 2023 08:52:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674723136; bh=zxNB0X2nRu78QLsLGKB5LhkmS+bHQwBSgC0L81wm1sY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EsajPeT97ZulEYon12a+k0X5GjmX63Itf8lqfkWv+fatimPIux+AlPNeft+iQXlzY kJPjIa38JFEmnkP8lLJgYGrXeawMEnMnD+AcPFQ7aBLxmmAy6jS9tkZFeZzAHbd4Wo davmKw7hg4HOPUuLXpEYKMMYtS35txZxbULcqBgiTu5zhojNRhxscTEPCDUIdqq3d+ 6iwOoY/oLmernRsaYoHX89tLD5BBl1MgacydwVaf19rJ+IAJQ89QtmMUgQfjftmZZV 5hIpifTQmBL9J6NpK/iLnjB5wVezxIOm8C2BfRiJSzlSia2MRj+hXaEarVtxq4Biph r1X75wc1b9eOQ== 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 1pKxzS-004lTA-AM; Thu, 26 Jan 2023 08:52:14 +0000 Date: Thu, 26 Jan 2023 08:51:21 +0000 Message-ID: <875yctel12.wl-maz@kernel.org> From: Marc Zyngier To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, broonie@kernel.org, catalin.marinas@arm.com, will@kernel.org Subject: Re: [PATCH v2 0/5] arm64: pseudo-nmi: elide code when CONFIG_ARM64_PSEUDO_NMI=n In-Reply-To: <20230125163826.496739-1-mark.rutland@arm.com> References: <20230125163826.496739-1-mark.rutland@arm.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: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, broonie@kernel.org, catalin.marinas@arm.com, will@kernel.org 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-20230126_005218_646196_6B3A0034 X-CRM114-Status: GOOD ( 24.64 ) 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 Wed, 25 Jan 2023 16:38:21 +0000, Mark Rutland wrote: > > This series addresses a couple of sub-optimal code generation issues with > arm64's pseudo-nmi support code: > > * Even when CONFIG_ARM64_PSEUDO_NMI=n, we generate alternative code > sequences and alt_instr entries which will never be used. This series > reworks the irqflags code to use alternative branches (with an > IS_ENABLED() check), which allows the alternatives to be elided when > CONFIG_ARM64_PSEUDO_NMI=n. > > * When PMHE is eanbled in HW, we must synchronize PMR updates using a > DSB SY. We take pains to avoid this using a static key to skip the > barrier when PMHE is not in use, but this results in unnecessarily > branchy code. This series replaces the static key with an alternative, > allowing the DSB SY to be relaxed to a NOP. > > These changes make a defconfig kernel a little smaller, and does not > adversely affect the size of a CONFIG_ARM64_PSEUDO_NMI=y kernel. The > structural changes will also make it easier for a subsequent series to > rework the irqflag and daifflag management, addressing some > long-standing edge cases and preparing for ARMv8.8-A's FEAT_NMI. > > I've tested this series under a QEM KVM VM on a ThunderX2 host, and a > QEMU TCG VM on an x86_64 host. I've tested with and without pseudo-NMI > support enabled, and with pseudo-NMI debug and lockdep enabled, using > perf record in system-wide mode. With the couple of nits I mentioned on individual patches addressed: Reviewed-by: Marc Zyngier 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