- Oct 13, 2013
-
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Needed by libzpool. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Needed by MNTTAB.
-
- Oct 10, 2013
-
-
Avi Kivity authored
Add some required solaris types. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
We have _KERNEL defines scattered throughout the code, which makes understanding it difficult. Define it just once, and adjust the source to build. We define it in an overridable variable, so that non-kernel imported code can undo it.
-
Avi Kivity authored
In order to unmount, we need to drop all vnodes on a mount point, so we need to find all directory entries pointing to them. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Similar to /etc/mnttab, but without going through the file system. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Needed by libzfs. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Make vget() accept a const char*, and adjust various other functions that it calls in the same way. This makes it easier to convert vfs_mount.c to C++. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
For zfs. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
The vfs converts the read/write flags from 0/1/2 (read-only/write-only/rw) to bit fields which are more easily testable. But in doing so it corrupts the other flags. Fix FFLAGS and OFLAGS to preserve those other flags. The test for a file that is not readable or writable is dropped, since it is impossible to fail. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Oct 09, 2013
-
-
Pekka Enberg authored
Switch to size_t type for ->bio_bcount in struct bio and clean up virtio-blk signedness casts. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Oct 08, 2013
-
-
Nadav Har'El authored
We had a different Linux version compiled into uname() (3.7.0) than we had compiled into other code (via <linux/version.h>). This patch makes them both pretend to be 3.7.0 - arbitrarily chosen as the current Linux version at the time OSv was created. The new code verifies with a static assertion that both files contain the same version, so if they diverge, uname.c will fail compilation. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
- Oct 07, 2013
-
-
Nadav Har'El authored
This patch begins to document OSv's native (non-Linux-compatible) C++ APIs using Doxygen. With doxygen, functions, classes, and other APIs are documented using comments inside the source code, similarly to the way Javadoc is used in the Java world. After this patch, running "doxygen" generates the documentation in HTML form (and also ugly ones in LaTeX...) in the "doxyout" directory. After running "doxygen" in the OSv top-level directory, open your browser to file://.../doxyout/html/index.html to view this documentation. This patch adds a doxygen configuration file, "Doxyfile", and documents three functions in the osv namespace: osv::halt(), osv::poweroff(), osv::halt(). The format of the resulting documentation is not perfect, but it's not as bad as I feared, and also the documentation doesn't uglify the code too much (it mainly impacts the header files), so I now believe it will better for us than writing man pages (an avenue which I explored previously). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
- Oct 05, 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
boost's asio.hpp module init() function was calling pthread_key_create which tried to manipulate some libc/pthread.cc unitialized objects. pthread_key_create then returned -ENOMEM so an exception was thrown by boost causing the loader's premain() function to fail and the boot to loop. This patch lower the priority of the initialization of the libc/pthread.cc objects so they are ready when premain is calling the boost module init() function. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Oct 03, 2013
-
-
Benoît Canet authored
This patch uses boost::asio::ip::address* to cleanup the core dhcp code. 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>
-
Avi Kivity authored
bsd's ifconf conflicts with osv's; rename it. We use the bsd version in <osv/ioctl.h>, since we currently don't support the Linux-ABI variants of these ioctls. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Tested-By:
Benoit Canet <benoit@irqsave.net>
-
Avi Kivity authored
Workaround a bytorder function conflict, and reconcile a declaration. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Tested-By:
Benoit Canet <benoit@irqsave.net>
-
Avi Kivity authored
Some structures are duplicated; move the duplicates to a common header <netinet/__in.h>. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Tested-By:
Benoit Canet <benoit@irqsave.net>
-
Avi Kivity authored
Some structures are duplicated; deduplicate them. A few are source-compatible but not binary-compatible; use the ones from <bits/socket.h>. Others are both source- and binary- compatible; put them in a new header <sys/__socket.h> which is included from both. Work around a problem with the byteorder functions/macros. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Tested-By:
Benoit Canet <benoit@irqsave.net>
-
- Sep 30, 2013
-
-
Benoît Canet authored
Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Sep 29, 2013
-
-
Nadav Har'El authored
Add a comment to condvar explaining that it makes a guarantee that POSIX Threads' condition variables do not - that there are no spurious wakeups. The comment goes on to explain that at least in one place (semaphore.cc) we make use of this added guarantee, so if the condition variable implementation is ever rewritten, we'll need to keep this guarantee. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
Change the name of the argument of wake_with from "Pred" to "Action". This argument is a function to run, *not* a predicate (it's not supposed to return a boolean value), so it doesn't make sense to call it Pred. The implementation of wake_with already used the name "Action" - this patch fixes the prototype too. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Avi Kivity authored
Also fix other review comments related to 1f161695. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Sep 26, 2013
-
-
Raphael S. Carvalho authored
Add VOP_LINK to the VFS interface in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> [ penberg: split to separate commit ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Sep 25, 2013
-
-
Nadav Har'El authored
ELF allows specifying initializers - functions to be run after loading a a shared object, in DT_INIT_ARRAY, and also finalizers - functions to be run before unloading a shared objects, in DT_FINI_ARRAY. The existing code ran the initializers, but forgot to run the finalizers, and this patch fixes this oversight. This fix is necessary for destructors of static objects defined in the shared object. But this fix is not sufficient for C++ destructors - see also the next patch. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
- Sep 24, 2013
-
-
Nadav Har'El authored
Our poll_wake() code ignored calls with the POLLHUP event, because the user did not explicitly ask for this event. This causes a poll() waiting on read from a pipe whose write side closes not to wake up. This patch adds a test for this case in tst-pipe.cc, and fixes the bug by adding to the poll structure's _events also ~POLL_REQUESTABLE, i.e., any bits which do not have to be explicitly requested by the user (POLL_REQUESTABLE is a new macro defined in this patch). After this patch, poll() wakes as needed in the test (instead of just hang), but returns the wrong event because of another bug which will be fixed in a separate patch. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
- Sep 20, 2013
-
-
Nadav Har'El authored
Some trivial comment cleanup and line-breaks in queue-mpsc.hh. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
- Sep 15, 2013
-
-
Nadav Har'El authored
Added Cloudius copyright statement to our own code in include/. Also added include/api/LICENSE saying that these are copied from Musl and public domain (according to the Musl COPYRIGHT file).
-
- Sep 12, 2013
-
-
Avi Kivity authored
Command line option: --trace-backtraces
-
Dmitry Fleytman authored
-
- Sep 11, 2013
-
-
Nadav Har'El authored
Added a new function, osv::reboot() (declared in <osv/power.hh>) for rebooting the VM. Also added a Java interface - com.cloudius.util.Power.reboot(). NOTE: Power.java and/or jni/power.cc also need to be copied into the mgmt submodule.
-
Avi Kivity authored
Statically allocated mutexes are very common. Make the mutex constructor constexpr to ensure that a statically allocated mutex is initialized before use, even if that use is from static constructors.
-
- Sep 10, 2013
-
-
Pekka Enberg authored
Commit 3510a5ea ("mmu: File-backed VMAs") forgot to fix vma::split() to take file-backed mappings into account. Fix the problem by making vma::split() a virtual function and implementing it separately for file_vma. Spotted by Avi Kivity.
-
- Sep 08, 2013
-
-
Guy Zana authored
-
- Sep 05, 2013
-
-
Glauber Costa authored
This code, living in device.c for maximum generality, will read the partition table from any disk that calls it. Ideally, each new device would have its own private data. But that would mean having to callback to the driver to set each of the partitions up. Therefore, I found it easier to convention that all partitions in the same drive have the same private data. This makes some sense if we consider that the hypervisors are usually agnostic about partitions, and all of the addressing and communications go through a single entry point, which is the disk.
-
Glauber Costa authored
To support multiple partitions to a disk, I found it easier to add a post-processing offset calculation to the bio just before calling the strategy. The reason is, we have many (really many) entry points for bio preparation (pre-strategy) and only two entry points for the strategy itself (the drivers). Since multiplex_strategy is a good thing to be used even for virtio (although I am not converting it now), since it allows for arbitrary sized requests, we could very well reduce it to just one. At this moment, the offset is always 0 and everything works as before.
-