osv/clock.hh: Add std::chrono::duration literals

In <drivers/clock.hh> we had support for time literals looking like 100_ns,
100_us, 100_ms, 100_s. These simply translated to an integer number of
nanoseconds.

Added to <osv/clock.hh> similar literals, but using strongly-typed
std::chrono::duration, so that 100_ms translates to
std::chrono::milliseconds(100), and this is, as usual, automatically
scaled by the compiler to other units when other units (e.g., nanoseconds)
are required.

Because the literals of <drivers/clock.hh> and <osv/clock.hh> have the
same name, to use the latter you need to explicitly enable them in a scope
using the statement

    using namespace osv::clock::literals;

One the entire codebase is converted to use <osv/clock.hh> and std::chrono,
the old literals from <drivers/clock.hh> should be removed.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add osv::clock::wall

Add a type-safe std::chrono interface to the wall-clock time. E.g., use
use osv::clock::wall::now() to get an std::chrono::time_point instead
of clock::get()->time() which returns an s64.

This patch also changes clock_gettime(CLOCK_REALTIME) and gettimeofday()
to use the new osv::clock::wall::now() interface.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: fix help text of 'trace.py summary'

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
libc: Make RLIMIT_STACK 1 MB in size

Currently, RLIMIT_STACK is 64 KB.  This is too small for the JVM which
limits stack size to RLIMIT_STACK if a VMA range that covers address
found in '__libc_stack_end' in /proc/self/maps.

So in preparation for procfs support, bump up RLIMIT_STACK to 1 MB.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vfs: 'struct file' to VOP_READ

Add 'struct file' to VOP_READ API. This is needed for procfs which
generates file contents at open() time and read() must operate on it,
not the vnode.

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

Add procfs_maps() function to core/mmu.cc that returns all the VMAs
formatted for Linux compatible "/proc/<pid>/maps" file.

This will be called by the procfs filesystem.

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

This patch adds a simple Linux compatible procfs filesystem.  It
currently implements a "/proc/self/maps" file which is looked up by
OpenJDK during startup.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vfs: mount procfs at boot

Add a '/proc' directory to OSv image and mount procfs on it.

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