ia64/xen-unstable
changeset 14037:9364bea18bc4
[IA64] First step to support big-endian PV domUs
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
author | awilliam@xenbuild2.aw |
---|---|
date | Thu Feb 22 09:42:13 2007 -0700 (2007-02-22) |
parents | 315c348e5f9e |
children | 202eb735b425 |
files | xen/arch/ia64/xen/faults.c xen/arch/ia64/xen/vcpu.c xen/arch/ia64/xen/xensetup.c |
line diff
1.1 --- a/xen/arch/ia64/xen/faults.c Tue Feb 20 15:43:57 2007 -0700 1.2 +++ b/xen/arch/ia64/xen/faults.c Thu Feb 22 09:42:13 2007 -0700 1.3 @@ -91,6 +91,8 @@ void reflect_interruption(unsigned long 1.4 1.5 regs->cr_iip = ((unsigned long)PSCBX(v, iva) + vector) & ~0xffUL; 1.6 regs->cr_ipsr = (regs->cr_ipsr & ~DELIVER_PSR_CLR) | DELIVER_PSR_SET; 1.7 + if (PSCB(v, dcr) & IA64_DCR_BE) 1.8 + regs->cr_ipsr |= IA64_PSR_BE; 1.9 1.10 if (PSCB(v, hpsr_dfh)) 1.11 regs->cr_ipsr |= IA64_PSR_DFH; 1.12 @@ -154,6 +156,8 @@ void reflect_event(void) 1.13 1.14 regs->cr_iip = v->arch.event_callback_ip; 1.15 regs->cr_ipsr = (regs->cr_ipsr & ~DELIVER_PSR_CLR) | DELIVER_PSR_SET; 1.16 + if (PSCB(v, dcr) & IA64_DCR_BE) 1.17 + regs->cr_ipsr |= IA64_PSR_BE; 1.18 1.19 if (PSCB(v, hpsr_dfh)) 1.20 regs->cr_ipsr |= IA64_PSR_DFH;
2.1 --- a/xen/arch/ia64/xen/vcpu.c Tue Feb 20 15:43:57 2007 -0700 2.2 +++ b/xen/arch/ia64/xen/vcpu.c Thu Feb 22 09:42:13 2007 -0700 2.3 @@ -326,7 +326,7 @@ IA64FAULT vcpu_set_psr_sm(VCPU * vcpu, u 2.4 // just handle psr.sp,pp and psr.i,ic (and user mask) for now 2.5 mask = 2.6 IA64_PSR_PP | IA64_PSR_SP | IA64_PSR_I | IA64_PSR_IC | IA64_PSR_UM | 2.7 - IA64_PSR_DT | IA64_PSR_DFL | IA64_PSR_DFH; 2.8 + IA64_PSR_DT | IA64_PSR_DFL | IA64_PSR_DFH | IA64_PSR_BE; 2.9 if (imm24 & ~mask) 2.10 return IA64_ILLOP_FAULT; 2.11 if (imm.dfh) { 2.12 @@ -370,10 +370,8 @@ IA64FAULT vcpu_set_psr_sm(VCPU * vcpu, u 2.13 ipsr->up = 1; 2.14 psr.up = 1; 2.15 } 2.16 - if (imm.be) { 2.17 - printk("*** DOMAIN TRYING TO TURN ON BIG-ENDIAN!!!\n"); 2.18 - return IA64_ILLOP_FAULT; 2.19 - } 2.20 + if (imm.be) 2.21 + ipsr->be = 1; 2.22 if (imm.dt) 2.23 vcpu_set_metaphysical_mode(vcpu, FALSE); 2.24 __asm__ __volatile(";; mov psr.l=%0;; srlz.d"::"r"(psr):"memory"); 2.25 @@ -450,10 +448,8 @@ IA64FAULT vcpu_set_psr_l(VCPU * vcpu, u6 2.26 vcpu_set_metaphysical_mode(vcpu, FALSE); 2.27 else 2.28 vcpu_set_metaphysical_mode(vcpu, TRUE); 2.29 - if (newpsr.be) { 2.30 - printk("*** DOMAIN TRYING TO TURN ON BIG-ENDIAN!!!\n"); 2.31 - return IA64_ILLOP_FAULT; 2.32 - } 2.33 + if (newpsr.be) 2.34 + ipsr->be = 1; 2.35 if (enabling_interrupts && 2.36 vcpu_check_pending_interrupts(vcpu) != SPURIOUS_VECTOR) 2.37 PSCB(vcpu, pending_interruption) = 1; 2.38 @@ -506,9 +502,6 @@ u64 vcpu_get_ipsr_int_state(VCPU * vcpu, 2.39 2.40 //printk("*** vcpu_get_ipsr_int_state (0x%016lx)...\n",prevpsr); 2.41 psr.i64 = prevpsr; 2.42 - psr.ia64_psr.be = 0; 2.43 - if (dcr & IA64_DCR_BE) 2.44 - psr.ia64_psr.be = 1; 2.45 psr.ia64_psr.pp = 0; 2.46 if (dcr & IA64_DCR_PP) 2.47 psr.ia64_psr.pp = 1; 2.48 @@ -1376,10 +1369,6 @@ IA64FAULT vcpu_rfi(VCPU * vcpu) 2.49 psr.ia64_psr.it = 1; 2.50 psr.ia64_psr.bn = 1; 2.51 //psr.pk = 1; // checking pkeys shouldn't be a problem but seems broken 2.52 - if (psr.ia64_psr.be) { 2.53 - printk("*** DOMAIN TRYING TO TURN ON BIG-ENDIAN!!!\n"); 2.54 - return IA64_ILLOP_FAULT; 2.55 - } 2.56 2.57 ifs = PSCB(vcpu, ifs); 2.58 if (ifs & 0x8000000000000000UL)
3.1 --- a/xen/arch/ia64/xen/xensetup.c Tue Feb 20 15:43:57 2007 -0700 3.2 +++ b/xen/arch/ia64/xen/xensetup.c Thu Feb 22 09:42:13 2007 -0700 3.3 @@ -561,6 +561,9 @@ void arch_get_xen_caps(xen_capabilities_ 3.4 snprintf(s, sizeof(s), "xen-%d.%d-ia64 ", major, minor); 3.5 safe_strcat(*info, s); 3.6 3.7 + snprintf(s, sizeof(s), "xen-%d.%d-ia64be ", major, minor); 3.8 + safe_strcat(*info, s); 3.9 + 3.10 if (vmx_enabled) 3.11 { 3.12 snprintf(s, sizeof(s), "hvm-%d.%d-ia64 ", major, minor);