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

[Xen-changelog] [xen staging] xen/arm: cpuerrata: Align a virtual address before unmap



commit ead6b9f78355e8d366e0c80c4a73fa7fbd6d26cc
Author:     Andrii Anisov <andrii_anisov@xxxxxxxx>
AuthorDate: Thu Jul 18 16:22:20 2019 +0300
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Mon Jul 29 12:39:27 2019 +0100

    xen/arm: cpuerrata: Align a virtual address before unmap
    
    After changes introduced by 9cc0618eb0 "xen/arm: mm: Sanity check any
    update of Xen page tables" we are able to vmap/vunmap page aligned
    addresses only.
    
    So if we add a page address remainder to the mapped virtual address,
    we have to mask it out before unmapping.
    
    Signed-off-by: Andrii Anisov <andrii_anisov@xxxxxxxx>
    Acked-by: Julien Grall <julien.grall@xxxxxxx>
---
 xen/arch/arm/cpuerrata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index 8904939aca..6f483b2d8d 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -75,7 +75,7 @@ static bool copy_hyp_vect_bpi(unsigned int slot, const char 
*hyp_vec_start,
     clean_dcache_va_range(dst_remapped, VECTOR_TABLE_SIZE);
     invalidate_icache();
 
-    vunmap(dst_remapped);
+    vunmap((void *)((vaddr_t)dst_remapped & PAGE_MASK));
 
     return true;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
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®.