run.py: Make Xen treat OSv image as QCOW2 file

Xen requires explicit image format specification.

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
build: option to choose OSv image format via make command line

Default image format stays QCOW2 as before.  May be changed via img_format
variable:

  make img_fomat=raw all

This option is required by release-ec2 script as EC2 does not support QCOW2.
Also will be useful for other hypervisors like VMWARE.

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
release-ec2: force build to create raw OSv image

EC2 does not support QCOW2. Force build to create RAW image.

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
ip: fix IP defragmentation mechanism for big packets

Current limit of fragments number for IP packet is 16.
This is not enough for packets bigger than 24K on standard MTU.
This patch increases this number up to theoretical maximum.

The problem found during UDP RX performance testing - throughput
dropped to 0 for 32K UDP packets.

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
ovs: fix build error. (bsd/porting/networking.cc)

do not need initialize variable. (or use memset(3) for zero clear.)
Because set of values by ioctl(SIOCGIFFLAGS)

```
(snip)
  CC bsd/sys/kern/sys_socket.o
  CC bsd/sys/kern/subr_disk.o
  CC bsd/porting/route.o
  CXX bsd/porting/networking.o
../../bsd/porting/networking.cc: In function ‘int osv::ifup(std::string)’:
 ../../bsd/porting/networking.cc:99:30: error: missing braces around
initializer for ‘char [16]’ [-Werror=missing-braces]
cc1plus: all warnings being treated as errors
make[1]: *** [bsd/porting/networking.o] Error 1
make[1]: Leaving directory
`/home/kouki-o/work/kaishuu0123-osv/build/release'
make: *** [all] Error 2
(snip)
```

Signed-off-by: Kouki Ooyatsu <kaishuu0123@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Fix make flag in readme for debug mode

The -j must have been included by mistake, otherwise make uses unlimited
jobs.

Signed-off-by: David Leifker <dlei...@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
bsd: Fix formatting in porting/network.cc

Use four spaces, not tabs for indentation.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
build: fix .tls_template_size calculation

For an unknown reason, the current calculation of .tls_template_size
yields 0x10 instead of the correct value.  This results in part of the
initial tls block being freed by arch::setup(), and subsequent
corruption.

Fix by switching to the ld SIZEOF() operator.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
release-ec2: fix AMI replication code

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
x64: Fix stack alignment in fault handlers

Make sure stack pointer is 16-byte aligned in fault handler as required
by x86-64 ABI. This is needed for the page fault handler to be able to
use stack for FPU state save/restore.

Spotted by Nadav.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>