]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r269050
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 29 Jul 2014 13:08:37 +0000 (13:08 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 29 Jul 2014 13:08:37 +0000 (13:08 +0000)
commitf89bd9dc3acb3b9adb8d6b416a4d0ab610944ec8
tree26c98ab2406a7375a70ecb98acef5cdee908fc6e
parent158f0e3378c4ad53acabb7869f600bf6be248794
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/10@269235 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/i386/i386/pmap.c