summaryrefslogtreecommitdiffstats
path: root/include/qemu/cacheflush.h
diff options
context:
space:
mode:
authorRichard Henderson2020-12-12 17:38:21 +0100
committerRichard Henderson2021-01-07 16:09:41 +0100
commit1da8de39a39c55560cb4bf0cea94d598fea035cd (patch)
tree59d8b4160b3342019ef5fd8c1392af7812de0713 /include/qemu/cacheflush.h
parenttcg: Do not flush icache for interpreter (diff)
downloadqemu-1da8de39a39c55560cb4bf0cea94d598fea035cd.tar.gz
qemu-1da8de39a39c55560cb4bf0cea94d598fea035cd.tar.xz
qemu-1da8de39a39c55560cb4bf0cea94d598fea035cd.zip
util: Enhance flush_icache_range with separate data pointer
We are shortly going to have a split rw/rx jit buffer. Depending on the host, we need to flush the dcache at the rw data pointer and flush the icache at the rx code pointer. For now, the two passed pointers are identical, so there is no effective change in behaviour. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/qemu/cacheflush.h')
-rw-r--r--include/qemu/cacheflush.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/qemu/cacheflush.h b/include/qemu/cacheflush.h
index 58ae488491..ae20bcda73 100644
--- a/include/qemu/cacheflush.h
+++ b/include/qemu/cacheflush.h
@@ -8,16 +8,27 @@
#ifndef QEMU_CACHEFLUSH_H
#define QEMU_CACHEFLUSH_H
+/**
+ * flush_idcache_range:
+ * @rx: instruction address
+ * @rw: data address
+ * @len: length to flush
+ *
+ * Flush @len bytes of the data cache at @rw and the icache at @rx
+ * to bring them in sync. The two addresses may be different virtual
+ * mappings of the same physical page(s).
+ */
+
#if defined(__i386__) || defined(__x86_64__) || defined(__s390__)
-static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
+static inline void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len)
{
/* icache is coherent and does not require flushing. */
}
#else
-void flush_icache_range(uintptr_t start, uintptr_t stop);
+void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len);
#endif