u-boot/arch/arm/cpu
Marc Zyngier 46dc542870 arm: cpu: Add optional CMOs by VA
Exposing set/way cache maintenance to a virtual machine is unsafe, not
least because the instructions are not permission-checked but also
because they are not broadcast between CPUs. Consequently, KVM traps and
emulates such maintenance in the host kernel using by-VA operations and
looping over the stage-2 page-tables. However, when running under
protected KVM, these instructions are not able to be emulated and will
instead result in an exception being delivered to the guest.

Introduce CONFIG_CMO_BY_VA_ONLY so that virtual platforms can select
this option and perform by-VA cache maintenance instead of using the
set/way instructions.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <willdeacon@google.com>
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
[ Paul: pick from the Android tree. Fixup Pierre's commit. And fix some
  checkpatch warnings. Rebased to upstream. ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Link: db5507f47f
Link: 2baf54e743
2023-03-06 17:03:55 -05:00
..
arm11 common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
arm720t Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig 2021-08-31 17:47:49 -04:00
arm920t imx: Drop unused CONFIG_IMX 2023-02-07 14:33:48 -05:00
arm926ejs arm: Remove unused mx27 code 2022-12-05 16:07:13 -05:00
arm946es Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig 2021-08-31 17:47:49 -04:00
arm1136 arm: Remove flea3 board 2021-10-01 12:08:19 -04:00
arm1176 global: Remove unused CONFIG defines 2023-01-20 12:27:06 -05:00
armv7 freescale: Drop old pre-DM_ETH code 2023-03-03 09:49:02 -05:00
armv7m global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
armv8 arm: cpu: Add optional CMOs by VA 2023-03-06 17:03:55 -05:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
u-boot-spl.lds linker_lists: Rename sections to remove . prefix 2022-06-23 12:58:18 -04:00
u-boot.lds arm: Rework usage of CONFIG_ARMV[78]_SECURE_BASE in linker scripts 2023-01-20 12:27:06 -05:00