debug: create circular buffer for silent mode

Create a circular buffer that stored all debug messages accordingly.
If the debug buffer is full, reuse it. A method called flush_debug_buffer
is added to enable printing all messages to console if verbose mode is
configured.

The global variable debug_buffer_full is used to track if, when
flushing debug buffer to console, we need to flush both buffer sides.

If verbose boolean variable is set, all messages are printed to the
console after beeing stored in the buffer.

The size of the buffer is 50Kb, defined in debug.hh.

A function debugf that received a variable list of arguments
is defined so we can change some printf from boot sequence
to debugf call. A different name is used to prevent C overload.

Signed-off-by: Eduardo Piva <efpiva@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
loader: Add --verbose option to OSv

Add --verbose options to OSv, so it will flush buffer after
handling the kernel option and set verbose boolean flag in
debug code.

Signed-off-by: Eduardo Piva <efpiva@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
debug: Change calls to printf on boot messages

Change some printf calls on boot messages, so it will call
the apropriate debug function. This will enable OSv
to operate on silent mode.

Added debug.h header so we can link debug functions to C files.

Fixes #118

Signed-off-by: Eduardo Piva <efpiva@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
java: Use debugf() for autotuning message

Make the JVM heap autotuning message silent by default.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
net: fix socket send/receive timeout

Microsecond values were passed as is instead of being scaled by hz.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
tst-kill: fix timeout test

The timeout test sets a 2 second timeout and a 1 second alarm, and expects
the timeout to happen first.

Change the timeout to 0.5 seconds.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Silence the qemu-ifup script

Drop echoing: "SCRIPT, tap0"

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