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 042A2C25B74 for ; Thu, 16 May 2024 14:32:45 +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=S2sxRfDUdcLvbSHrjyzOzgG2zcb3E6e1VGCjtdrc9Yk=; b=zZWF0tq3srMmP3 nzV0h4l6U0TDGM2u2wLoh04q5EPzOu+9lMPP5myhHzbgi9pOvvnkP6STCCI/mGJTC4oS8f6Fb+Yoq wwaczLw0s2CSYDcXmfHqb4DcCJZf8wUx0ynrZ/COiwFWWHt3P5HXxpDFnb0vKFwRtmAyuJwlNcRNu cQECAR2xHWkG5T7seAD+rcteFOyVygC11+LsC9k9dNBIWwmXcdeG9fLng4K4MrpXn8osSkw5JSx3Q ZPrqSOP9P2/x2Sm9PeRFvQ9xkqZd2mc+ltASF4MIPV9jpe3f9Vcj/P/5yACNbMBnxUkgx72qg7Pnd 1//UkboRp7+T+ztm1QEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7c9k-00000005AP8-1t5q; Thu, 16 May 2024 14:32:28 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7c9g-00000005ALl-1bnN for linux-arm-kernel@lists.infradead.org; Thu, 16 May 2024 14:32:26 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E1FDCCE18C1; Thu, 16 May 2024 14:32:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E2A8C113CC; Thu, 16 May 2024 14:32:10 +0000 (UTC) Date: Thu, 16 May 2024 15:32:08 +0100 From: Catalin Marinas To: Suzuki K Poulose Cc: Steven Price , kvm@vger.kernel.org, kvmarm@lists.linux.dev, Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni Subject: Re: [PATCH v2 02/14] arm64: Detect if in a realm and set RIPAS RAM Message-ID: References: <20240412084213.1733764-1-steven.price@arm.com> <20240412084213.1733764-3-steven.price@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240516_073225_282960_22E2B231 X-CRM114-Status: GOOD ( 24.01 ) 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, May 14, 2024 at 11:18:13AM +0100, Suzuki K Poulose wrote: > On 10/05/2024 18:35, Catalin Marinas wrote: > > On Fri, Apr 12, 2024 at 09:42:01AM +0100, Steven Price wrote: > > > +void arm64_setup_memory(void) > > > > I would give this function a better name, something to resemble the RSI > > setup. Similarly for others like set_memory_range_protected/shared(). > > Some of the functions have 'rsi' in the name like arm64_rsi_init() but > > others don't and at a first look they'd seem like some generic memory > > setup on arm64, not RSI-specific. > > Ack. arm64_rsi_setup_memory() ? I agree, we should "rsi" fy the names. This should work. We also have rsi_*() functions without any 'arm64' but those are strictly about communicating with the RMM, so that's fine. > > > @@ -293,6 +294,8 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) > > > * cpufeature code and early parameters. > > > */ > > > jump_label_init(); > > > + /* Init RSI after jump_labels are active */ > > > + arm64_rsi_init(); > > > parse_early_param(); > > > > Does it need to be this early? It's fine for now but I wonder whether we > > may have some early parameter at some point that could influence what we > > do in the arm64_rsi_init(). I'd move it after or maybe even as part of > > the arm64_setup_memory(), though I haven't read the following patches if > > they update this function. > > We must do this before we setup the "earlycon", so that the console > is accessed using shared alias and that happens via parse_early_param() :-(. Ah, ok, makes sense. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel