diff options
author | kib <kib@FreeBSD.org> | 2015-12-03 11:14:14 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-12-03 11:14:14 +0000 |
commit | f741f698b73f18777a27f138b3cfc8ad44bde038 (patch) | |
tree | 75c40eece99b5dfdb79cdf57b3e74fd84f9976f0 /sys/i386/include/pmap.h | |
parent | 559961c499e55f090d0cd285103c25e0dfc18d02 (diff) | |
download | FreeBSD-src-f741f698b73f18777a27f138b3cfc8ad44bde038.zip FreeBSD-src-f741f698b73f18777a27f138b3cfc8ad44bde038.tar.gz |
For amd64 non-PCID machines, and for i386 machines with support for
the PG_G global pte flag, pmap_invalidate_all() fails to flush global
TLB entries [*]. This is because TLB shootdown handler for such
configs reloads CR3, and on i386 pmap_invalidate_all() does the same
for the initiating CPU. Note that current code does not issue total
invalidation requests for the kernel_pmap.
Rename amd64 function invltlb_globpcid() to invltlb_glob(), it is not
specific for PCID for quite some time, and implement the same
functionality for i386. Use the function instead of invltlb() in
shootdown handlers and in i386 pmap_invalidate_all(), but only for the
kernel pmap (which maps pages with the PG_G attribute set), which
takes care of PG_G TLB entries on flush.
To detect the affected pmap in i386 TLB shootdown handler, pmap should
be passed to the smp_masked_invltlb() function, which makes amd64 and
i386 TLB shootdown code almost identical. Merge the code under x86/.
Noted by: jhb [*]
Reviewed by: cem, jhb, pho
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4346
Diffstat (limited to 'sys/i386/include/pmap.h')
-rw-r--r-- | sys/i386/include/pmap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 76822b1..f2d8c58 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -394,6 +394,8 @@ void pmap_invalidate_cache_pages(vm_page_t *pages, int count); void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force); +void invltlb_glob(void); + #endif /* _KERNEL */ #endif /* !LOCORE */ |