# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1180988181 21600
# Node ID 3e170567505a3463bc8f59315b5da0e14cbd1cd8
# Parent f3f59dafaa18bd36b13f3ac36d0dfad926a666df
[IA64] Use vcpu_get_psr instead of vcpu_get_ipsr_int_state.
Signed-off-by: Tristan Gingold <tgingold@xxxxxxx>
---
xen/arch/ia64/xen/faults.c | 4 ++--
xen/arch/ia64/xen/vcpu.c | 26 ++------------------------
xen/include/asm-ia64/vcpu.h | 1 -
3 files changed, 4 insertions(+), 27 deletions(-)
diff -r f3f59dafaa18 -r 3e170567505a xen/arch/ia64/xen/faults.c
--- a/xen/arch/ia64/xen/faults.c Mon Jun 04 14:14:35 2007 -0600
+++ b/xen/arch/ia64/xen/faults.c Mon Jun 04 14:16:21 2007 -0600
@@ -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 f3f59dafaa18 -r 3e170567505a xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c Mon Jun 04 14:14:35 2007 -0600
+++ b/xen/arch/ia64/xen/vcpu.c Mon Jun 04 14:16:21 2007 -0600
@@ -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 f3f59dafaa18 -r 3e170567505a xen/include/asm-ia64/vcpu.h
--- a/xen/include/asm-ia64/vcpu.h Mon Jun 04 14:14:35 2007 -0600
+++ b/xen/include/asm-ia64/vcpu.h Mon Jun 04 14:16:21 2007 -0600
@@ -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);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|