Print this page
Bring back LX zones.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/ml/syscall_asm_amd64.s
          +++ new/usr/src/uts/i86pc/ml/syscall_asm_amd64.s
↓ open down ↓ 1151 lines elided ↑ open up ↑
1152 1152          ALTENTRY(sys_sysenter_swapgs_sysexit)
1153 1153          swapgs
1154 1154          sti
1155 1155          sysexit
1156 1156          SET_SIZE(sys_sysenter_swapgs_sysexit)
1157 1157          SET_SIZE(sys_sysenter)
1158 1158          SET_SIZE(_sys_sysenter_post_swapgs)
1159 1159          SET_SIZE(brand_sys_sysenter)
1160 1160  
1161 1161  #endif  /* __lint */
     1162 + 
     1163 +#if defined(__lint)
     1164 +/*
     1165 + * System call via an int80.  This entry point is only used by the Linux
     1166 + * application environment.  Unlike the other entry points, there is no
     1167 + * default action to take if no callback is registered for this process.
     1168 + */
     1169 +void
     1170 +sys_int80()
     1171 +{}
     1172 +
     1173 +#else   /* __lint */
     1174 +
     1175 +        ENTRY_NP(brand_sys_int80)
     1176 +        SWAPGS                          /* kernel gsbase */
     1177 +        XPV_TRAP_POP
     1178 +        BRAND_CALLBACK(BRAND_CB_INT80, BRAND_URET_FROM_INTR_STACK())
     1179 +        SWAPGS                          /* user gsbase */
     1180 +        jmp     nopop_int80
     1181 +
     1182 +        ENTRY_NP(sys_int80)
     1183 +        /*
     1184 +         * We hit an int80, but this process isn't of a brand with an int80
     1185 +         * handler.  Bad process!  Make it look as if the INT failed.
     1186 +         * Modify %rip to point before the INT, push the expected error
     1187 +         * code and fake a GP fault. Note on 64-bit hypervisor we need
     1188 +         * to undo the XPV_TRAP_POP and push rcx and r11 back on the stack
     1189 +         * because gptrap will pop them again with its own XPV_TRAP_POP.
     1190 +         */
     1191 +        XPV_TRAP_POP
     1192 +nopop_int80:
     1193 +        subq    $2, (%rsp)      /* int insn 2-bytes */
     1194 +        pushq   $_CONST(_MUL(T_INT80, GATE_DESC_SIZE) + 2)
     1195 +#if defined(__xpv)
     1196 +        push    %r11
     1197 +        push    %rcx
     1198 +#endif
     1199 +        jmp     gptrap                  / GP fault
     1200 +        SET_SIZE(sys_int80)
     1201 +        SET_SIZE(brand_sys_int80)
     1202 +#endif  /* __lint */
     1203 +
1162 1204  
1163 1205  /*
1164 1206   * This is the destination of the "int $T_SYSCALLINT" interrupt gate, used by
1165 1207   * the generic i386 libc to do system calls. We do a small amount of setup
1166 1208   * before jumping into the existing sys_syscall32 path.
1167 1209   */
1168 1210  #if defined(__lint)
1169 1211  
1170 1212  /*ARGSUSED*/
1171 1213  void
↓ open down ↓ 137 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX