Print this page
8956 Implement KPTI
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

@@ -20,17 +20,17 @@
  */
 
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright 2018 Joyent, Inc.
  */
 
 #ifndef _SYS_MACHPRIVREGS_H
 #define _SYS_MACHPRIVREGS_H
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 /*
  * Platform dependent instruction sequences for manipulating
  * privileged state
  */
 

@@ -75,19 +75,19 @@
 
 #define IRET    iretq
 #define SYSRETQ sysretq
 #define SYSRETL sysretl
 #define SWAPGS  swapgs
-#define XPV_TRAP_POP    /* empty */
-#define XPV_TRAP_PUSH   /* empty */
 
 #elif defined(__i386)
 
 #define IRET    iret
 
 #endif  /* __i386 */
 
+#define XPV_TRAP_POP    /* empty */
+#define XPV_TRAP_PUSH   /* empty */
 #define CLEAN_CS        /* empty */
 
 
 /*
  * Macros for saving the original segment registers and restoring them

@@ -127,11 +127,11 @@
         swapgs;                         \
         movq    REGOFF_RSI(%rsp), %rsi; \
         movq    REGOFF_RDI(%rsp), %rdi; \
         addq    $REGOFF_RIP, %rsp
 
-#define FAST_INTR_RETURN        iretq
+#define FAST_INTR_RETURN        jmp tr_iret_user
 
 #elif defined(__i386)
 
 #define FAST_INTR_PUSH          \
         cld;                    \