sched, x64: save and restore exception stack during reschedule

switch_to() always sets exception pointer in tss to primary exception
stack, so when scheduling happens from an exception nested stack
configuration is lost. Fix it by saving and restoring current exception
stack from tss.

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
x64: disable interrupts before switching exception stack

Interrupt may happen after exception stack is switched, but before
exception handler returns. If interrupt handler will causes exception
it will overwrite current stack.

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
x64: enlarge exception stack to 16k

Page fault handler may call into zfs and in some cases this causes
exception stack overflow. Enlarge exception stack to 16k to prevent
overflow.

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Merge branch 'flush-fixes' of https://github.com/gleb-cloudius/osv

"This series fixes problems that we see with Glaubers glommer/zfsbuffers
branch. The branch has code that maps read only pages directly from zfs
ARC cache. During heavy testing there are a lot of tlb flushes and page
faults and at some point test fails with stack corruption."

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>