x64: Fix nested exception debugging

As of commit a449b88 ("x64: Enable sleeping in fault context") it's now
safe for another thread to enter a fault handler on the same CPU. Fix
exception guard to reflect that.

This is needed for demand paging where a page fault from another thread
can happen on the same CPU where a thread is sleeping in the page fault
handler.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: VMA permission flags

Add permission flags to VMAs. They will be used by mprotect() and the
page fault handler.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: Fix mincore() for non-resident mmaps

Fix mincore() to follow Linux ABI and return ENOMEM only if (part of
the) memory range is unmapped even if it's not resident.  This is needed
for mincore() to work with demand paged mmaps.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: Anonymous memory demand paging

Switch to demand paging for anonymous virtual memory.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>