Module Name: src
Committed By: maxv
Date: Sat Jan 27 18:27:08 UTC 2018
Modified Files:
src/sys/arch/amd64/include: frameasm.h
Log Message:
Put the default %cs value in INTR_RECURSE_HWFRAME. Pushing an immediate
costs less than reading the %cs register and pushing its value. This
value is not allowed to be != GSEL(GCODE_SEL,SEL_KPL) in all cases.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amd64/include/frameasm.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/include/frameasm.h
diff -u src/sys/arch/amd64/include/frameasm.h:1.33 src/sys/arch/amd64/include/frameasm.h:1.34
--- src/sys/arch/amd64/include/frameasm.h:1.33 Sat Jan 27 18:17:57 2018
+++ src/sys/arch/amd64/include/frameasm.h Sat Jan 27 18:27:08 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: frameasm.h,v 1.33 2018/01/27 18:17:57 maxv Exp $ */
+/* $NetBSD: frameasm.h,v 1.34 2018/01/27 18:27:08 maxv Exp $ */
#ifndef _AMD64_MACHINE_FRAMEASM_H
#define _AMD64_MACHINE_FRAMEASM_H
@@ -168,8 +168,7 @@ usertrap ; \
pushq %r11 ; \
pushq %r10 ; \
pushfq ; \
- movl %cs,%r11d ; \
- pushq %r11 ; \
+ pushq $GSEL(GCODE_SEL,SEL_KPL); \
/* XEN: We must fixup CS, as even kernel mode runs at CPL 3 */ \
XEN_ONLY2(andb $0xfc,(%rsp);) \
pushq %r13 ;