ia64/xen-unstable

changeset 10435:668a225a1df8

[IA64] purge stale tlb entry in ia64_do_page_fault()

fix ia64_do_page_fault(). When it determines to again, it might remains stale
entry in tlb entry hoping next tlb imsert may purge it.
But if reflects faults, the stale entry remains. it must be purged.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@lappy
date Tue Jun 20 16:21:13 2006 -0600 (2006-06-20)
parents c78f750a264c
children f8310e19fcaf
files xen/arch/ia64/xen/faults.c
line diff
     1.1 --- a/xen/arch/ia64/xen/faults.c	Tue Jun 20 16:05:17 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/faults.c	Tue Jun 20 16:21:13 2006 -0600
     1.3 @@ -215,6 +215,8 @@ void ia64_do_page_fault (unsigned long a
     1.4  	unsigned long pteval;
     1.5  	unsigned long is_data = !((isr >> IA64_ISR_X_BIT) & 1UL);
     1.6  	IA64FAULT fault;
     1.7 +	int is_ptc_l_needed = 0;
     1.8 +	u64 logps;
     1.9  
    1.10  	if ((isr & IA64_ISR_IR) && handle_lazy_cover(current, regs)) return;
    1.11  	if ((isr & IA64_ISR_SP)
    1.12 @@ -232,7 +234,6 @@ void ia64_do_page_fault (unsigned long a
    1.13   again:
    1.14  	fault = vcpu_translate(current,address,is_data,&pteval,&itir,&iha);
    1.15  	if (fault == IA64_NO_FAULT || fault == IA64_USE_TLB) {
    1.16 -		u64 logps;
    1.17  		struct p2m_entry entry;
    1.18  		pteval = translate_domain_pte(pteval, address, itir, &logps, &entry);
    1.19  		vcpu_itc_no_srlz(current,is_data?2:1,address,pteval,-1UL,logps);
    1.20 @@ -242,11 +243,18 @@ void ia64_do_page_fault (unsigned long a
    1.21  			   matching.  Undo the work.  */
    1.22  			vcpu_flush_tlb_vhpt_range(address & ((1 << logps) - 1),
    1.23  			                          logps);
    1.24 +
    1.25 +			// the stale entry which we inserted above
    1.26 +			// may remains in tlb cache.
    1.27 +			// we don't purge it now hoping next itc purges it.
    1.28 +			is_ptc_l_needed = 1;
    1.29  			goto again;
    1.30  		}
    1.31  		return;
    1.32  	}
    1.33  
    1.34 +	if (is_ptc_l_needed)
    1.35 +		vcpu_ptc_l(current, address, logps);
    1.36  	if (!user_mode (regs)) {
    1.37  		/* The fault occurs inside Xen.  */
    1.38  		if (!ia64_done_with_exception(regs)) {