summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2018-05-11 15:27:44 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2018-05-11 15:27:44 +0000
commit92456120ed2ba84f9ba69cce113b6c33a9c07a3e (patch)
tree87b1520d1776a212fe86695902d70b4328195653 /sys
parent3ddafc57c9f1159c7fa0a401161775a3ab82c10d (diff)
Fix fallout from i386 Meltdown preparation which is using interrupt
gates now. Interrupts for dna, fpu, and f00f_redirect were not properly enabled. Thus npxintr() tried to get the kernel lock with interrupts disabled causing a deadlock in pmap_tlb_shootwait(). Enable interrupts for dna, fpu, and f00f_redirect. dna and fpu leave the kernel directly, thus they have to disable interrupts again; f00f_redirect goes through calltrap which will enable interrupts. from hshoexer@; OK mlarkin@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/locore.s7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index c01bd6253f2..8a8b22f7a38 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.185 2018/04/11 15:44:08 bluhm Exp $ */
+/* $OpenBSD: locore.s,v 1.186 2018/05/11 15:27:43 bluhm Exp $ */
/* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */
/*-
@@ -988,6 +988,7 @@ IDTVEC(dna)
pushl $0 # dummy error code
pushl $T_DNA
INTRENTRY(dna)
+ sti
pushl CPUVAR(SELF)
call *_C_LABEL(npxdna_func)
addl $4,%esp
@@ -996,6 +997,7 @@ IDTVEC(dna)
#ifdef DIAGNOSTIC
movl $0xfd,%esi
#endif
+ cli
INTRFASTEXIT
#else
ZTRAP(T_DNA)
@@ -1015,6 +1017,7 @@ IDTVEC(prot)
IDTVEC(f00f_redirect)
pushl $T_PAGEFLT
INTRENTRY(f00f_redirect)
+ sti
testb $PGEX_U,TF_ERR(%esp)
jnz calltrap
movl %cr2,%eax
@@ -1050,6 +1053,7 @@ IDTVEC(fpu)
*/
subl $8,%esp /* space for tf_{err,trapno} */
INTRENTRY(fpu)
+ sti
pushl CPL # if_ppl in intrframe
pushl %esp # push address of intrframe
incl _C_LABEL(uvmexp)+V_TRAP
@@ -1058,6 +1062,7 @@ IDTVEC(fpu)
#ifdef DIAGNOSTIC
movl $0xfc,%esi
#endif
+ cli
INTRFASTEXIT
#else
ZTRAP(T_ARITHTRAP)