Print this page
de-linting of .s files


  93  * existing %rsp pivot untouched) -- instead we spill registers into
  94  * %gs:CPU_KPTI_* as we need to.
  95  *
  96  * Note that the normal %cr3 values do not cause invalidations with PCIDE - see
  97  * hat_switch().
  98  */
  99 
 100 /*
 101  * The macros here mostly line up with what's in kdi_idthdl.s, too, so if you
 102  * fix bugs here check to see if they should be fixed there as well.
 103  */
 104 
 105 #include <sys/asm_linkage.h>
 106 #include <sys/asm_misc.h>
 107 #include <sys/regset.h>
 108 #include <sys/privregs.h>
 109 #include <sys/psw.h>
 110 #include <sys/machbrand.h>
 111 #include <sys/param.h>
 112 
 113 #if defined(__lint)
 114 
 115 #include <sys/types.h>
 116 #include <sys/thread.h>
 117 #include <sys/systm.h>
 118 
 119 #else   /* __lint */
 120 
 121 #include <sys/segments.h>
 122 #include <sys/pcb.h>
 123 #include <sys/trap.h>
 124 #include <sys/ftrace.h>
 125 #include <sys/traptrace.h>
 126 #include <sys/clock.h>
 127 #include <sys/model.h>
 128 #include <sys/panic.h>
 129 
 130 #if defined(__xpv)
 131 #include <sys/hypervisor.h>
 132 #endif
 133 
 134 #include "assym.h"
 135 
 136         .data
 137         DGDEF3(kpti_enable, 8, 8)
 138         .fill   1, 8, 1
 139 
 140 #if DEBUG


 801         orq     %rbx, %rax
 802 
 803         mov     %rcx, %cr3
 804         add     %rdi, %rsi
 805 .align  ASM_ENTRY_ALIGN
 806 1:
 807         invlpg  (%rdi)
 808         add     %rdx, %rdi
 809         cmp     %rsi, %rdi
 810         jb      1b
 811         mov     %rax, %cr3
 812         pop     %rbx
 813         retq
 814         SET_SIZE(tr_mmu_flush_user_range)
 815 
 816 .align MMU_PAGESIZE
 817 .global kpti_tramp_end
 818 kpti_tramp_end:
 819         nop
 820 
 821 #endif  /* __lint */


  93  * existing %rsp pivot untouched) -- instead we spill registers into
  94  * %gs:CPU_KPTI_* as we need to.
  95  *
  96  * Note that the normal %cr3 values do not cause invalidations with PCIDE - see
  97  * hat_switch().
  98  */
  99 
 100 /*
 101  * The macros here mostly line up with what's in kdi_idthdl.s, too, so if you
 102  * fix bugs here check to see if they should be fixed there as well.
 103  */
 104 
 105 #include <sys/asm_linkage.h>
 106 #include <sys/asm_misc.h>
 107 #include <sys/regset.h>
 108 #include <sys/privregs.h>
 109 #include <sys/psw.h>
 110 #include <sys/machbrand.h>
 111 #include <sys/param.h>
 112 








 113 #include <sys/segments.h>
 114 #include <sys/pcb.h>
 115 #include <sys/trap.h>
 116 #include <sys/ftrace.h>
 117 #include <sys/traptrace.h>
 118 #include <sys/clock.h>
 119 #include <sys/model.h>
 120 #include <sys/panic.h>
 121 
 122 #if defined(__xpv)
 123 #include <sys/hypervisor.h>
 124 #endif
 125 
 126 #include "assym.h"
 127 
 128         .data
 129         DGDEF3(kpti_enable, 8, 8)
 130         .fill   1, 8, 1
 131 
 132 #if DEBUG


 793         orq     %rbx, %rax
 794 
 795         mov     %rcx, %cr3
 796         add     %rdi, %rsi
 797 .align  ASM_ENTRY_ALIGN
 798 1:
 799         invlpg  (%rdi)
 800         add     %rdx, %rdi
 801         cmp     %rsi, %rdi
 802         jb      1b
 803         mov     %rax, %cr3
 804         pop     %rbx
 805         retq
 806         SET_SIZE(tr_mmu_flush_user_range)
 807 
 808 .align MMU_PAGESIZE
 809 .global kpti_tramp_end
 810 kpti_tramp_end:
 811         nop
 812