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 CCD2537756B for ; Mon, 30 Mar 2026 16:17:17 +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=1774887440; cv=none; b=Tygp4ufWozwhwz6XE9X7wNRM7+TWuKLvsk3LLao/fc84D2bfQkK4Cnk12Jw0GS/5/Hlu6beyeCJmO2gY7wjxVsbcEbOBF/qmuQSD+A8iz0UG5vLyC7wRB/C2Bd7x9682IvIvLoMUqKdpRV6aEDv5fxscGmIe5XH+kZYwF6WfBxg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774887440; c=relaxed/simple; bh=q7eHVppponB+OVG/EaWlphb1LoMlAjHq9ZsfT/QF9m4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=exoQhy9XEz+Qz1fx6/8QXsTrv/RAcrr9cSuLO88edoKSVp4/xOi073HwX2kVyJH060LDvho1K96YlKlDGUqz+KtvvLFsOa/BmMcBzDwqjCHrijlgc/dbTBUuatzLU9UwbjEHN0qTu4oEby5PJN/R//7VR/NC7Es3aa0wRfhmeTE= 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=NPoD2YiJ; 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="NPoD2YiJ" 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 4D7181D70; Mon, 30 Mar 2026 09:17:11 -0700 (PDT) Received: from e125769.cambridge.arm.com (e125769.cambridge.arm.com [10.1.196.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CA7643F7D8; Mon, 30 Mar 2026 09:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1774887437; bh=q7eHVppponB+OVG/EaWlphb1LoMlAjHq9ZsfT/QF9m4=; h=From:To:Cc:Subject:Date:From; b=NPoD2YiJYAjG35yxvHP98ypAu7T24EjZdGiCU3YMRwg5fil+zCOHm6oNyKPBvQNGU e7LePj6/lH0FybTE7GS0/ZilXb8Wg2oD4dzKjFUPzo+03DoAZ8WnrFPQfCS1GGKmge cx8Wp8zzlynWCg37aY1PsuVysiY9SIBoyZLlfA+M= From: Ryan Roberts To: Catalin Marinas , Will Deacon , "David Hildenbrand (Arm)" , Dev Jain , Yang Shi , Suzuki K Poulose , Jinjiang Tu , Kevin Brodsky Cc: Ryan Roberts , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] Fix bugs for realm guest plus BBML2_NOABORT Date: Mon, 30 Mar 2026 17:17:01 +0100 Message-ID: <20260330161705.3349825-1-ryan.roberts@arm.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi All, This fixes a couple of bugs in the "large block mappings for linear map when we have BBML2_NOABORT" feature when used in conjunction with a CCA realm guest. While investigating I found and fixed some more general issues too. See commit logs for full explanations. Applies on top of v7.0-rc4. Changes since v1 [1] ==================== Patch 1: - Moved page_alloc_available declaration to asm/mmu.c (per Kevin) - Added PTE_PRESENT_VALID_KERNEL macro to hide VALID|NG confusion (per Kevin) - Improved logic in split_kernel_leaf_mapping() to avoid warning for DEBUG_PAGEALLOC (per Sashiko) Patch 2: - Fixed transitional pgtables to handle present-invalid large leaves (per Sashiko) - Hardened split_pXd() for present-invalid leaves (per Sashiko) Patch 3: - Converted pXd_leaf() to function to avoid multi-eval of READ_ONCE() (per Sashiko) [1] https://lore.kernel.org/all/20260323130317.1737522-1-ryan.roberts@arm.com/ Thanks, Ryan Ryan Roberts (3): arm64: mm: Fix rodata=full block mapping support for realm guests arm64: mm: Handle invalid large leaf mappings correctly arm64: mm: Remove pmd_sect() and pud_sect() arch/arm64/include/asm/mmu.h | 2 + arch/arm64/include/asm/pgtable-prot.h | 2 + arch/arm64/include/asm/pgtable.h | 28 +++++++---- arch/arm64/mm/init.c | 9 +++- arch/arm64/mm/mmu.c | 67 ++++++++++++++++++--------- arch/arm64/mm/pageattr.c | 50 +++++++++++--------- arch/arm64/mm/trans_pgd.c | 42 +++-------------- 7 files changed, 111 insertions(+), 89 deletions(-) -- 2.43.0