# HG changeset patch # User Tristan Gingold # Date 1180910957 -7200 # Node ID f787dcb7f91cda84a436537c4abdc1c371ed41f5 # Parent 9e67720e7650266425bd1b527d86a04467df86b3 Use vcpu_get_psr instead of vcpu_get_ipsr_int_state. Signed-off-by: Tristan Gingold diff -r 9e67720e7650 -r f787dcb7f91c xen/arch/ia64/xen/faults.c --- a/xen/arch/ia64/xen/faults.c Sun Jun 03 23:58:07 2007 +0200 +++ b/xen/arch/ia64/xen/faults.c Mon Jun 04 00:49:17 2007 +0200 @@ -84,7 +84,7 @@ static void reflect_interruption(unsigne check_bad_nested_interruption(isr, regs, vector); PSCB(v, unat) = regs->ar_unat; // not sure if this is really needed? PSCB(v, precover_ifs) = regs->cr_ifs; - PSCB(v, ipsr) = vcpu_get_ipsr_int_state(v, regs->cr_ipsr); + PSCB(v, ipsr) = vcpu_get_psr(v); vcpu_bsw0(v); PSCB(v, isr) = isr; PSCB(v, iip) = regs->cr_iip; @@ -129,7 +129,7 @@ void reflect_event(void) regs->cr_ipsr, regs->cr_iip, isr, PSCB(v, iip)); PSCB(v, unat) = regs->ar_unat; // not sure if this is really needed? PSCB(v, precover_ifs) = regs->cr_ifs; - PSCB(v, ipsr) = vcpu_get_ipsr_int_state(v, regs->cr_ipsr); + PSCB(v, ipsr) = vcpu_get_psr(v); vcpu_bsw0(v); PSCB(v, isr) = isr; PSCB(v, iip) = regs->cr_iip; diff -r 9e67720e7650 -r f787dcb7f91c xen/arch/ia64/xen/vcpu.c --- a/xen/arch/ia64/xen/vcpu.c Sun Jun 03 23:58:07 2007 +0200 +++ b/xen/arch/ia64/xen/vcpu.c Mon Jun 04 00:49:17 2007 +0200 @@ -539,6 +539,8 @@ u64 vcpu_get_psr(VCPU * vcpu) /* Fool cpl. */ if (ipsr.ia64_psr.cpl < 3) newpsr.ia64_psr.cpl = 0; + else + newpsr.ia64_psr.cpl = 3; newpsr.ia64_psr.bn = PSCB(vcpu, banknum); @@ -550,30 +552,6 @@ IA64FAULT vcpu_get_psr_masked(VCPU * vcp u64 psr = vcpu_get_psr(vcpu); *pval = psr & (MASK(0, 32) | MASK(35, 2)); return IA64_NO_FAULT; -} - -u64 vcpu_get_ipsr_int_state(VCPU * vcpu, u64 prevpsr) -{ - u64 dcr = PSCB(vcpu, dcr); - PSR psr; - - //printk("*** vcpu_get_ipsr_int_state (0x%016lx)...\n",prevpsr); - psr.i64 = prevpsr; - psr.ia64_psr.pp = 0; - if (dcr & IA64_DCR_PP) - psr.ia64_psr.pp = 1; - psr.ia64_psr.ic = PSCB(vcpu, interrupt_collection_enabled); - psr.ia64_psr.i = !vcpu->vcpu_info->evtchn_upcall_mask; - psr.ia64_psr.bn = PSCB(vcpu, banknum); - psr.ia64_psr.dfh = PSCB(vcpu, vpsr_dfh); - psr.ia64_psr.dt = 1; - psr.ia64_psr.it = 1; - psr.ia64_psr.rt = 1; - if (psr.ia64_psr.cpl == 2) - psr.ia64_psr.cpl = 0; // !!!! fool domain - // psr.pk = 1; - //printk("returns 0x%016lx...\n",psr.i64); - return psr.i64; } BOOLEAN vcpu_get_psr_ic(VCPU * vcpu) diff -r 9e67720e7650 -r f787dcb7f91c xen/include/asm-ia64/vcpu.h --- a/xen/include/asm-ia64/vcpu.h Sun Jun 03 23:58:07 2007 +0200 +++ b/xen/include/asm-ia64/vcpu.h Mon Jun 04 00:49:17 2007 +0200 @@ -41,7 +41,6 @@ extern IA64FAULT vcpu_get_ar(VCPU * vcpu extern IA64FAULT vcpu_get_ar(VCPU * vcpu, u64 reg, u64 * val); /* psr */ extern BOOLEAN vcpu_get_psr_ic(VCPU * vcpu); -extern u64 vcpu_get_ipsr_int_state(VCPU * vcpu, u64 prevpsr); extern u64 vcpu_get_psr(VCPU * vcpu); extern IA64FAULT vcpu_get_psr_masked(VCPU * vcpu, u64 * pval); extern IA64FAULT vcpu_reset_psr_sm(VCPU * vcpu, u64 imm);