Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/include Put the default %cs value in INTR_REC...



details:   https://anonhg.NetBSD.org/src/rev/8a1e82679f57
branches:  trunk
changeset: 829368:8a1e82679f57
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Jan 27 18:27:08 2018 +0000

description:
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.

diffstat:

 sys/arch/amd64/include/frameasm.h |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (19 lines):

diff -r 3398d1b3b3ea -r 8a1e82679f57 sys/arch/amd64/include/frameasm.h
--- a/sys/arch/amd64/include/frameasm.h Sat Jan 27 18:17:57 2018 +0000
+++ b/sys/arch/amd64/include/frameasm.h Sat Jan 27 18:27:08 2018 +0000
@@ -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 @@
        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                    ;



Home | Main Index | Thread Index | Old Index