direct-io.hg

changeset 10596:c78f750a264c

[IA64] Fix for ptc.ga emulation

If switch to idle domain after vhpt_purge in ptc_ga emulation,
shouldn't switch rr7 and pta. Only disable VHPT needed. If no,
Smp VTi will hang whole system due to fault.

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
author awilliam@lappy
date Tue Jun 20 16:05:17 2006 -0600 (2006-06-20)
parents c5005be9ef91
children 668a225a1df8
files xen/arch/ia64/xen/regionreg.c
line diff
     1.1 --- a/xen/arch/ia64/xen/regionreg.c	Tue Jun 20 15:56:48 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/regionreg.c	Tue Jun 20 16:05:17 2006 -0600
     1.3 @@ -345,13 +345,19 @@ void load_region_regs(struct vcpu *v)
     1.4  
     1.5  void load_region_reg7_and_pta(struct vcpu *v)
     1.6  {
     1.7 -	unsigned long rr7;
     1.8 +	unsigned long rr7, pta;
     1.9  
    1.10 -	ia64_set_pta(VHPT_ADDR | (1 << 8) | (VHPT_SIZE_LOG2 << 2) |
    1.11 -		     VHPT_ENABLED);
    1.12 +	if (!is_idle_domain(v->domain)) {  
    1.13 +		ia64_set_pta(VHPT_ADDR | (1 << 8) | (VHPT_SIZE_LOG2 << 2) |
    1.14 +		             VHPT_ENABLED);
    1.15  
    1.16 -	// TODO: These probably should be validated
    1.17 -	rr7 =  VCPU(v,rrs[7]);
    1.18 -	if (!set_one_rr(0xe000000000000000L, rr7))
    1.19 -		panic_domain(0, "%s: can't set!\n", __func__);
    1.20 +		// TODO: These probably should be validated
    1.21 +		rr7 =  VCPU(v,rrs[7]);
    1.22 +		if (!set_one_rr(0xe000000000000000L, rr7))
    1.23 +			panic_domain(0, "%s: can't set!\n", __func__);
    1.24 +	}
    1.25 +	else {
    1.26 +		pta = ia64_get_pta();
    1.27 +		ia64_set_pta(pta & ~VHPT_ENABLED);
    1.28 +	}
    1.29  }