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 4B309C4332F for ; Tue, 12 Dec 2023 17:16:54 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x9x/5CLwyrCsh3DVLplDkQdIvYeRiWUX4OX4EJKjOkc=; b=q30FIpAzGgngEW jECAZKdr17iEqRuMQLGnXPwvQ6hQlpEfpi7+DAGZOQQFXnidqusrbDFUbAypJM0V0drvTzDksoUzr i3pM88pn7eQ+AK4MYWUE1qQMn18qO0VcWkGgxfVi6ZLTCrQU+JcNEWgwYnfDm5n1Ll4UO0BEw6ZWc LvkJSraCXItH3YBqHW3luplbAJ9Td9U3QPdN2BTB021Ql7kBcVSdktn5Ej+puhle858OxqjboJWWe iBpprWeZtTqPXRtJEe+MD1J1S+4HR6RmPtqVI9VNF2zCIA386k0vUaIT2txjs6EcjEZFfV3R17+YS P43F/WMtQcvQwvdGJsqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rD6Mu-00CLng-0U; Tue, 12 Dec 2023 17:16:28 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rD6Mo-00CLm4-0t for linux-arm-kernel@lists.infradead.org; Tue, 12 Dec 2023 17:16:23 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4DF63FEC; Tue, 12 Dec 2023 09:17:05 -0800 (PST) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.26.141]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0A73F3F762; Tue, 12 Dec 2023 09:16:17 -0800 (PST) Date: Tue, 12 Dec 2023 17:16:12 +0000 From: Mark Rutland To: Will Deacon Cc: Ard Biesheuvel , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Marc Zyngier Subject: Re: [PATCH v2 1/3] arm64: Avoid enabling KPTI unnecessarily Message-ID: References: <20231127120049.2258650-5-ardb@google.com> <20231127120049.2258650-6-ardb@google.com> <20231127154818.GA8453@willie-the-truck> <20231127163103.GA8627@willie-the-truck> <20231127164127.GB8627@willie-the-truck> <20231128110339.GA9717@willie-the-truck> <20231211113939.GA24899@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231211113939.GA24899@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231212_091622_359348_D9747430 X-CRM114-Status: GOOD ( 19.03 ) 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 Mon, Dec 11, 2023 at 11:39:39AM +0000, Will Deacon wrote: > On Tue, Nov 28, 2023 at 02:13:16PM +0000, Mark Rutland wrote: > > On Tue, Nov 28, 2023 at 11:03:40AM +0000, Will Deacon wrote: > > > On Mon, Nov 27, 2023 at 05:49:21PM +0000, Mark Rutland wrote: > > > > If you want these cases moves back to alternatives-based feature check helpers, > > > > I can go do that. > > > > > > I was thinking of something like the diff below to start with. > > > > Sure; as-is that breaks the hyp offset patching, and we'll need ensure we still > > call hyp_mode_check() before apply_alternatives_all(). In hyp_mode_check() we > > call kvm_compute_layout(), which generates the 'va_mask', 'tag_val', and > > 'tag_lsb' values which are used by the kvm_update_va_mask() patching callback > > (for kern_hyp_va() and __kern_hyp_va()). > > > > I think that can be moved before enable_cpu_capabilities() ratehr than needing > > to be between enable_cpu_capabilities() and apply_alternatives_all(), but I'll > > need to go digging to make certain. > > > > Do you want this as a cleanup for v6.7-rc*, or as something to queue for > > v6.8-rc1? > > Sorry, I keep forgetting to reply to this after we spoke in-person. If > you're able to spin something in the next day or so, I can pick it up for > the next merge window. In the meantime, I'll grab Ard's changes so this can > go on top. I've sent that to: https://lore.kernel.org/linux-arm-kernel/20231212170910.3745497-1-mark.rutland@arm.com/ ... based on the arm64 for-next/fixes branch. Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel