ia64/xen-unstable

changeset 15882:923795831f9a

[IA64] tak emulation, minor 4k-page correction

Signed-off-by: Juergen Gross juergen.gross@fujitsu-siemens.com
author Alex Williamson <alex.williamson@hp.com>
date Tue Sep 11 15:12:39 2007 -0600 (2007-09-11)
parents 42caadb14edb
children 4c020dd76b18
files xen/arch/ia64/xen/mm.c xen/arch/ia64/xen/vcpu.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Tue Sep 11 15:09:33 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Tue Sep 11 15:12:39 2007 -0600
     1.3 @@ -527,7 +527,7 @@ u64 translate_domain_pte(u64 pteval, u64
     1.4  
     1.5  	pteval2 = lookup_domain_mpa(d, mpaddr, entry);
     1.6  	if (ps < PAGE_SHIFT)
     1.7 -		pteval2 |= address & (PAGE_SIZE - 1) & ~((1L << ps) - 1);
     1.8 +		pteval2 |= mpaddr & (PAGE_SIZE - 1) & ~((1L << ps) - 1);
     1.9  
    1.10  	/* Check access rights.  */
    1.11  	arflags  = pteval  & _PAGE_AR_MASK;
     2.1 --- a/xen/arch/ia64/xen/vcpu.c	Tue Sep 11 15:09:33 2007 -0600
     2.2 +++ b/xen/arch/ia64/xen/vcpu.c	Tue Sep 11 15:12:39 2007 -0600
     2.3 @@ -1817,10 +1817,16 @@ IA64FAULT vcpu_tpa(VCPU * vcpu, u64 vadr
     2.4  
     2.5  IA64FAULT vcpu_tak(VCPU * vcpu, u64 vadr, u64 * key)
     2.6  {
     2.7 -	printk("vcpu_tak: tak instruction unsupported\n");
     2.8 -	return IA64_ILLOP_FAULT;
     2.9 -	// HACK ALERT: tak does a thash for now
    2.10 -	//return vcpu_thash(vcpu,vadr,key);
    2.11 +	u64 pteval, itir, mask, iha;
    2.12 +	IA64FAULT fault;
    2.13 +
    2.14 +	fault = vcpu_translate(vcpu, vadr, TRUE, &pteval, &itir, &iha);
    2.15 +	if (fault == IA64_NO_FAULT || fault == IA64_USE_TLB)
    2.16 +		*key = itir & IA64_ITIR_KEY_MASK;
    2.17 +	else
    2.18 +		*key = 1;
    2.19 +
    2.20 +	return IA64_NO_FAULT;
    2.21  }
    2.22  
    2.23  /**************************************************************************