From: Ian Campbell Date: Fri, 13 Mar 2015 10:39:50 +0000 (+0000) Subject: xen: arm: correct arm64 version of gva_to_ma_par X-Git-Tag: 4.6.0-rc1~980 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c1245e9d5bf311b5a3267ea4b077a16561fcf439;p=xen.git 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 Signed-off-by: Ian Campbell --- diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h index 1fd416d4b2..e7a761dd5a 100644 --- a/xen/include/asm-arm/arm64/page.h +++ b/xen/include/asm-arm/arm64/page.h @@ -89,9 +89,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);