]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
xen/arm: p2m: Allow to flush cache on any RAM region
authorJulien Grall <julien.grall@arm.com>
Wed, 21 Feb 2018 14:18:44 +0000 (14:18 +0000)
committerJulien Grall <julien.grall@arm.com>
Wed, 12 Dec 2018 16:07:37 +0000 (16:07 +0000)
Currently, we only allow to flush cache on regions mapped as p2m_ram_{rw,ro}.

There are no real problem in cache flushing any RAM regions such as grants
and foreign mapping. Therefore, relax the check to allow flushing the
cache on any RAM region.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/p2m.c

index 836157292c0c870e765f821a2d5b92d4d947bc80..4e0ddbf70bef817c7dbac32511bd340097a521bf 100644 (file)
@@ -1539,7 +1539,7 @@ int p2m_cache_flush_range(struct domain *d, gfn_t start, gfn_t end)
         next_gfn = gfn_next_boundary(start, order);
 
         /* Skip hole and non-RAM page */
-        if ( mfn_eq(mfn, INVALID_MFN) || !p2m_is_ram(t) )
+        if ( mfn_eq(mfn, INVALID_MFN) || !p2m_is_any_ram(t) )
             continue;
 
         /* XXX: Implement preemption */