poll: fix poll_sync() on unconnected sockets

An unconnected socket needs to wait for a connection event; this does not
change sockbuf::sb_cc and so can't be waited on with sbwait().

Detect this and bail out early.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
poll: fix poll_sync() early termination

sbwait() can return with a false positive (say with an ACK only
packet) and so we return with incorrect results.

Fix by looping until we get either some events or a timeout.

Seen in netperf.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
mgmt: update

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
mmu: implement madvise(MADV_NOHUGEPAGE)

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
gdb: fix "osv info thread" to show correct thread address

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
tests: fix unsigned/signed comparison in misc-free-perf.cc

thread_allocator::next_core is compared against sched::cpus.size().
GCC 4.9 doesn't like the fact that the former is signed and the latter
is unsigned.

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts: Fix download.osv.io S3 bucket name

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts: Fix capstan release upload

We can no longer use "--delete-removed" because the S3 bucket hosts
Capstan executables and access logs.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
mmu: remove unused function debug_count_ptes

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
ring_spsc: revert the previous commit to push()

It's ok to load _begin with relaxed ordering (in the size()) since
store to _ring[end & MaxSizeMask] may not be reordered with it due to
control dependency (see Documentation/memory-barriers.txt in the
Linux tree).

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
mmu: call correct unmap() callback for huge pages in unpopulate class

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
aarch64: implement lock adapter for arch_fpu

this fixes AArch64 build broken by #202b2ccc

Cc: Avi Kivity <avi@cloudius-systems.com>
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
merge with master