Skip to content

arm: cpu: Add optional CMOs by VA

Ying-Chun Liu (PaulLiu) u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2arm: cpu: Add optional CMOs by VAarch/arm/cpu/armv8/Kconfig arch/arm/cpu/armv8/cache.S arch/arm/cpu/armv8/cache_v8.c +1 more+155 -261 reply
2/2arm64: Initialize TLB memory if CMO_BY_VA_ONLYarch/arm/lib/cache.c+9 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] 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.

Marc Zyngier (1):
arm: cpu: Add optional CMOs by VA

Pierre-Clément Tosi (1):
arm64: Initialize TLB memory if CMO_BY_VA_ONLY

v2: Fix the Signed-off-by list.

 arch/arm/cpu/armv8/Kconfig    |  4 ++
 arch/arm/cpu/armv8/cache.S    | 50 +++++++++++++-----
 arch/arm/cpu/armv8/cache_v8.c | 97 ++++++++++++++++++++++++++++++++++-
 arch/arm/cpu/armv8/cpu.c      | 30 +++++++----
 arch/arm/lib/cache.c          |  9 ++++
 5 files changed, 164 insertions(+), 26 deletions(-)
Signature · 1 line
2.39.1