xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-next] xen/arm: mm: flush_page_to_ram() only need to clean to PoC
@ 2021-02-20 17:54 Julien Grall
  2021-02-22 11:58 ` Bertrand Marquis
  0 siblings, 1 reply; 8+ messages in thread
From: Julien Grall @ 2021-02-20 17:54 UTC (permalink / raw)
  To: xen-devel; +Cc: julien, Julien Grall, Stefano Stabellini, Volodymyr Babchuk

From: Julien Grall <jgrall@amazon.com>

At the moment, flush_page_to_ram() is both cleaning and invalidate to
PoC the page. However, the cache line can be speculated and pull in the
cache right after as it is part of the direct map.

So it is pointless to try to invalidate the line in the data cache.

Signed-off-by: Julien Grall <jgrall@amazon.com>
---
 xen/arch/arm/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 59f8a3f15fd1..2f11d214e184 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -529,7 +529,7 @@ void flush_page_to_ram(unsigned long mfn, bool sync_icache)
 {
     void *v = map_domain_page(_mfn(mfn));
 
-    clean_and_invalidate_dcache_va_range(v, PAGE_SIZE);
+    clean_dcache_va_range(v, PAGE_SIZE);
     unmap_domain_page(v);
 
     /*
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-03 18:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20 17:54 [PATCH for-next] xen/arm: mm: flush_page_to_ram() only need to clean to PoC Julien Grall
2021-02-22 11:58 ` Bertrand Marquis
2021-02-22 13:37   ` Julien Grall
2021-02-22 13:48     ` Bertrand Marquis
2021-02-22 20:35     ` Stefano Stabellini
2021-02-22 20:50       ` Julien Grall
2021-02-23  1:22         ` Stefano Stabellini
2021-03-03 18:33           ` Julien Grall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).