- Nov 13, 2013
-
-
Tomasz Grabiec authored
Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Spotted by Nadav: libc.threaded field is not set but is used in several 'if' statements when setting the lock_owner field. When 'libc.threaded' is false then 'lock_owner' of a FILE is set to a special value which indicates no locking. This field is initially set to 0 and the original musl code had a logic which upon creation of the first thread set it to true and adjusted 'lock_owner' field of all open files to the value of libc.main_thread. In OSv we had no such logic which resulted in no locking of the FILE structure. This patch fixes the issue by using threaded mode from the very beginning. We also do not rely anymore on posix thread existence so that stdlib can be used very early in the boot process without unexpected behavior. It is used (rightfully or not) for example in ramdisk_init(). We do not have to hold the pthread id in the 'lock_owner' field because the mutex already tracks the owner and we can do the check using 'mutex_owned()' function. This patch also gets rid of a magic value STDIO_SINGLETHREADED, which is of type pthread_t and was used to disable locking when it was known to be not necessary. A new field is introduced named 'no_locking' which serves this purpose. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Takuya ASADA authored
The idea of the patch is basically described in prevoius post: https://groups.google.com/d/msg/osv-dev/RL2S3AL9TNE/l4XZJo3-lI0J Whis this patch, you will be able to install OSv apps into disk image on "make all" stage. These apps does not require to exist in OSv repository, you can install apps which is on any git repository or svn repository, or on local directory. You'll need to write a config file to add apps, format of the file is JSON. Here's a sample of the file: { "modules":[ { "name":"osv-mruby", "type":"git", "path":"https://github.com/syuu1228/osv-mruby.git", "branch":"master" } ] } If you add "module" on config file, make all calls script/module.py. This scripts perform "git clone" to fetch repository to $(out)/module, and invoke "make module" on each module. "make module" should outputs bootfs.manifest/usr.manifest on module directory, the script merge bootfs.manifest.skel/usr.manifest.skel and module local manifests to single file $(out)/bootfs.manifest/$(out)/usr.manifest. Here's app Makefile example: https://github.com/syuu1228/osv-mruby/blob/master/Makefile It have "module" target, and the target builds all binaries and generates *.manifest. Signed-off-by:
Takuya ASADA <syuu@dokukino.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
It simply tells QEMU not to start OSv at startup. To continue the execution, it's possible to use either the QEMU monitor or a GDB remote connection. Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 12, 2013
-
-
Pekka Enberg authored
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>
-
Dmitry Fleytman authored
Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 11, 2013
-
-
Avi Kivity authored
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>
-
Pekka Enberg authored
Use four spaces, not tabs for indentation. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
dleifker@gmail.com authored
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>
-
大谷津昂季 authored
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>
-
Dmitry Fleytman authored
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>
-
Dmitry Fleytman authored
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>
-
Dmitry Fleytman authored
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>
-
Dmitry Fleytman authored
Xen requires explicit image format specification. Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 10, 2013
-
-
dleifker@gmail.com authored
Fixed the following abort when build was running mkzfs.py. Done! eth0: ethernet address: 52:54:0:12:34:56 [I/20 dhcp]: Waiting for IP... [I/26 dhcp]: Server acknowledged IP for interface eth0 [I/26 dhcp]: Configuring eth0: ip 192.168.122.15 subnet mask 255.255.255.0 gateway 192.168.122.1 Aborted Signed-off-by:
David Leifker <dlei...@gmail.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Nov 09, 2013
-
-
Tomasz Grabiec authored
In libc.h there was an optimization which disabled locking when there is only one thread. It was using 'threads_minus_1' field from struct __libc. In OSv this field was always 0, so there was no locking. It was causing memory corruption when running apache benchmark against tomcat in OSv on SMP. This patch makes them go away. The fix is to always lock as in OSv we always have more than one thread. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 08, 2013
-
-
Tomasz Grabiec authored
Attempt to reassign IP for lo0 fails and leaves it without an address. This breaks tomcat: SEVERE: StandardServer.await: create[localhost:8005]: java.net.BindException: Address not available Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Saves a bit of manual work. Example: gdb$ osv info threads 0 (0x1de9e08) cpu0x0 waiting sched::thread::join() at core/sched.cc (SNIP) joining on 0xffffc0003e41e010 Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Dmitry Fleytman authored
Xen guests do not support user mode networking. Fall back to qemu when hypervisor detection used and no external networking configured. This logic is required for build to support Xen hosts properly. Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Takuya ASADA authored
This patch adds to support multiple NIC initialization on loader.cc. Signed-off-by:
Takuya ASADA <syuu@dokukino.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 07, 2013
-
-
Avi Kivity authored
Dead code, and boost::signals2::signal<> does the job better. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
It's preferable to use equal_range() to do VMA lookups so drop the unused find_vma() function. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Replace magic numbers with constants for CR0 and CR4 control register values in arch/x86/boot.S. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Benoît Canet authored
This prevented the script to work on tmpfs. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
As of commit 31fee0fa ("build: Build images as QCOW2 files.") we no longer build raw images. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 06, 2013
-
-
Pekka Enberg authored
condvar_wait() expects an absolute time, not a duration. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
The ACPI subsystem uses the memory allocator a lot so enable the debug allocator before initializing it to detect boot-time problems. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Fill newly allocated memory with a well known pattern (byte, byte+1, byte+2, ...) to catch uses of uninitialized memory. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
We create a memory_image and assign it to _core before *this is fully initialized, triggering corruption in program::_module_index_list. This fixes memory corruption issues seen with the upcoming demand paging patches. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 05, 2013
-
-
Benoît Canet authored
Make use of the python nbd client. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Benoît Canet authored
Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Tomasz Grabiec authored
This fixes 'osv info threads' command. when $rsp holds 0xffffc0003fdf6fc8, ulong() for gdb.Value representing it returns 18446673706036981704. This is out of int range. This causes that thread_context.__exit__() throws "Numeric constant too large" exception from set $rbp = 18446673706036981704 The fix removes the additional conversion as it seems to be unnecessary. The gdb.Value should format itself properly. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Dor Laor authored
Spanning tree causes the bridge port to start in listening mode. That causes dhcp packet to be ignored. Since we're not fearing of layer2 loops, we can safely remove the spanning tree config. Signed-off-by:
Dor Laor <dor@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Add the explanation by Avi Kivity to AcpiOsUnmapMemory() to explain why it's a no-op. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Dmitry Fleytman authored
The script supports 3 modes of operation: - public release (default) for official releases - private release - for internal testing - development instance - for development Public release means AMI created public (visible to everyone) and replicated over all existing Amazon regions. Private release means AMI created private (visible to releaser's account only) and not replicated over regions. Development instance means no AMI created, script stops after instance creation. The script's help screen (--help command line parameter) provides detailed information about script interface, dependencies and configurations required. It's interesting to note that each public release made by this script costs about 20 USD mainly because of AMI replication over Amazon regions Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Dmitry Fleytman authored
Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 04, 2013
-
-
Dmitry Fleytman authored
Due to incorrect mapping logic ACPI tables longer than PAGE_SIZE mapped partially and to wrong base address. As a result system crashed on ACPI tables checksum verification. Found when running on EC2 HVM instances, the problematic table was: ACPI: DSDT 0xfc002c40 0321F (v02 Xen HVM 00000000 INTL 20090220) Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com>
-
Dmitry Fleytman authored
slop made page size by default because this is the most frequent case Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com>
-
Glauber Costa authored
If we do, we'll have extra xen threads running around for no reason in the !xen case. is_xen() should already work here since the initializers are run after cpuid discovery, which is when the information for is_xen is filled up. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-