From patchwork Wed Oct 17 16:34:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 10645915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4B55157A for ; Wed, 17 Oct 2018 16:37:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B104D283AF for ; Wed, 17 Oct 2018 16:37:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A52DF1FF82; Wed, 17 Oct 2018 16:37:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 45F621FF82 for ; Wed, 17 Oct 2018 16:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=8msc1Te80MCz3RzdIP5nWVRwPMdEj2tMFRGqM7oRtFs=; b=g3W QocrK//PVcVPFho23qjMEjmwi/hhwoLvXpcZdwnm+x07JayiAY8QHzUY6vPU0v21C7cJXvPS75wYI BaWHsCmcAhsPGWFIXcfmz9smpxjzJNfV8WRmx+BScoR93g5v2h1rpaHCDRxfiODzva9UZt3pD6vqR pe+CV8UXsMGK1qyb56EPR8Ti4PVxn3AxTTUV8Hzo+p0eo1oePxkG9uIU5TdbrEPlmUdjyDOHz5/vO K2jcyxwp48fJlFqDnRUtUFKRkhj8LHfIX/IkCFVQk/fMbJ0rsYDQ/NuonpBtNN5onL2V93A6moSj3 y2Gs1DYl2pZPwczSOz+XiyjKJWSGAbA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCoob-0000wN-6x; Wed, 17 Oct 2018 16:36:57 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gConD-0000HE-GU for linux-arm-kernel@lists.infradead.org; Wed, 17 Oct 2018 16:35:35 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 53F94A78; Wed, 17 Oct 2018 09:35:19 -0700 (PDT) Received: from capper-debian.emea.arm.com (unknown [10.32.102.177]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B58B83F71A; Wed, 17 Oct 2018 09:35:17 -0700 (PDT) From: Steve Capper To: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 0/4] 52-bit userspace VAs Date: Wed, 17 Oct 2018 17:34:55 +0100 Message-Id: <20181017163459.20175-1-steve.capper@arm.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181017_093531_581526_6D50E0E0 X-CRM114-Status: GOOD ( 12.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, Steve Capper , will.deacon@arm.com, jcm@redhat.com, ard.biesheuvel@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch series brings support for 52-bit userspace VAs to systems that have ARMv8.2-LVA and are running with a 48-bit VA_BITS and a 64KB PAGE_SIZE. If no hardware support is present, the kernel runs with a 48-bit VA space for userspace. Userspace can exploit this feature by providing an address hint to mmap where addr[51:48] != 0. Otherwise all the VA mappings will behave in the same way as a 48-bit VA system (this is to maintain compatibility with software that assumes the maximum VA size on arm64 is 48-bit). This patch series applies to 4.19-rc7. Testing was in a model with Trusted Firmware and UEFI for boot. The major change to V2 of the series is that mm/mmap.c is altered in the first patch of the series (rather than copied over to arch/arm64). Steve Capper (4): mm: mmap: Allow for "high" userspace addresses arm64: mm: Introduce DEFAULT_MAP_WINDOW arm64: mm: Define arch_get_mmap_end, arch_get_mmap_base arm64: mm: introduce 52-bit userspace support arch/arm64/Kconfig | 4 ++++ arch/arm64/include/asm/assembler.h | 7 +++---- arch/arm64/include/asm/elf.h | 2 +- arch/arm64/include/asm/mmu_context.h | 3 +++ arch/arm64/include/asm/pgalloc.h | 4 ++++ arch/arm64/include/asm/pgtable.h | 16 +++++++++++++--- arch/arm64/include/asm/processor.h | 29 ++++++++++++++++++++++------- arch/arm64/kernel/head.S | 13 +++++++++++++ arch/arm64/mm/fault.c | 2 +- arch/arm64/mm/mmu.c | 1 + arch/arm64/mm/proc.S | 10 +++++++++- drivers/firmware/efi/arm-runtime.c | 2 +- drivers/firmware/efi/libstub/arm-stub.c | 2 +- mm/mmap.c | 25 ++++++++++++++++++------- 14 files changed, 94 insertions(+), 26 deletions(-)