Fix ant dependency on Debian

the ant package must also be explicitly specified, otherwise the following error will raise when building osv. 

raphaelsc@debian:~/Desktop/osv_dir/osv$ make
  ANT tests/bench
Traceback (most recent call last):
  File "scripts/silentant.py", line 14, in <module>
    stderr = subprocess.PIPE)
  File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [all] Error 1
Merge pull request #36 from raphaelsc/master

Fix ant dependency on Debian
osv: fix one compile issue

make[1]: Entering directory `/home/zwu/virt/osv/build/release'
  GEN gen/include/bits/alltypes.h
  AS arch/x64/boot16.o
  LD boot.bin
  AS arch/x64/boot.o
  CXX loader.o
In file included from <command-line>:0:0:
./../../compiler/include/intrinsics.hh:10:127: error: new declaration ‘unsigned char __builtin_ia32_addcarryx_u64(unsigned char, long unsigned int, long unsigned int, long long unsigned int*)’ [-Werror]
./../../compiler/include/intrinsics.hh:10:127: error: ambiguates built-in declaration ‘unsigned char __builtin_ia32_addcarryx_u64(unsigned char, long long unsigned int, long long unsigned int, long long unsigned int*)’ [-Werror]
cc1plus: all warnings being treated as errors
make[1]: *** [loader.o] Error 1
make[1]: Leaving directory `/home/zwu/virt/osv/build/release'
make: *** [all] Error 2

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
percpu: use correct percpu sect size to support 64 vcpus

percpu had too little space allocated to support 64 vcpus, which
lead to a crash when booting with more than 13 vcpus. Fix it by
using a correct size to support 64 vcpus.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
run.py: give some clues to the user when subprocess.call fail

OSerror exceptions throwed by subprocess.call are made silent using pass.
Fix this by properly catching the exception and pretty print it.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
scripts/silenant.py: Fix error message if ant not found

If Apache Ant is not found, the build fails with a cryptic error
message:

  [penberg@localhost osv]$ make
    ANT tests/bench
  Traceback (most recent call last):
    File "scripts/silentant.py", line 14, in <module>
      stderr = subprocess.PIPE)
    File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
      errread, errwrite)
    File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child
      raise child_exception
  OSError: [Errno 2] No such file or directory
  make: *** [all] Error 1

Make it more human friendly:

  [penberg@localhost osv]$ make
    ANT tests/bench
  Apache Ant not found. Please install the 'ant' package.
  make: *** [all] Error 1

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Test: Add a DNS resolver test

This regression test trigger issue #8
"Make Java InetAddress.getHostName() work" by exercising the DNS
resolver on localhost and a dns root server.

The test takes care of specifying NI_NOFQDN to resolve only the
hostname part of localhost ip.

It appears that the DNS ip is not communicated to the libc by
core/dhcp.cci: /etc/resolv.conf is not filled.

Test contributed while waiting for an fix idea to implement.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: kill old js console

Having that implementation in the tree even though it was superceded is
confusing and really unnecessary.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
support etags

add TAGS target to Makefile to support etags.

Signed-off-by: Yang Bai <hamo.by@gmail.com>
run.py: open up port 22 on user mode networking

Port 22 is usually taken on the host, so use port 2222 instead.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Management update

Update to latest mgmt.git:

* mgmt 76f0e7e...97be48e (5):
  > md5sum: fix ugly spew when file doesn't exist
  > ls: handle non-existing files correctly
  > mgmt/crash: Fix printf format string in test.groovy
  > mgmt: Kill obsolete Rhino-based CLI code
  > mgmt/perf: Fix "perf callstack" usability gitch if there are no traces

The important part is Rhino-based CLI removal which seem to cause lot of
problems for people building OSv on other distributions. The usability
fixes to perf, ls, and md5sum commands are also worth the update.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio-blk: Fix dead assignment in virtio_blk::make_virtio_request()

The 'offset' variable is first assigned to "bio->bio_offset" and then
immediately overwritten with "bio->bio_data & 0xfff". Fix that up.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio-blk: Use mmu::page_size constant

Switch to the mmu::page_size constant instead of inventing our own.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Tests: add trivial sleep test

Add a trivial sleep() test, which sleep()s for 2 seconds, and verifies
that this finishes and has slept for roughly 2 seconds.

I used this for debugging issue #26 - the attempts there ruined timers,
and in particular this trivial test hangs, as sleep() never returns.

(A note to our future automatic testing implementor: We need to allow
for the possibility that a test doesn't cleanly fail, but rather hangs,
and consider this a failure too).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Fix comments in lfmutex.cc

Trivial fixes to comments in lock-free mutex implementation.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Comment cleanup in queue-mpsc.hh

Some trivial comment cleanup and line-breaks in queue-mpsc.hh.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Management update to finally remove Rhino dependency

Update to latest mgmt.git:

* mgmt 97be48e...7a4db4e (1):
  > crash: Remove Rhono imports that are not used

It removes the last dependency to the old Rhino-based CLI...

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Comments on the tags target

Added comments to explain the target tags and TAGS,
also ignore the output file of ctags.

Signed-off-by: Yang Bai <hamo.by@gmail.com>
pcpu: register cpu id in our glue code

All the other fields of the pcpu structure BSD expects are initialized by
the event channel. Except for the cpu id, which the code expects to be already
initialized.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
dhcp: store all IP address fields in host order

Some IP fields are stored in host order and some other in network order.
It makes discovery of the code difficult.
Convert all IP fields to host order and propagate to callers.

Signed-off-by: Benoit Canet <benoit@irqsave.net>