]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Invalidate cache for the PDPTE page when using PAE paging but PAT is
authorkib <kib@FreeBSD.org>
Thu, 28 Feb 2019 19:19:02 +0000 (19:19 +0000)
committerkib <kib@FreeBSD.org>
Thu, 28 Feb 2019 19:19:02 +0000 (19:19 +0000)
commite6e5d3c6572c5e46d3f33d44988d76fe508e19a1
tree128e49a8d2d974614cabda9c398d1f324aecbe5f
parent79e2e116a7d867c811df4d060947d2219a2feee2
Invalidate cache for the PDPTE page when using PAE paging but PAT is
not supported.

According to SDM rev. 69 vol. 3, for PDPTE registers loads:
- when PAT is not supported, access to the PDPTE page is performed as
  UC, see 4.9.1;
- when PAT is supported, the access is WB, see 4.9.2.

So potentially CPU might load stale memory as PDPTEs if both PAT and
self-snoop are not implemented.  To be safe, add total local cache
flush to pmap_cold() before initial load of cr3, and flush PDPTE page
in pmap_pinit(), if PAT is not implemented.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D19365
sys/i386/i386/pmap.c