Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBFC9C433B4 for ; Sun, 25 Apr 2021 20:13:41 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9EB7E61260 for ; Sun, 25 Apr 2021 20:13:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EB7E61260 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.117300.223095 (Exim 4.92) (envelope-from ) id 1lal88-0001QW-KA; Sun, 25 Apr 2021 20:13:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 117300.223095; Sun, 25 Apr 2021 20:13:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lal88-0001QP-H7; Sun, 25 Apr 2021 20:13:24 +0000 Received: by outflank-mailman (input) for mailman id 117300; Sun, 25 Apr 2021 20:13:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lal87-0001QF-BU for xen-devel@lists.xenproject.org; Sun, 25 Apr 2021 20:13:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lal86-0000nv-CE; Sun, 25 Apr 2021 20:13:22 +0000 Received: from 54-240-197-235.amazon.com ([54.240.197.235] helo=ufe34d9ed68d054.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lal86-0005m7-0Y; Sun, 25 Apr 2021 20:13:22 +0000 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:Cc:To:From; bh=X15PJsfA8ZZe0WJ5gNkzuQ01mz4/pctOMdwEQyJoq0Y=; b=aki4KyKmRPMzQcN3N664q1pYhD VFTvNwGwcH5NDAaoSfIoOX7a3w5naRxH6VpTQlXTZrvpODwI6KALAvbnX9pN+rUvHY/fGka9pMnlo LfzN1dbaGBsRsREAT4kOMZIk8AcysTciftxSL0sCPKwO0b4lZ63OKFn6Kh/D6G1gAUSw=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: Wei.Chen@arm.com, Henry.Wang@arm.com, Penny.Zheng@arm.com, Bertrand.Marquis@arm.com, Julien Grall , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Jan Beulich , Wei Liu , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Hongian Xia Subject: [PATCH RFCv2 00/15] xen/arm: mm: Remove open-coding mappings Date: Sun, 25 Apr 2021 21:13:03 +0100 Message-Id: <20210425201318.15447-1-julien@xen.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Julien Grall Hi all, This series was originally sent as "xen/arm: mm: Add limited support for superpages" [1] and finally has grown enough to remove most of the open-coding mappings in the boot code. This will help to: 1) Get better compliance with the Arm memory model 2) Pave the way to support other page size (64KB, 16KB) This is not fully finished (only boot tested on Arm64) but I sent it early to get more testing and also unblock some of the on-going work to support static memory allocation for dom0less (see [2]). There are still a few TODOs: - Add support for setting the contiguous bits - Remove 1GB alignment in setup_xenheap_mappings() - Decide whether we want to provide a common PMAP Cheers, [1] <20201119190751.22345-1-julien@xen.org> [2] Julien Grall (14): xen/arm: lpae: Rename LPAE_ENTRIES_MASK_GS to LPAE_ENTRY_MASK_GS xen/arm: lpae: Use the generic helpers to defined the Xen PT helpers xen/arm: p2m: Replace level_{orders, masks} arrays with LEVEL_{ORDER, MASK} xen/arm: mm: Allow other mapping size in xen_pt_update_entry() xen/arm: mm: Avoid flushing the TLBs when mapping are inserted xen/arm: mm: Don't open-code Xen PT update in remove_early_mappings() xen/arm: mm: Re-implement early_fdt_map() using map_pages_to_xen() xen/arm32: mm: Check if the virtual address is shared before updating it xen/arm32: mm: Re-implement setup_xenheap_mappings() using map_pages_to_xen() xen/arm: mm: Allocate xen page tables in domheap rather than xenheap xen/arm: mm: Allow page-table allocation from the boot allocator xen/arm: mm: Use the PMAP helpers in xen_{,un}map_table() xen/arm: mm: Rework setup_xenheap_mappings() xen/arm: mm: Re-implement setup_frame_table_mappings() with map_pages_to_xen() Wei Liu (1): xen/arm: add Persistent Map (PMAP) infrastructure xen/arch/arm/Makefile | 1 + xen/arch/arm/mm.c | 362 +++++++++++++++++------------------ xen/arch/arm/p2m.c | 16 +- xen/arch/arm/pmap.c | 101 ++++++++++ xen/arch/arm/setup.c | 10 +- xen/include/asm-arm/config.h | 6 + xen/include/asm-arm/lpae.h | 83 ++++---- xen/include/asm-arm/page.h | 4 + xen/include/asm-arm/pmap.h | 10 + 9 files changed, 356 insertions(+), 237 deletions(-) create mode 100644 xen/arch/arm/pmap.c create mode 100644 xen/include/asm-arm/pmap.h -- 2.17.1