summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/nvhe/cache.S
diff options
context:
space:
mode:
authorQuentin Perret <qperret@google.com>2021-03-19 10:01:22 +0000
committerMarc Zyngier <maz@kernel.org>2021-03-19 12:01:20 +0000
commitd460df12926825a3926da91f054f9f11f88bb33e (patch)
treef294c849c7ae83bc35fb2fca671e281cc65bd8d4 /arch/arm64/kvm/hyp/nvhe/cache.S
parent7a440cc78392c3caf805ef0afc7ead031e4d0830 (diff)
downloadlinux-stable-d460df12926825a3926da91f054f9f11f88bb33e.tar.gz
linux-stable-d460df12926825a3926da91f054f9f11f88bb33e.tar.bz2
linux-stable-d460df12926825a3926da91f054f9f11f88bb33e.zip
KVM: arm64: Provide __flush_dcache_area at EL2
We will need to do cache maintenance at EL2 soon, so compile a copy of __flush_dcache_area at EL2, and provide a copy of arm64_ftr_reg_ctrel0 as it is needed by the read_ctr macro. Signed-off-by: Quentin Perret <qperret@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210319100146.1149909-15-qperret@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/cache.S')
-rw-r--r--arch/arm64/kvm/hyp/nvhe/cache.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/cache.S b/arch/arm64/kvm/hyp/nvhe/cache.S
new file mode 100644
index 000000000000..36cef6915428
--- /dev/null
+++ b/arch/arm64/kvm/hyp/nvhe/cache.S
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Code copied from arch/arm64/mm/cache.S.
+ */
+
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/alternative.h>
+
+SYM_FUNC_START_PI(__flush_dcache_area)
+ dcache_by_line_op civac, sy, x0, x1, x2, x3
+ ret
+SYM_FUNC_END_PI(__flush_dcache_area)