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/i86xpv/os/xpv_panic.c
          +++ new/usr/src/uts/i86xpv/os/xpv_panic.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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) 2012 Gary Mills
  23   23   * Copyright 2016 PALO, Richard.
  24   24   *
  25   25   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
       26 + *
       27 + * Copyright 2018 Joyent, Inc.
  26   28   */
  27   29  
  28   30  #include <sys/types.h>
  29   31  #include <sys/clock.h>
  30   32  #include <sys/psm.h>
  31   33  #include <sys/archsystm.h>
  32   34  #include <sys/machsystm.h>
  33   35  #include <sys/compress.h>
  34   36  #include <sys/modctl.h>
  35   37  #include <sys/trap.h>
↓ open down ↓ 131 lines elided ↑ open up ↑
 167  169          pteptr = (x86pte_t *)PWIN_PTE_VA(level);
 168  170          pte = pfn_to_pa(pfn) | PT_VALID;
 169  171  
 170  172          XPV_ALLOW_PAGETABLE_UPDATES();
 171  173          if (mmu.pae_hat)
 172  174                  *pteptr = pte;
 173  175          else
 174  176                  *(x86pte32_t *)pteptr = pte;
 175  177          XPV_DISALLOW_PAGETABLE_UPDATES();
 176  178  
 177      -        mmu_tlbflush_entry(PWIN_VA(level));
      179 +        mmu_flush_tlb_page((uintptr_t)PWIN_VA(level));
 178  180  }
 179  181  
 180  182  /*
 181  183   * Walk the page tables to find the pfn mapped by the given va.
 182  184   */
 183  185  static pfn_t
 184  186  xpv_va_walk(uintptr_t *vaddr)
 185  187  {
 186  188          int l, idx;
 187  189          pfn_t pfn;
↓ open down ↓ 840 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX