[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] purge stale tlb entry in ia64_do_page_fault()



# HG changeset patch
# User awilliam@lappy
# Node ID 668a225a1df8cfd5b5b84687fe0c1bde9f031349
# Parent  c78f750a264ce0947fb3acb7dfbb528628a2b51d
[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@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/faults.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletion(-)

diff -r c78f750a264c -r 668a225a1df8 xen/arch/ia64/xen/faults.c
--- a/xen/arch/ia64/xen/faults.c        Tue Jun 20 16:05:17 2006 -0600
+++ b/xen/arch/ia64/xen/faults.c        Tue Jun 20 16:21:13 2006 -0600
@@ -215,6 +215,8 @@ void ia64_do_page_fault (unsigned long a
        unsigned long pteval;
        unsigned long is_data = !((isr >> IA64_ISR_X_BIT) & 1UL);
        IA64FAULT fault;
+       int is_ptc_l_needed = 0;
+       u64 logps;
 
        if ((isr & IA64_ISR_IR) && handle_lazy_cover(current, regs)) return;
        if ((isr & IA64_ISR_SP)
@@ -232,7 +234,6 @@ void ia64_do_page_fault (unsigned long a
  again:
        fault = vcpu_translate(current,address,is_data,&pteval,&itir,&iha);
        if (fault == IA64_NO_FAULT || fault == IA64_USE_TLB) {
-               u64 logps;
                struct p2m_entry entry;
                pteval = translate_domain_pte(pteval, address, itir, &logps, 
&entry);
                vcpu_itc_no_srlz(current,is_data?2:1,address,pteval,-1UL,logps);
@@ -242,11 +243,18 @@ void ia64_do_page_fault (unsigned long a
                           matching.  Undo the work.  */
                        vcpu_flush_tlb_vhpt_range(address & ((1 << logps) - 1),
                                                  logps);
+
+                       // the stale entry which we inserted above
+                       // may remains in tlb cache.
+                       // we don't purge it now hoping next itc purges it.
+                       is_ptc_l_needed = 1;
                        goto again;
                }
                return;
        }
 
+       if (is_ptc_l_needed)
+               vcpu_ptc_l(current, address, logps);
        if (!user_mode (regs)) {
                /* The fault occurs inside Xen.  */
                if (!ia64_done_with_exception(regs)) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.