build: speed up native null build

Drop implicit makefile rules; this prevents make from looking for fortran
source files, etc.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
build: don't delete loader.img

Removing loader.img causes a null build to rebuild it and usr.img.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Merge branch 'build'

- faster builds

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
build: Use Gradle daemon mode for 'make clean'

Before:

  [penberg@localhost osv]$ time make clean
    CLEAN
    GRADLE CLEAN

  real	0m4.026s
  user	0m8.732s
  sys	0m0.212s

After:

  [penberg@localhost osv]$ time make clean
    CLEAN
    GRADLE CLEAN

  real	0m1.658s
  user	0m0.962s
  sys	0m0.162s

Signeg-off-by: Pekka Enberg <penberg@cloudius-systems.com>
x64: Enable sleeping in fault context

In preparation for enabling demand paging, enable sleeping in fault
context by using a per-thread exception stack for normal faults and
per-CPU exception stack for nested faults.

Avi Kivity explains:

  Before [demand paging] can even hope to work, we need to enable
  sleeping in fault context.  Right now each cpu has its own exception
  stack, which leads immediately to stack corruption:

  thread 1 faults
  enters exception stack
  tries to take mutex
  scheduler switches to thread 2
  thread 2 faults
  enters same exception stack

  So we need to switch stacks.  This can be done in the same way as for
  interrupt stacks (see thread::switch_to()).

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Fix relative path of submodule

Fork project on github will cause submodule trying to
fetch submodule under fork user not cloudius-system.

Signed-off-by: Yang Bai <hamo.by@gmail.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
x64: nested exceptions

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Revert "x64: nested exceptions"

This reverts commit c4d913b05868011acd5f120f8bb74406c0a1e743.
mman: Fix mmap() tracepoint

Use separate tracepoints for mmap() entry and exit points so that we
trace the entry even if the rest of the operation crashes the kernel.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: Separate page table population and allocation

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: Use on-demand paging for anonymous virtual memory

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