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/rm_platter.h
          +++ new/usr/src/uts/i86pc/sys/rm_platter.h
↓ open down ↓ 18 lines elided ↑ open up ↑
  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   */
  24   24  /*
  25   25   * Copyright (c) 2010, Intel Corporation.
  26   26   * All rights reserved.
  27   27   */
  28   28  /*
  29      - * Copyright 2011 Joyent, Inc. All rights reserved.
       29 + * Copyright 2018 Joyent, Inc.
  30   30   */
  31   31  
  32   32  #ifndef _SYS_RM_PLATTER_H
  33   33  #define _SYS_RM_PLATTER_H
  34   34  
  35   35  #include <sys/types.h>
  36   36  #include <sys/tss.h>
  37   37  #include <sys/segments.h>
  38   38  
  39   39  #ifdef  __cplusplus
↓ open down ↓ 66 lines elided ↑ open up ↑
 106  106  } rm_platter_t;
 107  107  
 108  108  /*
 109  109   * cpu tables put within a single structure two of the tables which need to be
 110  110   * allocated when a CPU starts up.
 111  111   *
 112  112   * Note: the tss should be 16 byte aligned for best performance on amd64
 113  113   * Since DEFAULTSTKSIZE is a multiple of PAGESIZE tss will be aligned.
 114  114   */
 115  115  struct cpu_tables {
 116      -        char            ct_stack[DEFAULTSTKSZ];
      116 +        /* IST stacks */
      117 +        char            ct_stack1[DEFAULTSTKSZ];        /* dblfault */
      118 +#if !defined(__xpv)
      119 +        char            ct_stack2[DEFAULTSTKSZ];        /* nmi */
      120 +        char            ct_stack3[DEFAULTSTKSZ];        /* mce */
      121 +#endif
 117  122          tss_t           ct_tss;
 118  123  };
 119  124  
 120  125  /*
 121  126   * gdt entries are 8 bytes long, ensure that we have an even no. of them.
 122  127   */
 123  128  #if ((NGDT / 2) * 2 != NGDT)
 124  129  #error "rm_platter.h: tss not properly aligned"
 125  130  #endif
 126  131  
 127  132  #ifdef  __cplusplus
 128  133  }
 129  134  #endif
 130  135  
 131  136  #endif  /* _SYS_RM_PLATTER_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX