ia64/xen-unstable

changeset 13903:8bdbe88e422f

[IA64] Fix save/restore bug

DCR.dm fix, in case v->arch.privregs is NULL

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author awilliam@xenbuild2.aw
date Mon Feb 12 10:10:37 2007 -0700 (2007-02-12)
parents 5982d478698f
children 6c63ff548888
files xen/arch/ia64/linux-xen/setup.c xen/arch/ia64/xen/domain.c
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/setup.c	Mon Feb 12 10:06:46 2007 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/setup.c	Mon Feb 12 10:10:37 2007 -0700
     1.3 @@ -862,8 +862,7 @@ cpu_init (void)
     1.4  	 * be fine).
     1.5  	 */
     1.6  #ifdef XEN
     1.7 -	ia64_setreg(_IA64_REG_CR_DCR,  (  IA64_DCR_DP | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_DR
     1.8 -			  | IA64_DCR_PP | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC));
     1.9 +	ia64_setreg(_IA64_REG_CR_DCR, IA64_DEFAULT_DCR_BITS);
    1.10  #else
    1.11  	ia64_setreg(_IA64_REG_CR_DCR,  (  IA64_DCR_DP | IA64_DCR_DK | IA64_DCR_DX | IA64_DCR_DR
    1.12  					| IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC));
     2.1 --- a/xen/arch/ia64/xen/domain.c	Mon Feb 12 10:06:46 2007 -0700
     2.2 +++ b/xen/arch/ia64/xen/domain.c	Mon Feb 12 10:10:37 2007 -0700
     2.3 @@ -581,7 +581,7 @@ void arch_get_info_guest(struct vcpu *v,
     2.4  		er->dtrs[i].rid = v->arch.dtrs[i].rid;
     2.5  	}
     2.6  	er->event_callback_ip = v->arch.event_callback_ip;
     2.7 -	er->dcr = PSCB(v,dcr);
     2.8 +	er->dcr = v->arch.privregs ? PSCB(v,dcr) : 0;
     2.9  	er->iva = v->arch.iva;
    2.10  }
    2.11  
    2.12 @@ -617,7 +617,6 @@ int arch_set_info_guest(struct vcpu *v, 
    2.13  			             er->dtrs[i].rid);
    2.14  		}
    2.15  		v->arch.event_callback_ip = er->event_callback_ip;
    2.16 -		PSCB(v,dcr) = er->dcr;
    2.17  		v->arch.iva = er->iva;
    2.18  	}
    2.19