[RFC PATCH v2 0/4] Add support for Asymmetric AArch32 systems

Qais Yousef
2020-10-21T10:47:52Z

This series adds basic support for Asymmetric AArch32 systems. Full rationale
is in v1's cover letter.

https://lore.kernel.org/linux-arch/20201008181641.32767-1-qais.yousef@arm.com/

Changes in v2:

* We now reset vcpu->arch.target to force re-initialized for KVM patch.
(Marc)

* Fix a bug where this_cpu_has_cap() must be called with preemption
disabled in check_aarch32_cpumask().

* Add new sysctl.enable_asym_32bit. (Catalin)

* Export id_aar64fpr0 register in sysfs which allows user space to
discover which cpus support 32bit@EL0. The sysctl must be enabled for
the user space to discover the asymmetry. (Will/Catalin)

* Fixing up affinity in the kernel approach was dropped. The support
assumes the user space that wants to enable this support knows how to
guarantee correct affinities for 32bit apps by using cpusets.

Open questions:

* Should there be any extra handling at execve() time? At the moment we
allow the app to start and only SIGKILL it after it has moved to the
'wrong' cpu. We could be stricter and do the check earlier when the
elf is loaded.

Thanks

--
Qais Yousef

Qais Yousef (4):
arm64: kvm: Handle Asymmetric AArch32 systems
arm64: Add support for asymmetric AArch32 EL0 configurations
arm64: export emulate_sys_reg()
arm64: Export id_aar64fpr0 via sysfs

Documentation/arm64/cpu-feature-registers.rst | 2 +-
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/include/asm/cpucaps.h | 3 +-
arch/arm64/include/asm/cpufeature.h | 22 +++-
arch/arm64/include/asm/thread_info.h | 5 +-
arch/arm64/kernel/cpufeature.c | 72 ++++++-----
arch/arm64/kernel/cpuinfo.c | 116 +++++++++++++-----
arch/arm64/kernel/process.c | 17 +++
arch/arm64/kernel/signal.c | 24 ++++
arch/arm64/kvm/arm.c | 14 +++
arch/arm64/kvm/guest.c | 2 +-
arch/arm64/kvm/sys_regs.c | 8 +-
kernel/sysctl.c | 11 ++
13 files changed, 226 insertions(+), 71 deletions(-)

--
2.25.1