diff options
author | alc <alc@FreeBSD.org> | 2012-03-22 04:52:51 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2012-03-22 04:52:51 +0000 |
commit | e02fd6b8423e63f1fdbfc1f984d7c7291a1bacd1 (patch) | |
tree | 6628d621fc3b1f91d03b83dcd89b48528e3132fe /sys/amd64/include/proc.h | |
parent | 1c754fb497b9c43672483c1ed5abe4f9176325cd (diff) | |
download | FreeBSD-src-e02fd6b8423e63f1fdbfc1f984d7c7291a1bacd1.zip FreeBSD-src-e02fd6b8423e63f1fdbfc1f984d7c7291a1bacd1.tar.gz |
Handle spurious page faults that may occur in no-fault sections of the
kernel.
When access restrictions are added to a page table entry, we flush the
corresponding virtual address mapping from the TLB. In contrast, when
access restrictions are removed from a page table entry, we do not
flush the virtual address mapping from the TLB. This is exactly as
recommended in AMD's documentation. In effect, when access
restrictions are removed from a page table entry, AMD's MMUs will
transparently refresh a stale TLB entry. In short, this saves us from
having to perform potentially costly TLB flushes. In contrast,
Intel's MMUs are allowed to generate a spurious page fault based upon
the stale TLB entry. Usually, such spurious page faults are handled
by vm_fault() without incident. However, when we are executing
no-fault sections of the kernel, we are not allowed to execute
vm_fault(). This change introduces special-case handling for spurious
page faults that occur in no-fault sections of the kernel.
In collaboration with: kib
Tested by: gibbs (an earlier version)
I would also like to acknowledge Hiroki Sato's assistance in
diagnosing this problem.
MFC after: 1 week
Diffstat (limited to 'sys/amd64/include/proc.h')
-rw-r--r-- | sys/amd64/include/proc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/include/proc.h b/sys/amd64/include/proc.h index 5207d89..14585fb 100644 --- a/sys/amd64/include/proc.h +++ b/sys/amd64/include/proc.h @@ -46,6 +46,7 @@ struct proc_ldt { struct mdthread { int md_spinlock_count; /* (k) */ register_t md_saved_flags; /* (k) */ + register_t md_spurflt_addr; /* (k) Spurious page fault address. */ }; struct mdproc { |