diff options
-rw-r--r-- | sys/amd64/amd64/exception.S | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S index f1cbe35..fd0a7ca 100644 --- a/sys/amd64/amd64/exception.S +++ b/sys/amd64/amd64/exception.S @@ -636,13 +636,10 @@ doreti_iret: .globl doreti_iret_fault doreti_iret_fault: subq $TF_RIP,%rsp /* space including tf_err, tf_trapno */ - testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ - jz 1f /* already running with kernel GS.base */ - swapgs -1: testl $PSL_I,TF_RFLAGS(%rsp) - jz 2f + testl $PSL_I,TF_RFLAGS(%rsp) + jz 1f sti -2: movq %rdi,TF_RDI(%rsp) +1: movq %rdi,TF_RDI(%rsp) movq %rsi,TF_RSI(%rsp) movq %rdx,TF_RDX(%rsp) movq %rcx,TF_RCX(%rsp) |