summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-07-04 15:54:25 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-07-04 15:54:25 +0000
commit6f3b6d3594db252ac8a61c14b28a0748c186e47e (patch)
tree416d048f58d761cc0b408348e57309c69a47ffaf /sys/arch/amd64/include
parent06bca8dcdc4007afb154cfd8ea27c5eeb21619e2 (diff)
Force the sigreturn syscall to return to userspace via iretq by setting
the MDP_IRET flag in md_proc, then switch sigcode to enter the kernel via syscall instead of int$80. Rearrange the return paths in both the sysretq and iretq paths to reduce how long interrupts are blocked and shave instructions. ok kettenis@, extra testing krw@
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r--sys/arch/amd64/include/frameasm.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/arch/amd64/include/frameasm.h b/sys/arch/amd64/include/frameasm.h
index 57fb5bff2c8..83388ab874d 100644
--- a/sys/arch/amd64/include/frameasm.h
+++ b/sys/arch/amd64/include/frameasm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frameasm.h,v 1.5 2011/04/13 02:49:12 guenther Exp $ */
+/* $OpenBSD: frameasm.h,v 1.6 2011/07/04 15:54:24 guenther Exp $ */
/* $NetBSD: frameasm.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
#ifndef _AMD64_MACHINE_FRAMEASM_H
@@ -30,24 +30,6 @@
movq %rcx,TF_RCX(%rsp) ; \
movq %rax,TF_RAX(%rsp)
-#define INTR_RESTORE_GPRS \
- movq TF_R15(%rsp),%r15 ; \
- movq TF_R14(%rsp),%r14 ; \
- movq TF_R13(%rsp),%r13 ; \
- movq TF_R12(%rsp),%r12 ; \
- movq TF_R11(%rsp),%r11 ; \
- movq TF_R10(%rsp),%r10 ; \
- movq TF_R9(%rsp),%r9 ; \
- movq TF_R8(%rsp),%r8 ; \
- movq TF_RDI(%rsp),%rdi ; \
- movq TF_RSI(%rsp),%rsi ; \
- movq TF_RBP(%rsp),%rbp ; \
- movq TF_RBX(%rsp),%rbx ; \
- movq TF_RDX(%rsp),%rdx ; \
- movq TF_RCX(%rsp),%rcx ; \
- movq TF_RAX(%rsp),%rax ; \
- addq $120,%rsp
-
#define INTRENTRY \
subq $32,%rsp ; \
testq $SEL_UPL,56(%rsp) ; \