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

[Xen-changelog] [xen stable-4.4] xen: arm: correct arm64 version of gva_to_ma_par



commit 04ac29f0c38236840ed852b4fc0933d388a0e776
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Fri Mar 13 10:39:50 2015 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Mar 13 12:08:17 2015 +0000

    xen: arm: correct arm64 version of gva_to_ma_par
    
    The implementation was backwards and checked that the guest could
    read when asked about write and vice versa.
    
    This is an update to the fix for XSA-98.
    
    Reported-by: Tamas K Lengyel <tklengyel@xxxxxxxxxxxxx>
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    (cherry picked from commit c1245e9d5bf311b5a3267ea4b077a16561fcf439)
---
 xen/include/asm-arm/arm64/page.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index 3922d87..de903c9 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -88,9 +88,9 @@ static inline uint64_t gva_to_ma_par(vaddr_t va, unsigned int 
flags)
     uint64_t par, tmp = READ_SYSREG64(PAR_EL1);
 
     if ( (flags & GV2M_WRITE) == GV2M_WRITE )
-        asm volatile ("at s12e1r, %0;" : : "r" (va));
-    else
         asm volatile ("at s12e1w, %0;" : : "r" (va));
+    else
+        asm volatile ("at s12e1r, %0;" : : "r" (va));
     isb();
     par = READ_SYSREG64(PAR_EL1);
     WRITE_SYSREG64(tmp, PAR_EL1);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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