zfs: align vdev_label_t buffer to page boundary

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
xen: align grant table to page boundary

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
vmxnet3: Fix TSO support on VMware Player/Workstation/Fusion

There's a report that TSO support on VMware Player/Workstation/Fusion was broken on upstream OS of this driver(FreeBSD):
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=185849
This patch is backported from the fix on FreeBSD:
http://svnweb.freebsd.org/base?view=revision&revision=267253

fixed #340

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Remove dead code

Remove copyinuio() function. Not needed any more, and shouldn't be needed
in the future (there is no reason to allocate a uio on the heap, and there's
a reason to copy the iovecs, which this function didn't).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Remove double include

Signed-off-by: KANATSU Minoru <icc.pot.tyew272@gmail.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
tcp: trim mbuf to IP packet length in the net channel path

Fixes #342.

According to RFC894 the minimum ethernet frame size is 60 bytes. When
the packet is smaller than that it should be padded. Looks like vmxnet
in constrast to virtio-net respects this rule and pads small packets
with zeros.

FreeBSD's stack is prepared for this, the mbuf is trimmed in
ip_preprocess_packet() which is called from ip_input(). However our
net channel fast path did not have this logic. This patch adds the
missing processing to tcp_net_channel_packet().

Reported-by: Lyor Goldstein <lgoldstein@vmware.com>
Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Test readv() and fread()

This test confirms bug issue #354, and verifies its fix.

It demonstrates that readv() wrongly modified its const parameter, and
fread() returned garbage data (compared to the correct data returned by
getc() and read()), and that after this bug's fix, both readv() and
fread() work correctly.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Fix writev() as well

This patch fixes a bug in writev() identical to the one we already fixed
in readv() - it illegally modified its const argument.

The patch also adds to tests/tst-uio.cc a test for this bug.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
elf: warn when using unsupported combination of PIE and TLS

As explained in issue #352, a PIE (position-independent executable) using
TLS (thread-local storage) does not currently work correctly. Fixing this
case is not easy, but until we do, it is dangerous to allow this case to
be ignored, as it causes reading and writing to wrong positions in memory
whenever TLS is used in the PIE.

So this patch adds a warning printout (to stdout) whenever one attempts to
load a PIE which has any TLS variables.

This is, of course, just a temporary measure. The real solution is to fix
object load and not just warn.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
dhcp: add handling of option 121 "Classless Static Route"

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

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
modules: add the osvinit module

This adds the osvinit module to the image.

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

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