diff options
author | Marc Zyngier <maz@kernel.org> | 2023-02-09 04:54:27 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-03-06 17:03:55 -0500 |
commit | 46dc54287031759c03c68902283d92076938305c (patch) | |
tree | e55074024d7a5d0e94c4b69242cdcb5f00145ce6 /tools/zynqimage.c | |
parent | d1653548d29959a6ea6b4037a00b48a28257e6e6 (diff) | |
download | u-boot-46dc54287031759c03c68902283d92076938305c.zip u-boot-46dc54287031759c03c68902283d92076938305c.tar.gz u-boot-46dc54287031759c03c68902283d92076938305c.tar.bz2 |
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: https://android.googlesource.com/platform/external/u-boot/+/db5507f47f4f57f766d52f753ff2cc761afc213b
Link: https://android.googlesource.com/platform/external/u-boot/+/2baf54e743380a1e4a6bc2dbdde020a2e783ff67
Diffstat (limited to 'tools/zynqimage.c')
0 files changed, 0 insertions, 0 deletions