Fix the last of the instability and the cause of the annoying
"vm_fault: fault on nofault entry, addr: %lx" panic. The problem was a stale PTE in the TLB that marked the page as not present, even though we had a good PTE in the VHPT. We typically don't yet insert PTEs in the TLB. We do that lazily. The CPU will look for the PTE in the VHPT when there's no PTE in the TLB. Unfortunately this doesn't handle the case of the stale PTE in the TLB. The quick fix is to invalidate the TLB (sloppily) when the VHPT doesn't contain a valid PTE. This is also the only case that may cause a PTE in the TLB that marks a page as non-present.
This commit is contained in:
parent
eb64032876
commit
7126a966b3
|
@ -787,8 +787,10 @@ pmap_enter_vhpt(struct ia64_lpte *pte, vm_offset_t va)
|
|||
vhpte->chain = ia64_tpa((vm_offset_t)pte);
|
||||
ia64_mf();
|
||||
|
||||
if (!pmap_lpte_present(vhpte) && pmap_lpte_present(pte))
|
||||
if (!pmap_lpte_present(vhpte) && pmap_lpte_present(pte)) {
|
||||
ia64_ptc_g(va, PAGE_SHIFT << 2);
|
||||
pmap_install_pte(vhpte, pte);
|
||||
}
|
||||
|
||||
mtx_unlock(&pmap_vhptmutex);
|
||||
}
|
||||
|
@ -806,8 +808,10 @@ pmap_update_vhpt(struct ia64_lpte *pte, vm_offset_t va)
|
|||
mtx_lock(&pmap_vhptmutex);
|
||||
|
||||
if ((!pmap_lpte_present(vhpte) || vhpte->tag == pte->tag) &&
|
||||
pmap_lpte_present(pte))
|
||||
pmap_lpte_present(pte)) {
|
||||
ia64_ptc_g(va, PAGE_SHIFT << 2);
|
||||
pmap_install_pte(vhpte, pte);
|
||||
}
|
||||
|
||||
mtx_unlock(&pmap_vhptmutex);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue