aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-arm/regs.h
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2012-12-20 11:53:08 +0000
committerIan Campbell <ian.campbell@citrix.com>2012-12-20 11:53:08 +0000
commit01775697ca620e7baa43f9eb9c9b07b903c6c3cb (patch)
tree87014044cafd3e36fc4184d0863e890c6ef6df3a /xen/include/asm-arm/regs.h
parent7a1db56b64749ae54fa5f32f71b115b92f2d64d0 (diff)
downloadxen-01775697ca620e7baa43f9eb9c9b07b903c6c3cb.tar.gz
xen-01775697ca620e7baa43f9eb9c9b07b903c6c3cb.tar.bz2
xen-01775697ca620e7baa43f9eb9c9b07b903c6c3cb.zip
xen: arm: fix guest register access.
We weren't taking the guest mode (CPSR) into account and would always access the user version of the registers. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/include/asm-arm/regs.h')
-rw-r--r--xen/include/asm-arm/regs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/include/asm-arm/regs.h b/xen/include/asm-arm/regs.h
index 54f6ed82ae..748694456f 100644
--- a/xen/include/asm-arm/regs.h
+++ b/xen/include/asm-arm/regs.h
@@ -30,6 +30,12 @@
#define return_reg(v) ((v)->arch.cpu_info->guest_cpu_user_regs.r0)
+/*
+ * Returns a pointer to the given register value in regs, taking the
+ * processor mode (CPSR) into account.
+ */
+extern uint32_t *select_user_reg(struct cpu_user_regs *regs, int reg);
+
#endif /* __ARM_REGS_H__ */
/*
* Local variables: