readdir(): set missing d_reclen field

Our "struct dirent" returned by readdir() has a field d_reclen, which
our implementation didn't set. Given that our BSD-based implementation
has a constant size (the file name is limited to 256 bytes), d_reclen
is not very interesting since it's always sizeof(dirent). But nevertheless,
we must set it because Linux programs may rely on it.
So this patch correctly sets d_reclen.

In particular, the scandir() implementation we copied from Musl relies
on d_reclen being correctly set, so before this patch, it did not work
correctly (returned empty dirent structures). This patch also adds a
test for scandir(), which fails before this patch, and succeeds with
this patch.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Bump up apps.git pointer

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
make: fix typo in .PHONY

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
make: clean all modules on 'make clean'

If you don't want to clean modules run 'make clean-core'

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts: Support both python2 and python3 for api.py

Since Python3 basestring has been removed. Therefor to use isinstance
it needs to pass str instead of basestring.

Signed-off-by: Masami Ichikawa <masami256@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
x64: Introduce the instruction RDRAND

Note that the size of the register used as an output determines
the size of the random data to be returned by the instruction.
For our goals, i.e., adding the RDRAND instruction as a source of
entropy into our CSPRNG, this variant is quite sufficient.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
x64: random: provide RDRAND as a source of entropy for CSPRNG

Add RDRAND as a conditional hardware source of entropy, i.e.,
it will only be registered into the CSPRNG when supported by
the underlying CPU.
A wrapper function was created to fit the CSPRNG interface
for registering sources of entropy, and also handle certain
caveats from the RDRAND instruction.
Implementation was based on the following Intel Manual:
Intel(r) Digital Random Number Generator (DRNG)

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
mempool: make sure that alignof(max_align_t) >= 2 * sizeof(size_t)

The default alignment of objects allocated by glibc's malloc is no
less than 2 * sizeof(size_t). Make sure that alignof(max_align_t)
fulfils that requirement.

Cc: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
disable rt lock
no arp lock
no timer lock
get rid of unnecessary recursive locking
disable routing lock

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mempool: remove contention inside unfill_page_buffer()

This change reduces page buffer pressure caused by virtio-net
allocations, showign up as contention inside unfill_page_buffer() and
refill_page_buffer(). The virtio-net subsystem allocates pages on one
CPU which are then scattered across all other CPUs and freed to their
per-CPU buffers. To mitigate that, this change enables caching of
pages used by virtio-net.
net_device_options
disable msleep
Revert "disable msleep"

This reverts commit a24f287945f8c970c3e7a1e230971dd576a0a497.
Add trace_in_pcblookup_hash_locked

Signed-off-by: Asias He <asias@cloudius-systems.com>
ci
ci