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/os/mach_kdi.c
          +++ new/usr/src/uts/i86pc/os/mach_kdi.c
↓ 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 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2018 Joyent, Inc.
  24   26   */
  25   27  
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  27      -
  28   28  /*
  29   29   * Kernel/Debugger Interface (KDI) routines.  Called during debugger under
  30   30   * various system states (boot, while running, while the debugger has control).
  31   31   * Functions intended for use while the debugger has control may not grab any
  32   32   * locks or perform any functions that assume the availability of other system
  33   33   * services.
  34   34   */
  35   35  
  36   36  #include <sys/systm.h>
  37   37  #include <sys/x86_archext.h>
↓ open down ↓ 68 lines elided ↑ open up ↑
 106  106                  break;
 107  107          case 7:
 108  108                  kdi_setdr7(value);
 109  109                  break;
 110  110          default:
 111  111                  panic("invalid debug register dr%d", reg);
 112  112                  /*NOTREACHED*/
 113  113          }
 114  114  }
 115  115  
 116      -void
 117      -kdi_flush_caches(void)
 118      -{
 119      -        reload_cr3();
 120      -}
 121      -
 122  116  extern void kdi_slave_entry(void);
 123  117  
 124  118  void
 125  119  kdi_stop_slaves(int cpu, int doxc)
 126  120  {
 127  121          if (doxc)
 128  122                  kdi_xc_others(cpu, kdi_slave_entry);
 129  123  }
 130  124  
 131  125  /*
↓ open down ↓ 79 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX