seL4/src
Jack Suann cea45cd1bd x86: Handling pending interrupts in kernel mode
This commit allows x86 to completely handle a pending interrupt without switching
out to user mode. To handle an interrupt on x86 the APIC *must* generate an exception,
prior to you being able to acknowledge it. Previously we only allow exceptions (i.e.
interrupts) to be generated outside of kernel mode when we are in user mode.

This change allows us to 'poll' for an interrupt and transition the APIC whilst in kernel
mode by enabling and taking interrupts at carefully defined points. A pending interrupt
will be stored by the exception handler, allowing us to then handle the interrupt and
acknowledge the hardware APIC. Handling is done by waiting until after we have 'left' the
kernel and are about to switch to user mode and then 'entering' the kernel again by jumping
to the interrupt entry point.

Handling interrupts entirely in kernel mode provides two advantages
 * It will allow, in the future, the ability to handle kernel interrupts in situations
   where we need to handle the interrupt before actually performing the hardware switch
   back to user mode. This case happens where the user thread is using vt-x and so
   pending interrupts do not generate an interrupt exception, but rather cause an exception
   to be generated telling the system that there is a pending interrupt
 * Where there are multiple pending interrupts it is more efficient to avoid additional
   switches in and out of the user thread

Whilst this change does not enable pre-emption points to handle the interrupt before
returning out of `handleSyscall` it should be easily implementable with what is provided.
2017-02-01 12:44:14 +11:00
..
api arm: SELFOUR-781: Only allow threads with VCPU to run outside user mode 2017-01-30 09:47:51 +11:00
arch x86: Handling pending interrupts in kernel mode 2017-02-01 12:44:14 +11:00
benchmark Benchmark: Pack arch-independent benchmark-related files into separate directories 2016-10-20 11:42:04 +11:00
config unsigned int -> word_t 2015-12-10 10:45:21 +11:00
fastpath x64: Rearrange endpoint_cap structure to improve fastpath speed 2017-01-10 17:17:20 +11:00
kernel Simplify conditional 2017-01-30 09:46:40 +11:00
machine SELFOUR-413: changes for verification 2016-11-25 12:30:29 +11:00
model Revert SELFOUR-242 2016-11-16 14:02:11 +11:00
object arm: SELFOUR-781: Only allow threads with VCPU to run outside user mode 2017-01-30 09:47:51 +11:00
plat pc99: Add dependency for X86_FPU_MAX_RESTORES_SINCE_SWITCH in Kconfig 2017-01-13 16:00:33 +11:00
assert.c Release snapshot 2014-07-18 05:03:59 +10:00
inlines.c SELFOUR-413: refactor libsel4 fault API 2016-11-25 12:29:07 +11:00
Makefile Benchmark: Pack arch-independent benchmark-related files into separate directories 2016-10-20 11:42:04 +11:00
string.c Correct separation of printing and debug builds 2016-05-17 15:10:08 +10:00
util.c Mark strncmp as a pure function. 2016-06-29 17:04:28 +10:00