git: kernel - Align virtual_start, workaround possible HW VM bugs

Matthew Dillon dillon at crater.dragonflybsd.org
Sat May 28 16:03:49 PDT 2016


commit e172ba36a5ed520510b898ddc1929687d6e4e847
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat May 28 15:56:13 2016 -0700

    kernel - Align virtual_start, workaround possible HW VM bugs
    
    * virtual_start is 2MB-aligned at the kernel load's end address.
      The page table mappings prior to this address are 2MB mappings.
    
      Additional SYSMAP()d space is reserved in early boot, such as
      the CMAP entries and the dmesg buffer.  The page table mappings
      in this area should all be 4K pages.
    
    * Kernel virtual memory beyond the SYSMAP()d space is available for
      general allocation, but positioned such that only kldload modules will
      try to use it specifically.  Sascha (swildner) found that any initial
      kldload done after boot in vmware player 7.1.4 build-3848939 running
      on a i7-4770K based host would panic.
    
      A kernel core of this panic appears to show a corrupt pte in a location
      where the pte should have been read as 0.
    
    * Doing an additional 2MB alignment of virtual_start after the SYSMAP()s
      appears to work around this corruption, which is this commit.  This
      means that the first general allocation in the kernel load portion of
      the kernel_map will be shifted to the next 2MB boundary past the SYSMAP()s.
    
    * I can only speculate that the hardware is somehow getting confused, but
      I can't really fathon how it is getting confused because the SYSMAP
      reservations should all be using 4KB pages.

Summary of changes:
 sys/platform/pc64/x86_64/pmap.c | 1 +
 1 file changed, 1 insertion(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e172ba36a5ed520510b898ddc1929687d6e4e847


-- 
DragonFly BSD source repository



More information about the Commits mailing list