- Dec 19, 2013
-
-
Asias He authored
We are under the virtio namespace, it makes no sense to repeat the virtio prefix again in the virito_blk driver. Change the naming from virtio::virtio_blk to virtio::blk. Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 18, 2013
-
-
Asias He authored
This adds initial virtio-scsi support. We have no scsi layer in osv, in this implementation virtio-scsi works directly with the bio layer. It translates BIO_READ, BIO_WRITE and BIO_FLUSH to SCSI CMD. Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 17, 2013
-
-
Nadav Har'El authored
While booting with many cpus (e.g., run.py -c 20, but I sometimes saw this with as few as 7), we crashed while trying to sleep with preemption disabled: Assertion failed: preemptable() (/home/nyh/osv/include/sched.hh: do_wait_until: 605) Aborted Turns out that since commit 223b2252 (half a year ago), main_cont() ran smp_launch() with preemption disabled. But smp_launch creates threads, and thread's constructor may sleep (e.g., on the thread_list_mutex), and we cannot do this with preemption disabled... So dropped the preempt_disable()/enable() from main_cont(). The reasoning for it as expressed in 223b2252 appears to be no longer relevant. Fixes #130. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 11, 2013
-
-
Pekka Enberg authored
There's no reason to run a locale test as part of OSv boot sequence... Avi writes: It used to be a major stumbling block but is of no interest now. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Amnon Heiman authored
Separate /dev/random the virtio-rng driver and register virtio-rng as a HW RNG entropy source. Signed-off-by:
Amnon Heiman <amnon@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 06, 2013
-
-
Glauber Costa authored
KVM always have a network interface provided by QEMU, Xen not necessarily so. I fixed this before, but it was probably broken by the multiple interfaces work. The interface list is not a C++ structure, so the easiest way to handle that is to keep track of whether or not we have any non-loopback interface. (No need to know how many). If we don't, skip DHCP startup. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Benoît Canet authored
The exact location of the stack end is not needed by java so move back this variable to restore the state to what was done before the mkfs.so/cpiod.so split. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 05, 2013
-
-
Benoît Canet authored
This restore the original behavior of osv::run in place before the mkfs.so and cpiod.so split committed a day ago. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 03, 2013
-
-
Benoît Canet authored
A ';' at the end of a parameter mark the end of a program's arguments list. The goal of this patch is to be able to split mkfs.so in to parts mkfs.so and cpiod.so. The patch uses a full spirit parser to escape "" and split commands around ';'. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Make sure ZFS intention log is flushed to disk by unmounting rootfs at poweroff. Fixes #108. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 01, 2013
-
-
Pekka Enberg authored
This adds the virtio-rng driver to OSv. The implementation is simple: - Start a thread that keeps 64 byte of entropy cached in internal buffer. Entropy is gathered from the host with virtio-rng. - Create device nodes for "/dev/random" and "/dev/urandom" that both use the same virtio_rng_read() hook. - Use the entropy buffer for virtio_rng_read(). If we exhaust the buffer, wake up the thread and wait for more entropy to appear. We eventually should move device node creation to separate drivers/random.c that multiplexes between different hardware RNG implementations. However, as we only support virtio-rng, I'm leaving that to whomever implements support for the next RNG. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Before this patch, OSv crashes or continuously reboots when given unknown command line paramters, e.g., scripts/run.py -c1 -e "--help --z a" With this patch, it says, as expected that the "--z" option is not recognized, and displays the list of known options: unrecognised option '--z' OSv options: --help show help text --trace arg tracepoints to enable --trace-backtrace log backtraces in the tracepoint log --leak start leak detector after boot --nomount don't mount the file system --noshutdown continue running after main() returns --env arg set Unix-like environment variable (putenv()) --cwd arg set current working directory Aborted The problem was that to parse the command line options, we used Boost, which throws an exception when an unrecognized option is seen. We need to catch this exception, and show a message accordingly. But before this patch, C++ exceptions did not work correctly during this stage of the boot process, because exceptions use elf::program(), and we only set it up later. So this patch moves the setup of the elf::program() object earlier in the boot, to the beginning of main_cont(). Now we'll be able to use C++ exceptions throughout main_cont(), not just in command line parsing. This patch also removes the unused "filesystem" paramter of elf::program(), rather than move the initializion of this empty object as well. Fixes #103. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
During boot, between the time main() set the IDT and when later smp_launch() is called, the IDT doesn't actually work correctly. The problem is that we use the separate stacks feature (IST), and that doesn't work without also setting the GDT, not only the IDT. So use init_on_cpu() to initialize not only the IDT, but other stuff as well. Fix smp_launch() not to repeat this initialization on the boot CPU, as it was already done. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Nov 20, 2013
-
-
Nadav Har'El authored
Currently, when we try to run an invalid shared object (e.g, run.py -e aaa) loader.cc calls abort(). This patch changes it to use osv::poweroff(). This is useful, for example, to measure how much time our boot/poweroff cycle takes, without running any payload, by doing time scripts/run.py -e aaa Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 15, 2013
-
-
Pekka Enberg authored
Use the new pivot_root() functionality to switch to ZFS root filesystem once OSv is up and running. 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>
-
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 06, 2013
-
-
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>
-
- Oct 24, 2013
-
-
Benoît Canet authored
Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Benoît Canet authored
The initialization is done a this time so everything needed is ready. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Oct 23, 2013
-
-
Pekka Enberg authored
This patch adds version numbering to the loader. We use "git tag" for generating an unique version number with a little bit of shell script magic to make sure version number is always up-to-date. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Oct 16, 2013
-
-
Avi Kivity authored
Useful when a filesystem is not yet available. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Oct 14, 2013
-
-
Nadav Har'El authored
This is patch v2, incorporating most of the comments from the previous round. Solves issue #47: elf::program's API - add_object() and remove_object() was problematic in two respects: 1. It did not do reference-counting on the loaded object, so if add_object() was done 5 times, a single remove_object() would unmap the object and its 4 other users will crash. 2. It is un-C++-like. This patch replaces these two functions by a single function get_library(): std::shared_ptr<elf::object> get_library(std::string lib, std::vector<std::string> extra_path = {}); get_library() returns a shared_ptr, which is reference counting and does proper C++-style RAII. For example in the code: auto lib = elf::get_program()->get_library(path); auto main = lib->lookup<int (int, char**)>("main"); int rc = main(argc, argv); once lib out of scope, the reference count of the elf::object automatically goes down, and if nobody else holds another shared-pointer to the same library, the object is destroyed (causing the shared library to be unloaded). This patch also documents, with Doxygen, all the functions it touches. IMPORTANT NOTE: This reference count is completely unrelated to the issue of concurrent use of dlopen()/dlclose()/dl_iterate_phdr(), which is still buggy and we need to fix (I have a patch for that, but it's too long to fit in the margin). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
- Oct 04, 2013
-
-
Antti Kantee authored
-
- Sep 15, 2013
-
-
Nadav Har'El authored
Sorry, previous commit left loader.cc with only a copyright statement. Our copyright is important, but not *that* important! I'll be more careful next time...
-
Nadav Har'El authored
Add copyright statement to the source files in the top-level directory (except the trivial dummy-shlib.cc). By the way, I don't think this code really belongs in the top-level directory.
-
- Sep 14, 2013
-
-
Glauber Costa authored
As I have stated previously, what is true for qemu (that we always have a user-provided network interface) is not true for Xen. It is quite possible that we boot with no network interface at all. In that case, we will get stuck asking for an IP that will never come. This patch takes care to call for dhcp only if our interface is really up. Since networking is such a core service, we'll print a message if we can't do that.
-
Glauber Costa authored
Some time ago I have moved the console initialization a bit earlier, so messages could be seen earlier. This has been, however, creating spurious problems (1 at each 10 - 15 boots) on Xen HVM. The reason is that the isa serial reset code enables interrupts upon reset, and the isa irq interrupt will call wake() in the pool thread, which at this point is not yet started. Since these days we already have simple_write() dealing with the early stuff, move it back to where it used to be. P.S: Dima found a way to make this problem 100 % reproduceable, by queueing data in the input line before the console starts. With this patch, the problem is gone even if Dima's method is used.
-
- Sep 12, 2013
-
-
Avi Kivity authored
Command line option: --trace-backtraces
-
- Sep 08, 2013
-
-
Guy Zana authored
-
- 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>
-