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

[Xen-changelog] [xen master] xen: arm: Fix guest mode for 64-bit



commit 75c3b4097c01cb2771feaafe0e8dfa2bda6d02c5
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Fri Feb 22 08:58:24 2013 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Feb 22 12:14:56 2013 +0000

    xen: arm: Fix guest mode for 64-bit
    
    Need to check for the 64-bit EL2 modes, not 32-bit HYP mode.
    
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Tim Deegan <tim@xxxxxxx>
---
 xen/include/asm-arm/regs.h |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/xen/include/asm-arm/regs.h b/xen/include/asm-arm/regs.h
index 093caec..079c0ca 100644
--- a/xen/include/asm-arm/regs.h
+++ b/xen/include/asm-arm/regs.h
@@ -13,10 +13,16 @@
 #define svc_mode(r)     psr_mode((r)->cpsr,PSR_MODE_SVC)
 #define mon_mode(r)     psr_mode((r)->cpsr,PSR_MODE_MON)
 #define abt_mode(r)     psr_mode((r)->cpsr,PSR_MODE_ABT)
-#define hyp_mode(r)     psr_mode((r)->cpsr,PSR_MODE_HYP)
 #define und_mode(r)     psr_mode((r)->cpsr,PSR_MODE_UND)
 #define sys_mode(r)     psr_mode((r)->cpsr,PSR_MODE_SYS)
 
+#ifdef CONFIG_ARM_32
+#define hyp_mode(r)     psr_mode((r)->cpsr,PSR_MODE_HYP)
+#else
+#define hyp_mode(r)     (psr_mode((r)->cpsr,PSR_MODE_EL2h) || \
+                         psr_mode((r)->cpsr,PSR_MODE_EL2t))
+#endif
+
 #define guest_mode(r)                                                         \
 ({                                                                            \
     unsigned long diff = (char *)guest_cpu_user_regs() - (char *)(r);         \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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