- Aug 13, 2013
-
-
Avi Kivity authored
It doesn't exist there. [ glommer: use the alternative system ]
-
Glauber Costa authored
Now that we have everything in place, ask the loader to be able to probe the xenbus.
-
- Aug 11, 2013
-
-
Avi Kivity authored
This adds fairly basic support for rcu. Declaring: mutex mtx; rcu_ptr<my_object> my_ptr; Read-side: WITH_LOCK(rcu_read_lock) { const my_object* p = my_ptr.read(); // do things with *p // but don't block! } Write-side: WITH_LOCK(mtx) { my_object* old = my_ptr.read_by_owner(); my_object* p = new my_object; // ... my_ptr.assign(p); rcu_dispose(old); // or rcu_defer(some_func, old); }
-
- Jul 18, 2013
-
-
Avi Kivity authored
tls is needed for per-cpu storage, so initialize it before the rest of the scheduler.
-
Avi Kivity authored
Avoid a #include loop with later patches.
-
- Jul 08, 2013
-
-
Guy Zana authored
the elf is mapped in a 1:1 fashion, so this patch allows addresses of static variables to be translated as well (needed for next patch).
-
- Jul 02, 2013
-
-
Christoph Hellwig authored
-
- Jun 17, 2013
-
-
Guy Zana authored
console:init() calls wake() but the scheduler is not fully initialized at this point, disable preemption as soon as main_cont starts and disable it after smp_launch()
-
- Jun 12, 2013
-
-
Glauber Costa authored
Now that we can actually see the debug message, print our name on it. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
Glauber Costa authored
We could benefit from the console being ready a bit earlier. The only dependency that I see to it are the interrupts that need to be working. So as soon as we initialize the ioapic, we should be able to initialize the console. This is not the end of story: we still need an even earlier console to debug the driver initialization functions, and I was inclined to just leave console_init where it is, for now. But additionally, I felt that loader is really a more appropriate place for that than vfs_init... So I propose we switch. In the mean time, it might help debug things that happen between ioapic init and the old vfs_init (mem initialization, smp bring up, etc) Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
- Jun 04, 2013
-
-
Guy Zana authored
the convention in linux is that argv[0] holds the program executable. I had an attempt to run netserver not from the CLI and it didn't work because its argument parsing got broken.
-
- Jun 03, 2013
-
-
Nadav Har'El authored
Java doesn't trust pthread_getattr_np() to work for the main thread in Linux, so instead it relies on a global variable __libc_stack_end, which we didn't implement and therefore causing an annoying message. This patch implements __libc_stack_end. Pardoxically, this shouldn't point to the real stack end (we can easily find this our sched::thread interfaces) but a little below it, because Java expects the address to be in the stack, not one byte above it. So we use __builtin_frame_address(0) to find the current frame's address. Unfortunately, while this elliminates one warning message, another one remains - because Java later expects to read /proc/self/maps and doesn't find it.
-
- May 23, 2013
-
-
Nadav Har'El authored
Added a "--noshutdown" option to loader which prevents a shutdown (and a poweroff), after main() returns. Note that this doesn't just replace poweroff() by halt() - with this option, the system *isn't* halted after main() returns, but rather continues as usual - possibly still running other threads that main() didn't wait for, running various system threads and services, and so on.
-
- May 22, 2013
-
-
Nadav Har'El authored
Call the new poweroff() function after the payload finishes running. Makes sense on a cloud (why would you want to pay the provider after your workload is done?) as well as for our benchmarking, where we want qemu to exit after running the benchmark. When the "--leak" option is used, instead of calling poweroff(), we call hang(), so that QEMU continues to run and we can attach the debugger to run "osv leak show". Note that before this patch, if the payload spawned threads, they could continue running after the payload's main() return. This is no longer the case - after main() returns, the entire virtual machine is shut down (or just hung). This is reasonable behavior, though: If the payload needs some threads to continue running, it should join() them before returning. The behavior on Linux (and Posix threads in general) is identical to our new behavior: When main() of a multithreaded program returns, all threads are killed.
-
- May 20, 2013
-
-
Avi Kivity authored
Use the generic one instead; the cleanup function allows destroying the pthread object.
-
- May 06, 2013
-
-
Avi Kivity authored
Somehow this worked by accident, but we need to zero the .tbss section or random data will be used to initialize it.
-
- May 02, 2013
-
-
Avi Kivity authored
fontconfig.so is loaded without a fully qualified path; it expects the search path to be used.
-
- Apr 25, 2013
-
-
Nadav Har'El authored
Added to the loader a command-line option "--leak" to enable the leak detector immediately before running the payload's main(). For example, to look for leaks in tst-fpu.so (there are none, by the way ;-)), do scripts/imgedit.py setargs build/release/loader.img --leak tests/tst-fpu.so and when it ends, look at the leak detection results: $ gdb build/release/loader.elf (gdb) connect (gdb) osv leak show Unfortunately, this doesn't work when the payload is Java - I'm still trying to figure out why.
-
- Apr 24, 2013
-
-
Nadav Har'El authored
A pthread created with the attribute pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); Does not need to be pthread_join()ed - and its resources, most importantly its stack, should be deleted as soon as it is done. Previously, we ignored this mode, causing its users (Java uses it for all its threads!) which do not ever pthread_join() on these threads, to leak the threads' stacks. This patch adds support for this mode, and adds a test to tst_leak.cc which verifies that before the patch, we had a leak, and now we don't. Unfortunately, this patch is a bit ugly, and I was surprised how much time it took me to actually get it to work :( Because of the convoluted relationships between pthread_*, pthread_private::pthread, sched::thread and sched::detached_thread, I ended up, after many rewrites (!) duplicating the "reaper" code from sched::detached_thread to do something very similar for detached pthreads. I.e., when a detached pthread finishes, it can't pthread_join() itself (which would cause a mess as it destroys its own stack) so instead it tells a different thread, the "reaper" thread, to run this pthread_join(). In the future it would be nice to create one generic "reaper" which is used by both detached sched::threads and pthreads, or even find a way to allow a thread to pthread_join itself as its last action.
-
Avi Kivity authored
This allocator works by giving each allocation its own virtual address range which is not reused for later allocations. After a free(), the range is made inaccessible, forever, so use-after-free will result in a page fault. Sub-page overruns are also detected by filling unallocated space with a pattern, and checking whether the pattern has been altered during free().
-
Avi Kivity authored
Early code may enable interrupts and get hit by a spurious interrupt.
-
- Apr 17, 2013
-
-
Nadav Har'El authored
Without adding this check, if you change the command line with to run file.so which doesn't exist, it would start using random garbage in memory and fail in mysterious ways. Better just let the user know we can't open the specified program.
-
- Apr 15, 2013
-
-
Guy Zana authored
OSv stalls when using romfs on certain machines so revert back to using bootfs until romfs get fixed
-
- Apr 14, 2013
-
-
Avi Kivity authored
Edge-triggered interrupts only, at present.
-
- Apr 11, 2013
-
-
Avi Kivity authored
Minor code simplification.
-
Avi Kivity authored
Avoids a zombie.
-
Avi Kivity authored
-
Avi Kivity authored
This allows running either testrunner.so, or one of the tests (e.g. test/tst-fpu.so), as they now both export the same entry point.
-
Avi Kivity authored
-
- Apr 09, 2013
-
-
Avi Kivity authored
usage: --trace=a,b,c,*foo* --trace=bar java.so ... Will match on tracepoint names.
-
Christoph Hellwig authored
-
- Feb 28, 2013
-
-
Avi Kivity authored
Driver enumeration requires instantiating a driver even for devices which are not present; and if a device is present multiple times, we need to pre-create multiple driver instances, which is awkward. Further, driver life-cycle is complicated, with separation between instantiation and binding to a device. Switch (back) to the traditional device-driven model, where we iterate over all devices, try to find a matching driver factory, and when found, call it to instantiate the driver and bind to the device.
-
Avi Kivity authored
The main thread has a bogus wait_for_interrupts() which consumed wakeups, so the scheduler on the cpu running it could not schedule stuff. This manifested itself in lots of zombies from bsd callouts not getting reaped. Drop.
-
- Feb 26, 2013
-
-
Avi Kivity authored
Make sure sched::tls is initialized before we create objects of type 'cpu', so that any threads in those objects (idle thread, etc.) are initialized correctly.
-
Avi Kivity authored
See README for instructions.
-
- Feb 25, 2013
-
-
Dor Laor authored
-
- Feb 19, 2013
-
-
Avi Kivity authored
Wastes power.
-
Avi Kivity authored
Add a detached thread class (with a private destructor, so it can only be allocated on the heap). The implementation uses a reaper thread to wait until the detached thread is dead, and then ->join() and delete it.
-
- Feb 13, 2013