ia64/xen-unstable

changeset 15161:3e170567505a

[IA64] Use vcpu_get_psr instead of vcpu_get_ipsr_int_state.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
author Alex Williamson <alex.williamson@hp.com>
date Mon Jun 04 14:16:21 2007 -0600 (2007-06-04)
parents f3f59dafaa18
children 0cf6b75423e9
files xen/arch/ia64/xen/faults.c xen/arch/ia64/xen/vcpu.c xen/include/asm-ia64/vcpu.h
line diff
     1.1 --- a/xen/arch/ia64/xen/faults.c	Mon Jun 04 14:14:35 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/faults.c	Mon Jun 04 14:16:21 2007 -0600
     1.3 @@ -84,7 +84,7 @@ static void reflect_interruption(unsigne
     1.4  		check_bad_nested_interruption(isr, regs, vector);
     1.5  	PSCB(v, unat) = regs->ar_unat;	// not sure if this is really needed?
     1.6  	PSCB(v, precover_ifs) = regs->cr_ifs;
     1.7 -	PSCB(v, ipsr) = vcpu_get_ipsr_int_state(v, regs->cr_ipsr);
     1.8 +	PSCB(v, ipsr) = vcpu_get_psr(v);
     1.9  	vcpu_bsw0(v);
    1.10  	PSCB(v, isr) = isr;
    1.11  	PSCB(v, iip) = regs->cr_iip;
    1.12 @@ -129,7 +129,7 @@ void reflect_event(void)
    1.13  		       regs->cr_ipsr, regs->cr_iip, isr, PSCB(v, iip));
    1.14  	PSCB(v, unat) = regs->ar_unat;	// not sure if this is really needed?
    1.15  	PSCB(v, precover_ifs) = regs->cr_ifs;
    1.16 -	PSCB(v, ipsr) = vcpu_get_ipsr_int_state(v, regs->cr_ipsr);
    1.17 +	PSCB(v, ipsr) = vcpu_get_psr(v);
    1.18  	vcpu_bsw0(v);
    1.19  	PSCB(v, isr) = isr;
    1.20  	PSCB(v, iip) = regs->cr_iip;
     2.1 --- a/xen/arch/ia64/xen/vcpu.c	Mon Jun 04 14:14:35 2007 -0600
     2.2 +++ b/xen/arch/ia64/xen/vcpu.c	Mon Jun 04 14:16:21 2007 -0600
     2.3 @@ -539,6 +539,8 @@ u64 vcpu_get_psr(VCPU * vcpu)
     2.4  	/* Fool cpl.  */
     2.5  	if (ipsr.ia64_psr.cpl < 3)
     2.6  		newpsr.ia64_psr.cpl = 0;
     2.7 +	else
     2.8 +		newpsr.ia64_psr.cpl = 3;
     2.9  
    2.10  	newpsr.ia64_psr.bn = PSCB(vcpu, banknum);
    2.11  	
    2.12 @@ -552,30 +554,6 @@ IA64FAULT vcpu_get_psr_masked(VCPU * vcp
    2.13  	return IA64_NO_FAULT;
    2.14  }
    2.15  
    2.16 -u64 vcpu_get_ipsr_int_state(VCPU * vcpu, u64 prevpsr)
    2.17 -{
    2.18 -	u64 dcr = PSCB(vcpu, dcr);
    2.19 -	PSR psr;
    2.20 -
    2.21 -	//printk("*** vcpu_get_ipsr_int_state (0x%016lx)...\n",prevpsr);
    2.22 -	psr.i64 = prevpsr;
    2.23 -	psr.ia64_psr.pp = 0;
    2.24 -	if (dcr & IA64_DCR_PP)
    2.25 -		psr.ia64_psr.pp = 1;
    2.26 -	psr.ia64_psr.ic = PSCB(vcpu, interrupt_collection_enabled);
    2.27 -	psr.ia64_psr.i = !vcpu->vcpu_info->evtchn_upcall_mask;
    2.28 -	psr.ia64_psr.bn = PSCB(vcpu, banknum);
    2.29 -	psr.ia64_psr.dfh = PSCB(vcpu, vpsr_dfh);
    2.30 -	psr.ia64_psr.dt = 1;
    2.31 -	psr.ia64_psr.it = 1;
    2.32 -	psr.ia64_psr.rt = 1;
    2.33 -	if (psr.ia64_psr.cpl == 2)
    2.34 -		psr.ia64_psr.cpl = 0;	// !!!! fool domain
    2.35 -	// psr.pk = 1;
    2.36 -	//printk("returns 0x%016lx...\n",psr.i64);
    2.37 -	return psr.i64;
    2.38 -}
    2.39 -
    2.40  BOOLEAN vcpu_get_psr_ic(VCPU * vcpu)
    2.41  {
    2.42  	return !!PSCB(vcpu, interrupt_collection_enabled);
     3.1 --- a/xen/include/asm-ia64/vcpu.h	Mon Jun 04 14:14:35 2007 -0600
     3.2 +++ b/xen/include/asm-ia64/vcpu.h	Mon Jun 04 14:16:21 2007 -0600
     3.3 @@ -41,7 +41,6 @@ extern IA64FAULT vcpu_set_ar(VCPU * vcpu
     3.4  extern IA64FAULT vcpu_get_ar(VCPU * vcpu, u64 reg, u64 * val);
     3.5  /* psr */
     3.6  extern BOOLEAN vcpu_get_psr_ic(VCPU * vcpu);
     3.7 -extern u64 vcpu_get_ipsr_int_state(VCPU * vcpu, u64 prevpsr);
     3.8  extern u64 vcpu_get_psr(VCPU * vcpu);
     3.9  extern IA64FAULT vcpu_get_psr_masked(VCPU * vcpu, u64 * pval);
    3.10  extern IA64FAULT vcpu_reset_psr_sm(VCPU * vcpu, u64 imm);