Print this page
8956 Implement KPTI
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/sys/machparam.h
          +++ new/usr/src/uts/i86pc/sys/machparam.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2015 by Delphix. All rights reserved.
  24      - * Copyright 2016 Joyent, Inc.
       24 + * Copyright 2018 Joyent, Inc.
  25   25   */
  26   26  
  27   27  /*      Copyright (c) 1988 AT&T */
  28   28  /*        All Rights Reserved   */
  29   29  
  30   30  
  31   31  #ifndef _SYS_MACHPARAM_H
  32   32  #define _SYS_MACHPARAM_H
  33   33  
  34   34  #if !defined(_ASM)
↓ open down ↓ 251 lines elided ↑ open up ↑
 286  286  
 287  287  /*
 288  288   * Define upper limit on user address space
 289  289   */
 290  290  #define USERLIMIT       KERNELBASE
 291  291  #define USERLIMIT32     USERLIMIT
 292  292  
 293  293  #endif  /* __i386 */
 294  294  
 295  295  /*
 296      - * Reserve pages just below KERNEL_TEXT for the GDT, IDT, TSS and debug info.
      296 + * Reserve pages just below KERNEL_TEXT for the GDT, IDT, LDT, TSS and debug
      297 + * info.
 297  298   *
 298  299   * For now, DEBUG_INFO_VA must be first in this list for "xm" initiated dumps
 299  300   * of solaris domUs to be usable with mdb. Relying on a fixed VA is not viable
 300  301   * long term, but it's the best we've got for now.
 301  302   */
 302  303  #if !defined(_ASM)
 303  304  #define DEBUG_INFO_VA   (KERNEL_TEXT - MMU_PAGESIZE)
 304  305  #define GDT_VA          (DEBUG_INFO_VA - MMU_PAGESIZE)
 305  306  #define IDT_VA          (GDT_VA - MMU_PAGESIZE)
 306      -#define KTSS_VA         (IDT_VA - MMU_PAGESIZE)
      307 +#define LDT_VA          (IDT_VA - (16 * MMU_PAGESIZE))
      308 +#define KTSS_VA         (LDT_VA - MMU_PAGESIZE)
 307  309  #define DFTSS_VA        (KTSS_VA - MMU_PAGESIZE)
 308  310  #define MISC_VA_BASE    (DFTSS_VA)
 309  311  #define MISC_VA_SIZE    (KERNEL_TEXT - MISC_VA_BASE)
 310  312  #endif /* !_ASM */
 311  313  
 312  314  #if !defined(_ASM) && !defined(_KMDB)
 313  315  extern uintptr_t kernelbase, segmap_start, segmapsize;
 314  316  #endif
 315  317  
 316  318  /*
↓ open down ↓ 42 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX