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>
Merge pull request #40 from hamo/support_etags

support etags
dhcp: Remove double htonl conversion.

After 5f0e973398 htonl was called twice: once before calling
dhcp_mbuf::compose_request and once more inside this function.
Fix this, verified on wire packets with wireshark and audited code.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
run.py: Fix error message if QEMU/KVM is not installed

This adds a user-friendly error message to run.py if QEMU/KVM is not
installed.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
run.py: Fix QEMU missing error message

Fix up the error message as suggested by Nadav.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
xen: declare shared types as atomic

Some of the fields in the xen shared structure need to be accessed atomically.
Move them to std::atomic so we can do that using C++11 primitives.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
xen: rework interrupt handler

This version of the Xen interrupt handler tries to do as less work as possible
in the interrupt itself. The previous version and my previous fix attempt would
still clean the channels during interrupt.

Because now we have pending_sel still set in the irq thread, we can ditch
_irq_pending completely.

There is now only one xen_irq for the entire system, and therefore I am
registering one per cpu, since we will eventually have to process this in
different cpus. (for different event channels).

With this, in my (very course, host to guest) netperf test, I am achieving
9600 * 10^6 bps, while linux can reach ~10000 * 10^bps. So we're getting close:

Recv   Send    Send
Socket Socket  Message  Elapsed
Size   Size    Size     Time     Throughput
bytes  bytes   bytes    secs.    10^6bits/sec

 65536  16384  16384    10.00    9589.32

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
xen: use c++ interrupt handler

Now that we have an efficient interrupt handler, use it.No need to delete the
old bsd code, just to avoid disrupting the file too much. Make sure through
an assertion that it is never used, though.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Update devices-and-drivers.txt

Fixed some minor spelling mistakes