linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Steve Capper <steve.capper@arm.com>
To: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org
Cc: catalin.marinas@arm.com, will.deacon@arm.com,
	ard.biesheuvel@linaro.org, suzuki.poulose@arm.com,
	jcm@redhat.com, Steve Capper <steve.capper@arm.com>
Subject: [PATCH V5 0/7] 52-bit userspace VAs
Date: Thu,  6 Dec 2018 22:50:35 +0000	[thread overview]
Message-ID: <20181206225042.11548-1-steve.capper@arm.com> (raw)

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.20-rc1.

Testing was in a model with Trusted Firmware and UEFI for boot.

Changed in V5, ttbr1 offsetting code simplified. Extra patch added to
check for VA space support mismatch between CPUs.

Changed in V4, pgd_index changes dropped in favour of offsetting the
ttbr1. This is performed in a new patch, #4.

Changed in V3, COMPAT fixes added (and tested with 32-bit userspace code).
Extra patch added to allow forcing all userspace allocations to come from
52-bits (to allow for debugging and testing).

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 (7):
  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: Offset TTBR1 to allow 52-bit PTRS_PER_PGD
  arm64: mm: Prevent mismatched 52-bit VA support
  arm64: mm: introduce 52-bit userspace support
  arm64: mm: Allow forcing all userspace addresses to 52-bit

 arch/arm64/Kconfig                      | 17 +++++++++++
 arch/arm64/include/asm/assembler.h      | 30 ++++++++++++++++---
 arch/arm64/include/asm/elf.h            |  4 +++
 arch/arm64/include/asm/mmu_context.h    |  3 ++
 arch/arm64/include/asm/pgtable-hwdef.h  |  9 ++++++
 arch/arm64/include/asm/processor.h      | 36 ++++++++++++++++++----
 arch/arm64/kernel/head.S                | 40 +++++++++++++++++++++++++
 arch/arm64/kernel/hibernate-asm.S       |  1 +
 arch/arm64/kernel/smp.c                 |  5 ++++
 arch/arm64/mm/fault.c                   |  2 +-
 arch/arm64/mm/init.c                    |  2 +-
 arch/arm64/mm/mmu.c                     |  1 +
 arch/arm64/mm/proc.S                    | 14 ++++++++-
 drivers/firmware/efi/arm-runtime.c      |  2 +-
 drivers/firmware/efi/libstub/arm-stub.c |  2 +-
 mm/mmap.c                               | 25 +++++++++++-----
 16 files changed, 171 insertions(+), 22 deletions(-)

-- 
2.19.2

             reply	other threads:[~2018-12-06 22:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 22:50 Steve Capper [this message]
2018-12-06 22:50 ` [PATCH V5 1/7] mm: mmap: Allow for "high" userspace addresses Steve Capper
2018-12-07 19:56   ` Andrew Morton
2018-12-06 22:50 ` [PATCH V5 2/7] arm64: mm: Introduce DEFAULT_MAP_WINDOW Steve Capper
2018-12-06 22:50 ` [PATCH V5 3/7] arm64: mm: Define arch_get_mmap_end, arch_get_mmap_base Steve Capper
2018-12-06 22:50 ` [PATCH V5 4/7] arm64: mm: Offset TTBR1 to allow 52-bit PTRS_PER_PGD Steve Capper
2018-12-07 11:21   ` Catalin Marinas
2018-12-07 12:04   ` Suzuki K Poulose
2018-12-06 22:50 ` [PATCH V5 5/7] arm64: mm: Prevent mismatched 52-bit VA support Steve Capper
2018-12-07 10:47   ` Suzuki K Poulose
2018-12-07 15:26     ` Will Deacon
2018-12-07 17:28       ` Suzuki K Poulose
2018-12-10 13:36         ` Will Deacon
2018-12-10 16:04           ` Steve Capper
2018-12-10 16:18             ` Will Deacon
2018-12-10 16:55               ` Steve Capper
2018-12-10 17:08                 ` Steve Capper
2018-12-10 17:42                   ` Steve Capper
2018-12-10 18:07                     ` Suzuki K Poulose
2018-12-06 22:50 ` [PATCH V5 6/7] arm64: mm: introduce 52-bit userspace support Steve Capper
2018-12-07 11:55   ` Catalin Marinas
2018-12-06 22:50 ` [PATCH V5 7/7] arm64: mm: Allow forcing all userspace addresses to 52-bit Steve Capper
2018-12-10 19:34 ` [PATCH V5 0/7] 52-bit userspace VAs Will Deacon
2018-12-11  9:13   ` Steve Capper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181206225042.11548-1-steve.capper@arm.com \
    --to=steve.capper@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=jcm@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox