sched: change timer state inside atomic context

timer_base is a thread-agnostic interface for per-CPU timers.  The
current code is prone to a race condition involving set() and
cancel(). The latter may attempt to remove the timer before it was
inserted into timer tree.

Found during code inspection.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts/gen-vmx.sh: Reduce virtualHW version

ESXi 5.5 can not edit virtualHW.version = 10 vmx file. Reducing to 8
works in ESXi.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
build: be forgiving to missing newlines in manifest

Running "make image=mgmt,iperf" failed because the last line in
apps/iperf/usr.manifest did not have a newline, and was copied
without a newline, which caused it to be stuck together to the first
line of mgmt's manifest.

Fix this by explicitly adding a newline character to each line we add to
the generated manifest file - whether or not the original manifest had one.

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mgmt: update to latest

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: pass -X to less

Option -F should always be used with -X. Without this flag if output
is smaller than the screen then no output will be shown.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: fix how mappings into ARC buffer are tracked

Currently all mapping are keyed on ARC buffer start when mapping is
added, but on remove pointer into ARC buffer is used, so remove may
leave no longer valid mappings in the database. This patch fixes it
by using a pointer into ARC as a key, the same pointer that is used
during removal.
move call to remove_mapping/add_mapping to mmu.cc
pass pointer to pte instead of virtual address to page_allocator
mmu: constify hw_ptep methods that do not change pte it points to

This allows those function to be called on const object.
pass type of faule (r/w) to page allocator
return cow status from page allocators
mmu: add write pagecache implementation on top of ARC

This patch adds write page cache implementation. Page cache is limited
in size and pages are evicted from it in FIFO order.
mmu: page_allocator specialization to allocated from pagecache
enable page cache