[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V2 45/46] 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> --- 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 a723f92..6bfab38 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); \ -- 1.7.2.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |