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 A2AEB3AC0F4; Fri, 3 Apr 2026 10:31:28 +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=1775212291; cv=none; b=BX6mSs5FSxCnG2zzLPur6eHifJu+nxrD8RJNJO+eAaiNtuMjqE13DI+osNc1izm9Lp4rrBh1FvFNSHVxnNb91nAC3hF1A1cfw2wMGIEfwu6sR9kYOS2H8PlINyelkocTa47SXpQzS+PEPpqduOSZ7keWH7FFjHEXQtHefAve7x0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775212291; c=relaxed/simple; bh=RFoHuYAOuSg8suqDOc5oy+GI9ugNPsS9Z9CDnsI79wM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lo8ZC+12tHgia1FHgYrKZxertDxtoHUCEBzgf0eCZ0GWakB5+CezmpAKoCGouKnhQkYEkUR+e6UsHvslLHURHqPX+kn+5XwzzyJHmYxM87tdYFqfPQS+B5vvuRTyinABCp6vV5TDF3wYv5KbrPP2fogFNLs5UQZWWGuBPxQA7WI= 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=Em5QGKqF; 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="Em5QGKqF" 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 3083415A1; Fri, 3 Apr 2026 03:31:16 -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 994913F915; Fri, 3 Apr 2026 03:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1775212282; bh=RFoHuYAOuSg8suqDOc5oy+GI9ugNPsS9Z9CDnsI79wM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Em5QGKqFHxDxjoGmHrGqLTSRM5oX4iEti0dkapei8+pk30T6omUACran4A6p5K931 uSUuqjuxG+jgQW+FizNyMe6J0oQQ/G+AOb1auXzRffHdvaDS0WszgL20qQdjkuLV4N TGM9wXEMan6QRSPvpjslWYECQLeAOak6XlEbIg4o= Date: Fri, 3 Apr 2026 11:31:18 +0100 From: Catalin Marinas To: Ryan Roberts Cc: Will Deacon , "David Hildenbrand (Arm)" , Dev Jain , Yang Shi , Suzuki K Poulose , Jinjiang Tu , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 1/3] arm64: mm: Fix rodata=full block mapping support for realm guests Message-ID: References: <20260330161705.3349825-1-ryan.roberts@arm.com> <20260330161705.3349825-2-ryan.roberts@arm.com> Precedence: bulk X-Mailing-List: stable@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: On Thu, Apr 02, 2026 at 09:43:59PM +0100, Catalin Marinas wrote: > Another thing I couldn't get my head around - IIUC is_realm_world() > won't return true for map_mem() yet (if in a realm). Can we have realms > on hardware that does not support BBML2_NOABORT? We may not have > configuration with rodata_full set (it should be complementary to realm > support). With rodata_full==false, can_set_direct_map() returns false initially but after arm64_rsi_init() it starts returning true if is_realm_world(). The side-effect is that map_mem() goes for block mappings and linear_map_requires_bbml2 set to false. Later on, linear_map_maybe_split_to_ptes() will skip the splitting. Unless I'm missing something, is_realm_world() calls in force_pte_mapping() and can_set_direct_map() are useless. I'd remove them and either require BBML2_NOABORT with CCA or get the user to force rodata_full when running in realms. Or move arm64_rsi_init() even earlier? -- Catalin