[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/arm: Pair call to set_fixmap with call to clear_fixmap in copy_from_paddr



commit b4d96a13d07679ddeb30309e926a769c7279bdfe
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Sun Dec 2 19:12:54 2018 +0000
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Thu Jun 6 18:44:33 2019 +0100

    xen/arm: Pair call to set_fixmap with call to clear_fixmap in 
copy_from_paddr
    
    At the moment, set_fixmap may replace a valid entry without following
    the break-before-make sequence. This may result to TLB conflict abort.
    
    Rather than dealing with Break-Before-Make in set_fixmap, each call to
    set_fixmap in copy_from_paddr is paired with a call to clear_fixmap.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
    Reviewed-by: Andrii Anisov <andrii_anisov@xxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/kernel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index e3ffdb2fa1..389bef2afa 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -58,13 +58,12 @@ void __init copy_from_paddr(void *dst, paddr_t paddr, 
unsigned long len)
         set_fixmap(FIXMAP_MISC, maddr_to_mfn(paddr), PAGE_HYPERVISOR_WC);
         memcpy(dst, src + s, l);
         clean_dcache_va_range(dst, l);
+        clear_fixmap(FIXMAP_MISC);
 
         paddr += l;
         dst += l;
         len -= l;
     }
-
-    clear_fixmap(FIXMAP_MISC);
 }
 
 static void __init place_modules(struct kernel_info *info,
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.