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

[Xen-changelog] [xen-unstable] [IA64] Make gp value point to the xenva area in mca handler



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1219658677 -32400
# Node ID 01e95ec5b433e62c7212a00a299cf4aeae1ed72c
# Parent  0ac39e4bf63a72175a47eaf063ff85197e20f2af
[IA64] Make gp value point to the xenva area in mca handler

backport the c/s f5a3f3dc189485d607fbd42678cc23958acc0a6e
of linux.
Xen/ia64 vmm is also relocatable so that it doesn't
lay in the identity mapping area.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/include/asm-ia64/linux-xen/asm/mca_asm.h |   56 ++++++++++++++++++++++++++-
 1 files changed, 55 insertions(+), 1 deletion(-)

diff -r 0ac39e4bf63a -r 01e95ec5b433 
xen/include/asm-ia64/linux-xen/asm/mca_asm.h
--- a/xen/include/asm-ia64/linux-xen/asm/mca_asm.h      Mon Aug 25 19:04:37 
2008 +0900
+++ b/xen/include/asm-ia64/linux-xen/asm/mca_asm.h      Mon Aug 25 19:04:37 
2008 +0900
@@ -198,6 +198,7 @@ 30: mov ar.lc = _tmp1;                      \
  *     7.      Do an rfi to move ipsr to psr and iip to ip.
  */
 
+#ifdef XEN
 #define VIRTUAL_MODE_ENTER(temp1, temp2, start_addr, old_psr)  \
        mov     temp2 = psr;                                    \
        ;;                                                      \
@@ -239,9 +240,9 @@ 30: mov ar.lc = _tmp1;                      \
        movl    temp2 = start_addr;                             \
        ;;                                                      \
        mov     cr.iip = temp2;                                 \
+       movl    gp = __gp;                                      \
        ;;                                                      \
        DATA_PA_TO_VA(sp, temp1);                               \
-       DATA_PA_TO_VA(gp, temp2);                               \
        srlz.i;                                                 \
        ;;                                                      \
        nop     1;                                              \
@@ -249,6 +250,59 @@ 30:        mov ar.lc = _tmp1;                      \
        nop     1;                                              \
        rfi                                                     \
        ;;
+#else
+#define VIRTUAL_MODE_ENTER(temp1, temp2, start_addr, old_psr)  \
+       mov     temp2 = psr;                                    \
+       ;;                                                      \
+       mov     old_psr = temp2;                                \
+       ;;                                                      \
+       dep     temp2 = 0, temp2, PSR_IC, 2;                    \
+       ;;                                                      \
+       mov     psr.l = temp2;                                  \
+       mov     ar.rsc = 0;                                     \
+       ;;                                                      \
+       srlz.d;                                                 \
+       mov     r13 = ar.k6;                                    \
+       mov     temp2 = ar.bspstore;                            \
+       ;;                                                      \
+       DATA_PA_TO_VA(temp2,temp1);                             \
+       ;;                                                      \
+       mov     temp1 = ar.rnat;                                \
+       ;;                                                      \
+       mov     ar.bspstore = temp2;                            \
+       ;;                                                      \
+       mov     ar.rnat = temp1;                                \
+       ;;                                                      \
+       mov     temp1 = old_psr;                                \
+       ;;                                                      \
+       mov     temp2 = 1;                                      \
+       ;;                                                      \
+       dep     temp1 = temp2, temp1, PSR_IC, 1;                \
+       ;;                                                      \
+       dep     temp1 = temp2, temp1, PSR_IT, 1;                \
+       ;;                                                      \
+       dep     temp1 = temp2, temp1, PSR_DT, 1;                \
+       ;;                                                      \
+       dep     temp1 = temp2, temp1, PSR_RT, 1;                \
+       ;;                                                      \
+       dep     temp1 = temp2, temp1, PSR_BN, 1;                \
+       ;;                                                      \
+                                                               \
+       mov     cr.ipsr = temp1;                                \
+       movl    temp2 = start_addr;                             \
+       ;;                                                      \
+       mov     cr.iip = temp2;                                 \
+       ;;                                                      \
+       DATA_PA_TO_VA(sp, temp1);                               \
+       DATA_PA_TO_VA(gp, temp2);                               \
+       srlz.i;                                                 \
+       ;;                                                      \
+       nop     1;                                              \
+       nop     2;                                              \
+       nop     1;                                              \
+       rfi                                                     \
+       ;;
+#endif
 
 /*
  * The following offsets capture the order in which the

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.