bf1e897425
value on entry and exit. This isn't as easy as it sounds because when we recursively trap or interrupt, we have to avoid duplicating the swapgs instruction or we end up back with the userland %gs. I implemented this by testing TF_CS to see if we're coming from supervisor mode already, and check for returning to supervisor. To avoid a race with interrupts in the brief period after beginning executing the handler and before the swapgs, convert all trap gates to interrupt gates, and reenable interrupts immediately after the swapgs. I am not happy with this. There are other possible ways to do this that should be investigated. (eg: storing the GS.base MSR value in the trapframe) Add some sysarch functions to let the userland code get to this. Approved by: re (blanket amd64/*) |
||
---|---|---|
.. | ||
atpic_vector.S | ||
clock.c | ||
icu_ipl.S | ||
icu_vector.S | ||
icu.h | ||
intr_machdep.c | ||
intr_machdep.h | ||
isa_dma.c | ||
isa_dma.h | ||
isa.c | ||
isa.h | ||
ithread.c | ||
nmi.c | ||
npx.c | ||
timerreg.h | ||
vector.S |