]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC: r269050
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 29 Jul 2014 13:08:46 +0000 (13:08 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 29 Jul 2014 13:08:46 +0000 (13:08 +0000)
commitd937177dc70b4f61bd6ba83bff0aa6ba755196da
tree846e453f8c9f5bb337d9753a3366164a9db1d028
parent2a91529c993c016c15998b09e6da052a79c6c00e
MFC: r269050

- Copying and zeroing pages via temporary mappings involves updating the
  corresponding page tables followed by accesses to the pages in question.
  This sequence is subject to the situation exactly described in the "AMD64
  Architecture Programmer's Manual Volume 2: System Programming" rev. 3.23,
  "7.3.1 Special Coherency Considerations" [1, p. 171 f.]. Therefore, issuing
  the INVLPG right after modifying the PTE bits is crucial.
  For pmap_copy_page(), this has been broken in r124956 and later on carried
  over to pmap_copy_pages() derived from the former, while all other places
  in the i386 PMAP code use the correct order of instructions in this regard.
  Fixing the latter breakage solves the problem of data corruption seen with
  unmapped I/O enabled when running at least bare metal on AMD R-268D APUs.
  However, this might also fix similar corruption reported for virtualized
  environments.
- In pmap_copy_pages(), correctly set the cache bits on the source page being
  copied. This change is thought to be a NOP for the real world, though. [2]

1: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf

Submitted by: kib [2]
Reviewed by: alc, kib
Sponsored by: Bally Wulff Games & Entertainment GmbH

git-svn-id: svn://svn.freebsd.org/base/stable/9@269236 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/i386/i386/pmap.c