ANDROID: KVM: arm64: Provide caches_clean_inval_pou_macro at EL2

In preparation for handling text section live patching in the pKVM
hypervisor, introduce an EL2 copy of caches_clean_inval_pou_macro().

Bug: 357781595
Change-Id: I51e435d4298adedfc1292797effe349491565f50
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
This commit is contained in:
Vincent Donnefort
2024-10-01 13:44:47 +01:00
parent 958d0e7bf5
commit 3a1ca167bb
+22
View File
@@ -23,3 +23,25 @@ alternative_else_nop_endif
ret
SYM_FUNC_END(__pi_icache_inval_pou)
SYM_FUNC_ALIAS(icache_inval_pou, __pi_icache_inval_pou)
.macro caches_clean_inval_pou_macro, fixup
alternative_if ARM64_HAS_CACHE_IDC
dsb ishst
b .Ldc_skip_\@
alternative_else_nop_endif
mov x2, x0
mov x3, x1
dcache_by_line_op cvau, ish, x2, x3, x4, x5, \fixup
.Ldc_skip_\@:
alternative_if ARM64_HAS_CACHE_DIC
isb
b .Lic_skip_\@
alternative_else_nop_endif
invalidate_icache_by_line x0, x1, x2, x3, \fixup
.Lic_skip_\@:
.endm
SYM_FUNC_START(caches_clean_inval_pou)
caches_clean_inval_pou_macro
ret
SYM_FUNC_END(caches_clean_inval_pou)