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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 5E6E5CCFA1A for ; Tue, 11 Nov 2025 10:16:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1158925.1487309 (Exim 4.92) (envelope-from ) id 1vIlQD-0004M6-FX; Tue, 11 Nov 2025 10:16:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1158925.1487309; Tue, 11 Nov 2025 10:16:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vIlQD-0004Kj-9v; Tue, 11 Nov 2025 10:16:21 +0000 Received: by outflank-mailman (input) for mailman id 1158925; Tue, 11 Nov 2025 10:16:19 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vIlQB-000451-P6 for xen-devel@lists.xenproject.org; Tue, 11 Nov 2025 10:16:19 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 7424ee41-bee7-11f0-980a-7dc792cee155; Tue, 11 Nov 2025 11:16:14 +0100 (CET) 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 4A9EA2F; Tue, 11 Nov 2025 02:16:06 -0800 (PST) Received: from e134099.cambridge.arm.com (e134099.arm.com [10.1.198.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0C0673F63F; Tue, 11 Nov 2025 02:16:12 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7424ee41-bee7-11f0-980a-7dc792cee155 From: Harry Ramsey To: xen-devel@lists.xenproject.org Cc: Luca.Fancellu@arm.com, Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH v2 0/3] Third MPU Series Date: Tue, 11 Nov 2025 10:15:58 +0000 Message-ID: <20251111101601.4171120-1-harry.ramsey@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Implement `setup_mm` for MPU systems. This variant does not require setting up a direct map. To reduce code duplication the common initalisation code for both MPU and MMU Arm64 configurations is refactored into `setup_mm`. Platform-specific setup steps are now handled by a new helper function `setup_mm_helper`. Signed-off-by: Harry Ramsey --- Changes in v2: - Improve clarity with regards to MPU setup in setup_mm and the creation of inclusive regions - Fix code format issues --- Harry Ramsey (3): arm/mpu: Implement setup_mm for MPU systems arm/mpu: Implement reference counting for inclusive regions arm/mpu: Implement ioremap_attr for MPU xen/arch/arm/arm32/asm-offsets.c | 2 + xen/arch/arm/arm64/asm-offsets.c | 2 + xen/arch/arm/arm64/mmu/mm.c | 26 +----- xen/arch/arm/include/asm/arm32/mpu.h | 2 + xen/arch/arm/include/asm/arm64/mpu.h | 2 + xen/arch/arm/include/asm/mm.h | 2 + xen/arch/arm/include/asm/mpu/regions.inc | 11 ++- xen/arch/arm/mm.c | 48 ++++++++++ xen/arch/arm/mpu/mm.c | 114 +++++++++++++++++++---- 9 files changed, 164 insertions(+), 45 deletions(-) -- 2.43.0