~kamalmostafa/ubuntu/+source/linux-aws/+git/bionic:arm-update-rebase

Last commit made on 2019-11-14
Get this branch:
git clone -b arm-update-rebase https://git.launchpad.net/~kamalmostafa/ubuntu/+source/linux-aws/+git/bionic
Only Kamal Mostafa can upload to this branch. If you are Kamal Mostafa please log in for upload directions.

Branch merges

Branch information

Name:
arm-update-rebase
Repository:
lp:~kamalmostafa/ubuntu/+source/linux-aws/+git/bionic

Recent commits

7176e09... by Will Deacon

arm64: Avoid flush_icache_range() in alternatives patching code

BugLink: https://bugs.launchpad.net/bugs/1850675

The implementation of flush_icache_range() includes instruction sequences
which are themselves patched at runtime, so it is not safe to call from
the patching framework.

This patch reworks the alternatives cache-flushing code so that it rolls
its own internal D-cache maintenance using DC CIVAC before invalidating
the entire I-cache after all alternatives have been applied at boot.
Modules don't cause any issues, since flush_icache_range() is safe to
call by the time they are loaded.

Acked-by: Mark Rutland <email address hidden>
Reported-by: Rohit Khanna <email address hidden>
Cc: Alexander Van Brunt <email address hidden>
Signed-off-by: Will Deacon <email address hidden>
Signed-off-by: Catalin Marinas <email address hidden>
(cherry picked from commit 429388682dc266e7a693f9c27e3aabd341d55343)
Signed-off-by: Kamal Mostafa <email address hidden>

6e71be0... by Ard Biesheuvel

efi: Permit multiple entries in persistent memreserve data structure

BugLink: https://bugs.launchpad.net/bugs/1850675

In preparation of updating efi_mem_reserve_persistent() to cause less
fragmentation when dealing with many persistent reservations, update
the struct definition and the code that handles it currently so it
can describe an arbitrary number of reservations using a single linked
list entry. The actual optimization will be implemented in a subsequent
patch.

Tested-by: Marc Zyngier <email address hidden>
Signed-off-by: Ard Biesheuvel <email address hidden>
Cc: Andy Lutomirski <email address hidden>
Cc: Arend van Spriel <email address hidden>
Cc: Bhupesh Sharma <email address hidden>
Cc: Borislav Petkov <email address hidden>
Cc: Dave Hansen <email address hidden>
Cc: Eric Snowberg <email address hidden>
Cc: Hans de Goede <email address hidden>
Cc: Joe Perches <email address hidden>
Cc: Jon Hunter <email address hidden>
Cc: Julien Thierry <email address hidden>
Cc: Linus Torvalds <email address hidden>
Cc: Matt Fleming <email address hidden>
Cc: Nathan Chancellor <email address hidden>
Cc: Peter Zijlstra <email address hidden>
Cc: Sai Praneeth Prakhya <email address hidden>
Cc: Sedat Dilek <email address hidden>
Cc: Thomas Gleixner <email address hidden>
Cc: YiFei Zhu <email address hidden>
Cc: <email address hidden>
Link: http://<email address hidden>
Signed-off-by: Ingo Molnar <email address hidden>
(cherry picked from commit 5f0b0ecf043a5319e729c11a53bc8294df12dab3)
Signed-off-by: Kamal Mostafa <email address hidden>

f1a260c... by Ard Biesheuvel

efi: Prevent GICv3 WARN() by mapping the memreserve table before first use

BugLink: https://bugs.launchpad.net/bugs/1850675

Mapping the MEMRESERVE EFI configuration table from an early initcall
is too late: the GICv3 ITS code that creates persistent reservations
for the boot CPU's LPI tables is invoked from init_IRQ(), which runs
much earlier than the handling of the initcalls. This results in a
WARN() splat because the LPI tables cannot be reserved persistently,
which will result in silent memory corruption after a kexec reboot.

So instead, invoke the initialization performed by the initcall from
efi_mem_reserve_persistent() itself as well, but keep the initcall so
that the init is guaranteed to have been called before SMP boot.

Tested-by: Marc Zyngier <email address hidden>
Tested-by: Jan Glauber <email address hidden>
Tested-by: John Garry <email address hidden>
Signed-off-by: Ard Biesheuvel <email address hidden>
Cc: Linus Torvalds <email address hidden>
Cc: Peter Zijlstra <email address hidden>
Cc: Thomas Gleixner <email address hidden>
Cc: <email address hidden>
Fixes: 63eb322d89c8 ("efi: Permit calling efi_mem_reserve_persistent() ...")
Link: http://<email address hidden>
Signed-off-by: Ingo Molnar <email address hidden>
(cherry picked from commit 976b489120cdab2b1b3a41ffa14661db43d58190)
Signed-off-by: Kamal Mostafa <email address hidden>

a617a80... by Ard Biesheuvel

efi: Permit calling efi_mem_reserve_persistent() from atomic context

BugLink: https://bugs.launchpad.net/bugs/1850675

Currently, efi_mem_reserve_persistent() may not be called from atomic
context, since both the kmalloc() call and the memremap() call may
sleep.

The kmalloc() call is easy enough to fix, but the memremap() call
needs to be moved into an init hook since we cannot control the
memory allocation behavior of memremap() at the call site.

Signed-off-by: Ard Biesheuvel <email address hidden>
Cc: Linus Torvalds <email address hidden>
Cc: Peter Zijlstra <email address hidden>
Cc: Thomas Gleixner <email address hidden>
Cc: <email address hidden>
Link: http://<email address hidden>
Signed-off-by: Ingo Molnar <email address hidden>
(cherry picked from commit 63eb322d89c8505af9b4a3d703e85e42281ebaa0)
Signed-off-by: Kamal Mostafa <email address hidden>

9c93938... by Ard Biesheuvel

efi/arm: libstub: add a root memreserve config table

BugLink: https://bugs.launchpad.net/bugs/1850675

Installing UEFI configuration tables can only be done before calling
ExitBootServices(), so if we want to use the new MEMRESRVE config table
from the kernel proper, we need to install a dummy entry from the stub.

Tested-by: Jeremy Linton <email address hidden>
Signed-off-by: Ard Biesheuvel <email address hidden>
(cherry picked from commit b844470f22061e8cd646cb355e85d2f518b2c913)
Signed-off-by: Kamal Mostafa <email address hidden>

cd8407c... by Julien Grall <email address hidden>

arm64/cpufeature: Convert hook_lock to raw_spin_lock_t in cpu_enable_ssbs()

BugLink: https://bugs.launchpad.net/bugs/1850675

cpu_enable_ssbs() is called via stop_machine() as part of the cpu_enable
callback. A spin lock is used to ensure the hook is registered before
the rest of the callback is executed.

On -RT spin_lock() may sleep. However, all the callees in stop_machine()
are expected to not sleep. Therefore a raw_spin_lock() is required here.

Given this is already done under stop_machine() and the work done under
the lock is quite small, the latency should not increase too much.

Signed-off-by: Julien Grall <email address hidden>
Signed-off-by: Catalin Marinas <email address hidden>
(cherry picked from commit 27e6e7d63fc2b43334ce79070a727a9ca6e58700)
Signed-off-by: Kamal Mostafa <email address hidden>

0b4b7aa... by Will Deacon

arm64: cpu: Move errata and feature enable callbacks closer to callers

BugLink: https://bugs.launchpad.net/bugs/1850675

The cpu errata and feature enable callbacks are only called via their
respective arm64_cpu_capabilities structure and therefore shouldn't
exist in the global namespace.

Move the PAN, RAS and cache maintenance emulation enable callbacks into
the same files as their corresponding arm64_cpu_capabilities structures,
making them static in the process.

Signed-off-by: Will Deacon <email address hidden>
Signed-off-by: Catalin Marinas <email address hidden>
(backported from commit b8925ee2e12d1cb9a11d6f28b5814f2bfa59dce1)
Signed-off-by: Kamal Mostafa <email address hidden>

ba8e12e... by Will Deacon

KVM: arm64: Set SCTLR_EL2.DSSBS if SSBD is forcefully disabled and !vhe

BugLink: https://bugs.launchpad.net/bugs/1850675

When running without VHE, it is necessary to set SCTLR_EL2.DSSBS if SSBD
has been forcefully disabled on the kernel command-line.

Acked-by: Christoffer Dall <email address hidden>
Signed-off-by: Will Deacon <email address hidden>
Signed-off-by: Catalin Marinas <email address hidden>
(backported from commit 7c36447ae5a090729e7b129f24705bb231a07e0b)
Signed-off-by: Kamal Mostafa <email address hidden>

1fb9340... by Will Deacon

arm64: Fix silly typo in comment

BugLink: https://bugs.launchpad.net/bugs/1850675

I was passing through and figuered I'd fix this up:

 featuer -> feature

Signed-off-by: Will Deacon <email address hidden>
Signed-off-by: Catalin Marinas <email address hidden>
(cherry picked from commit ca7f686ac9fe87a9175696a8744e095ab9749c49)
Signed-off-by: Kamal Mostafa <email address hidden>

8c95a20... by Mark Rutland

arm64: kill config_sctlr_el1()

BugLink: https://bugs.launchpad.net/bugs/1850675

Now that we have sysreg_clear_set(), we can consistently use this
instead of config_sctlr_el1().

Signed-off-by: Mark Rutland <email address hidden>
Reviewed-by: Dave Martin <email address hidden>
Acked-by: Catalin Marinas <email address hidden>
Cc: James Morse <email address hidden>
Cc: Will Deacon <email address hidden>
Signed-off-by: Will Deacon <email address hidden>
(cherry picked from commit 25be597ada0b49d2748ab520a78a28c1764d69e4)
Signed-off-by: Kamal Mostafa <email address hidden>