Skip to content
Commit 7b14f054 authored by Qais Yousef's avatar Qais Yousef
Browse files

arm64: Add support for asymmetric AArch32 EL0 configurations



Add a new ARM64_HAS_ASYM_32BIT_EL0 capability to allow detection of
asymmetric AArch32 systems. The new capability is used to implement
system_supports_asym_32bit_el0() and the original 32bit EL0 capability
is used to implement system_supports_sym_32bit_el0().

system_supports_32bit_el0)() is now true if any of
system_supports_{sym, asym}_32bit_el0() is true.

The kernel will now return true for system_supports_32bit_el0() and
checks 32-bit tasks are running on AArch32 capable CPUs only in
do_notify_resume(). If not the tasks will get SIGKILLed. If the last CPU
supporting 32-bit is offlined, the kernel will SIGKILL any scheduled
32-bit tasks. It is user space responsibility to deal with these issues
if they don't want the app to be SIGKILLed.

In addition to the new ARM64_HAS_ASYM_32BIT_EL0 capability, this patch
factors out the 32-bit cpuinfo and features setting into separate
functions: __cpuinfo_store_cpu_32bit(), init_cpu_32bit_features(). The
cpuinfo of the booting CPU (boot_cpu_data) is now updated on the first
32-bit capable CPU even if it is a secondary one.  The compat_elf_hwcaps
are only verified for the AArch32-capable CPUs to still allow
hotplugging AArch64-only CPUs.

Make sure that KVM never sees the asymmetric 32bit system. Guests can
still ignore ID registers and force run 32bit at EL0 though.

Co-developed-by: Qais Yousef's avatarQais Yousef <qais.yousef@arm.com>
Signed-off-by: Catalin Marinas's avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Qais Yousef's avatarQais Yousef <qais.yousef@arm.com>
parent 3cea11cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment