direct-io.hg

changeset 9308:edc63b5dd71d

[IA64] setting rr0 is not correctly emulated

When guest is not at metaphysical mode, VMM should
set machine rr0.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author awilliam@xenbuild.aw
date Fri Mar 17 13:44:48 2006 -0700 (2006-03-17)
parents 32c39e71740f
children 463c67da6f0a
files xen/arch/ia64/xen/regionreg.c
line diff
     1.1 --- a/xen/arch/ia64/xen/regionreg.c	Fri Mar 17 13:23:59 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/regionreg.c	Fri Mar 17 13:44:48 2006 -0700
     1.3 @@ -249,13 +249,18 @@ int set_one_rr(unsigned long rr, unsigne
     1.4  	newrrv.rid = newrid;
     1.5  	newrrv.ve = 1;  // VHPT now enabled for region 7!!
     1.6  	newrrv.ps = PAGE_SHIFT;
     1.7 -	if (rreg == 0)
     1.8 +
     1.9 +	if (rreg == 0) {
    1.10  		v->arch.metaphysical_saved_rr0 = vmMangleRID(newrrv.rrval);
    1.11 -	else if (rreg == 7)
    1.12 +		if (!PSCB(v,metaphysical_mode))
    1.13 +			set_rr(rr,newrrv.rrval);
    1.14 +	} else if (rreg == 7) {
    1.15  		ia64_new_rr7(vmMangleRID(newrrv.rrval),v->vcpu_info,
    1.16  			     v->arch.privregs, __get_cpu_var(vhpt_paddr),
    1.17  			     (unsigned long) pal_vaddr);
    1.18 -	else set_rr(rr,newrrv.rrval);
    1.19 +	} else {
    1.20 +		set_rr(rr,newrrv.rrval);
    1.21 +	}
    1.22  #endif
    1.23  	return 1;
    1.24  }