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

*** 20,36 **** */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _SYS_MACHPRIVREGS_H #define _SYS_MACHPRIVREGS_H - #pragma ident "%Z%%M% %I% %E% SMI" - /* * Platform dependent instruction sequences for manipulating * privileged state */ --- 20,36 ---- */ /* * 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 /* * Platform dependent instruction sequences for manipulating * privileged state */
*** 75,93 **** #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 CLEAN_CS /* empty */ /* * Macros for saving the original segment registers and restoring them --- 75,93 ---- #define IRET iretq #define SYSRETQ sysretq #define SYSRETL sysretl #define SWAPGS swapgs #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,137 **** swapgs; \ movq REGOFF_RSI(%rsp), %rsi; \ movq REGOFF_RDI(%rsp), %rdi; \ addq $REGOFF_RIP, %rsp ! #define FAST_INTR_RETURN iretq #elif defined(__i386) #define FAST_INTR_PUSH \ cld; \ --- 127,137 ---- swapgs; \ movq REGOFF_RSI(%rsp), %rsi; \ movq REGOFF_RDI(%rsp), %rdi; \ addq $REGOFF_RIP, %rsp ! #define FAST_INTR_RETURN jmp tr_iret_user #elif defined(__i386) #define FAST_INTR_PUSH \ cld; \