Invalidate TLBs explicitly. r1.4 of sys/i386/i386/i686_mem.c removed this
code but probably it only worked by chance because modifying CR4.PGE bit causes invlidation of entire TLBs. Since these are very rare events, this micro-optimization seems useless. Reviewed by: jhb
This commit is contained in:
parent
7d31a76295
commit
50083a5624
@ -321,6 +321,7 @@ amd64_mrstoreone(void *arg)
|
||||
|
||||
/* Flushes caches and TLBs. */
|
||||
wbinvd();
|
||||
invltlb();
|
||||
|
||||
/* Disable MTRRs (E = 0). */
|
||||
wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) & ~MTRR_DEF_ENABLE);
|
||||
@ -388,8 +389,9 @@ amd64_mrstoreone(void *arg)
|
||||
wrmsr(msr + 1, msrv);
|
||||
}
|
||||
|
||||
/* Flush caches, TLBs. */
|
||||
/* Flush caches and TLBs. */
|
||||
wbinvd();
|
||||
invltlb();
|
||||
|
||||
/* Enable MTRRs. */
|
||||
wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE);
|
||||
|
@ -315,6 +315,7 @@ i686_mrstoreone(void *arg)
|
||||
|
||||
/* Flushes caches and TLBs. */
|
||||
wbinvd();
|
||||
invltlb();
|
||||
|
||||
/* Disable MTRRs (E = 0). */
|
||||
wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) & ~MTRR_DEF_ENABLE);
|
||||
@ -382,8 +383,9 @@ i686_mrstoreone(void *arg)
|
||||
wrmsr(msr + 1, msrv);
|
||||
}
|
||||
|
||||
/* Flush caches, TLBs. */
|
||||
/* Flush caches and TLBs. */
|
||||
wbinvd();
|
||||
invltlb();
|
||||
|
||||
/* Enable MTRRs. */
|
||||
wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE);
|
||||
|
Loading…
Reference in New Issue
Block a user