From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7115F305695 for ; Thu, 28 May 2026 16:06:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779984405; cv=none; b=N5tBQZM695/Y/xKJv8cr5NBWCvl2t7a/EOO5+7QQOBcdc8GYoUe0NlEAbekw9DQXOsP8DDNxYSOi0/PGT8JA17nB62hD1AvuNjNi7zQIJ4QNMsOYp9kTpTmE0AZf+dvDJ2QqY5s/q9JMdGAK8Hl1E8Gh8sW7/o3vT9FPSCfb8QU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779984405; c=relaxed/simple; bh=NX8pGsjXpWIOj8RHTxeL1h/KeK5pNVRCwcxkfpVvbuU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U1+59V6ERWAINU80v0bnfboSDoq4xAVpMYIqp4pA6TikpJR59wRoK0oJbxeCxaUJjWpplyMjomnZNUPi2GEudOIzhbIvUN2QHWDq1x8BCsfc3v74P1R8CxjtOcZ0UvyQe074Qma1JTfTvPFPP9rQR44c6ssPZ0dpjpX6YoKOaxg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=t8V5UgnI; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="t8V5UgnI" 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 B2C6C22BE; Thu, 28 May 2026 09:06:38 -0700 (PDT) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DDB903F905; Thu, 28 May 2026 09:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1779984403; bh=NX8pGsjXpWIOj8RHTxeL1h/KeK5pNVRCwcxkfpVvbuU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t8V5UgnIN094t19F9kgtm9FSUpQWps81SskOL2BCBHytyJPJY0gkIWS5Ygv+EusIE anNP5uvIUxtNdq7qM7avQR/sThshe7UXh0NeCahwa3eXnqrKXOav9PobLCVTCWqQCW G8zTOKw1j+oE7GfOjMxIF18U9YSAn1TtYh3gNrB4= Date: Thu, 28 May 2026 17:06:39 +0100 From: Catalin Marinas To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, ardb@kernel.org, lpieralisi@kernel.org, mark.rutland@arm.com, steven.price@arm.com, aneesh.kumar@kernel.org, sudeep.holla@arm.com, robh@kernel.org, maz@kernel.org Subject: Re: [RFC PATCH v2 0/4] arm64: realm: Support for probing RSI earlier Message-ID: References: <20260505155742.623287-1-suzuki.poulose@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260505155742.623287-1-suzuki.poulose@arm.com> Hi Suzuki, On Tue, May 05, 2026 at 04:57:38PM +0100, Suzuki K Poulose wrote: > This is an updated series, addressing the review comments from AI agent on > the version 1 [0] of the series, (some of which were documented as short comings). > See below for the changes. > > The Realm Guest linux support is broken without rodata=full (fortunately default > for arm64), as we detect the RSI support after we have created the Linear map > with Block/Contiguous mappings. If the boot CPU doesn't support BBML2_NOABORT > (there are CPUs out there with FEAT_RME and no - useable - BBML2_NOABORT) > we are then not able to split the page tables down to PTE level if the system > as such doesn't support BBML2. > > See the following link for the discussion. > > https://lore.kernel.org/all/20260330161705.3349825-2-ryan.roberts@arm.com/ > > The available options are : > 1. Start with PTE level mappings at paging_init() and then "FOLD" the page tables > to Block/Cont mappings after we have the full picture available. Looking at the > future (with BBML3), this might mean "additional work" for most of the systems > at boot. But not bad as splitting them ? > 2. Hold the secondary CPUs in busy loop with MMU disabled and split the mappings > by the boot CPU with MMU off (if Boot CPU can't support BBML2). This is tricky > with the page allocations required to add the page-tables. > 3. Move the detection of Realm support earlier to make a better decision for > paging_init(), with an added bonus of earlycon support for Realms without > the user having to work out the "top bit" for the Realm. > > This series is an attempt to implement (3) (without the earlycon support). We try > to probe the PSCI conduit early from the DT/ACPI. DT is not flattened at this time. Looking at the patches, I'm no longer sure it's worth justifying the complexity. Trying to recall the previous thread - does it only matter if BBML2_NOABORT is not supported and the kernel boots with rodata=off? I guess we can ignore big.LITTLE configurations for now since the deployment of CCA doesn't target mobile yet. Could we instead add a more informative message in arm64_rsi_init() if !force_pte_mappings() && !cpu_supports_bbml2_noabort() (before is_realm_world() becomes true)? Well, it may not print anything if the early console is not set up yet. -- Catalin