@@ -152,3 +152,9 @@ void flush_area_local(const void *va, unsigned int flags)
local_irq_restore(irqfl);
}
+
+void clean_and_invalidate_dcache_va_range(const void *p, unsigned long size)
+{
+ int order = get_order_from_bytes(size);
+ flush_area_local(p, FLUSH_CACHE|FLUSH_ORDER(order));
+}
@@ -344,8 +344,13 @@ static inline uint32_t cacheattr_to_pte_flags(uint32_t cacheattr)
return ((cacheattr & 4) << 5) | ((cacheattr & 3) << 3);
}
-/* No cache maintenance required on x86 architecture. */
static inline void flush_page_to_ram(unsigned long mfn) {}
+static inline void invalidate_dcache_va_range(const void *p, unsigned long size) {}
+void clean_and_invalidate_dcache_va_range(const void *p, unsigned long size);
+static inline void clean_dcache_va_range(const void *p, unsigned long size)
+{
+ clean_and_invalidate_dcache_va_range(p, size);
+}
/* return true if permission increased */
static inline bool_t
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- Changes in v4: - remove _xen in the function names; - implement the functions using existing x86 flushing functions. --- xen/arch/x86/flushtlb.c | 6 ++++++ xen/include/asm-x86/page.h | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-)