WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] First step to support big-endian P

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] First step to support big-endian PV domUs
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Feb 2007 09:50:32 -0800
Delivery-date: Fri, 23 Feb 2007 10:21:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1172162533 25200
# Node ID 9364bea18bc4a2d83923a8ffd1481952e635c80f
# Parent  315c348e5f9e2f929032dae3fec3e2583ca91785
[IA64] First step to support big-endian PV domUs

Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/faults.c   |    4 ++++
 xen/arch/ia64/xen/vcpu.c     |   21 +++++----------------
 xen/arch/ia64/xen/xensetup.c |    3 +++
 3 files changed, 12 insertions(+), 16 deletions(-)

diff -r 315c348e5f9e -r 9364bea18bc4 xen/arch/ia64/xen/faults.c
--- a/xen/arch/ia64/xen/faults.c        Tue Feb 20 15:43:57 2007 -0700
+++ b/xen/arch/ia64/xen/faults.c        Thu Feb 22 09:42:13 2007 -0700
@@ -91,6 +91,8 @@ void reflect_interruption(unsigned long 
 
        regs->cr_iip = ((unsigned long)PSCBX(v, iva) + vector) & ~0xffUL;
        regs->cr_ipsr = (regs->cr_ipsr & ~DELIVER_PSR_CLR) | DELIVER_PSR_SET;
+       if (PSCB(v, dcr) & IA64_DCR_BE)
+               regs->cr_ipsr |= IA64_PSR_BE;
 
        if (PSCB(v, hpsr_dfh))
                regs->cr_ipsr |= IA64_PSR_DFH;  
@@ -154,6 +156,8 @@ void reflect_event(void)
 
        regs->cr_iip = v->arch.event_callback_ip;
        regs->cr_ipsr = (regs->cr_ipsr & ~DELIVER_PSR_CLR) | DELIVER_PSR_SET;
+       if (PSCB(v, dcr) & IA64_DCR_BE)
+               regs->cr_ipsr |= IA64_PSR_BE;
 
        if (PSCB(v, hpsr_dfh))
                regs->cr_ipsr |= IA64_PSR_DFH;
diff -r 315c348e5f9e -r 9364bea18bc4 xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Tue Feb 20 15:43:57 2007 -0700
+++ b/xen/arch/ia64/xen/vcpu.c  Thu Feb 22 09:42:13 2007 -0700
@@ -326,7 +326,7 @@ IA64FAULT vcpu_set_psr_sm(VCPU * vcpu, u
        // just handle psr.sp,pp and psr.i,ic (and user mask) for now
        mask =
            IA64_PSR_PP | IA64_PSR_SP | IA64_PSR_I | IA64_PSR_IC | IA64_PSR_UM |
-           IA64_PSR_DT | IA64_PSR_DFL | IA64_PSR_DFH;
+           IA64_PSR_DT | IA64_PSR_DFL | IA64_PSR_DFH | IA64_PSR_BE;
        if (imm24 & ~mask)
                return IA64_ILLOP_FAULT;
        if (imm.dfh) {
@@ -370,10 +370,8 @@ IA64FAULT vcpu_set_psr_sm(VCPU * vcpu, u
                ipsr->up = 1;
                psr.up = 1;
        }
-       if (imm.be) {
-               printk("*** DOMAIN TRYING TO TURN ON BIG-ENDIAN!!!\n");
-               return IA64_ILLOP_FAULT;
-       }
+       if (imm.be)
+               ipsr->be = 1;
        if (imm.dt)
                vcpu_set_metaphysical_mode(vcpu, FALSE);
        __asm__ __volatile(";; mov psr.l=%0;; srlz.d"::"r"(psr):"memory");
@@ -450,10 +448,8 @@ IA64FAULT vcpu_set_psr_l(VCPU * vcpu, u6
                vcpu_set_metaphysical_mode(vcpu, FALSE);
        else
                vcpu_set_metaphysical_mode(vcpu, TRUE);
-       if (newpsr.be) {
-               printk("*** DOMAIN TRYING TO TURN ON BIG-ENDIAN!!!\n");
-               return IA64_ILLOP_FAULT;
-       }
+       if (newpsr.be)
+               ipsr->be = 1;
        if (enabling_interrupts &&
            vcpu_check_pending_interrupts(vcpu) != SPURIOUS_VECTOR)
                PSCB(vcpu, pending_interruption) = 1;
@@ -506,9 +502,6 @@ u64 vcpu_get_ipsr_int_state(VCPU * vcpu,
 
        //printk("*** vcpu_get_ipsr_int_state (0x%016lx)...\n",prevpsr);
        psr.i64 = prevpsr;
-       psr.ia64_psr.be = 0;
-       if (dcr & IA64_DCR_BE)
-               psr.ia64_psr.be = 1;
        psr.ia64_psr.pp = 0;
        if (dcr & IA64_DCR_PP)
                psr.ia64_psr.pp = 1;
@@ -1376,10 +1369,6 @@ IA64FAULT vcpu_rfi(VCPU * vcpu)
        psr.ia64_psr.it = 1;
        psr.ia64_psr.bn = 1;
        //psr.pk = 1;  // checking pkeys shouldn't be a problem but seems broken
-       if (psr.ia64_psr.be) {
-               printk("*** DOMAIN TRYING TO TURN ON BIG-ENDIAN!!!\n");
-               return IA64_ILLOP_FAULT;
-       }
 
        ifs = PSCB(vcpu, ifs);
        if (ifs & 0x8000000000000000UL) 
diff -r 315c348e5f9e -r 9364bea18bc4 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Tue Feb 20 15:43:57 2007 -0700
+++ b/xen/arch/ia64/xen/xensetup.c      Thu Feb 22 09:42:13 2007 -0700
@@ -561,6 +561,9 @@ void arch_get_xen_caps(xen_capabilities_
     snprintf(s, sizeof(s), "xen-%d.%d-ia64 ", major, minor);
     safe_strcat(*info, s);
 
+    snprintf(s, sizeof(s), "xen-%d.%d-ia64be ", major, minor);
+    safe_strcat(*info, s);
+
     if (vmx_enabled)
     {
         snprintf(s, sizeof(s), "hvm-%d.%d-ia64 ", major, minor);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] First step to support big-endian PV domUs, Xen patchbot-unstable <=