- Jun 06, 2013
-
-
Guy Zana authored
we have to disable virio interrupts before msix EOI so disabling must be done in the ISR handler context. This patch adds an std::function isr to the bindings. references to the rx and tx queues are saved as well (_rx_queue and _tx_queue), so they can be used in the ISR context. this patch reduces virtio net rx interrupts by a factor of 450.
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
-
- May 27, 2013
-
-
Guy Zana authored
the debug() console function is taking a lock before it access the console driver, it does that by acquiring a mutex which may sleep. since we want to be able to debug (and abort) in contexts where it's not possible sleep, such as in page_fault, a lockless debug print method is introduced. previousely to this patch, any abort on page_fault would cause an "endless" recursive abort() loop which hanged the system in a peculiar state.
-
- May 24, 2013
-
-
Christoph Hellwig authored
-
- May 23, 2013
-
-
Nadav Har'El authored
Oops, forgot to commit the removal of this redundant line (thanks Dor for spotting it).
-
Nadav Har'El authored
Fix two errors in IsaSerialConsole::reset(). The visible effect of these errors was a spurious \001 (^A) character which always appeared at the beginning of every OSV's run output. The two errors were: 1. The DLAB bit on the LCR was incorrectly set (a spurious "& LCR_DIVISOR_LATCH_ACCESS_BIT" appeared in the code), causing the next outb(1) to go to the output register (and output a "1" character) instead of setting the baud rate. 2. When writing the FCR register, the "ioport + " base forgotten. I took the opportunity and added better names for the constants, removed a couple of duplicate constants, and added comments.
-
Avi Kivity authored
kvmclock changes always come from the same cpu, so a real memory barrier is not needed. Replace with a compiler barrier.
-
- May 22, 2013
-
-
Nadav Har'El authored
Implement some missing functions in drivers/acpi.cc, which an OS that uses the ACPICA library needs to implement, to enable the use of semaphores and locks. These functions get called from ACPICA functions for entering sleep state - and in particular for powering off - which we will use in the next patch. This patch includes no new implementation - the semaphore implementation was already committed earlier, and here it is just used.
-
Dor Laor authored
There was a bug caused by calling um.get() in the destructor still left the unique_ptr armed with the pointer. Using free_deleter is cleaner and works too.
-
Dor Laor authored
Put the right pointer into the smart pointer. Noted by Guy
-
- May 20, 2013
-
-
Guy Zana authored
the linux/musl definition is 2 bytes long instead of 1 byte as in freebsd, this patch is fixing this issue which caused ifconfig to fail
-
- May 18, 2013
-
-
Avi Kivity authored
c_ispeed and c_ospeed have different names in musl. Since init to zero is the default anyway, remove these lines.
-
- May 16, 2013
-
-
Dor Laor authored
Use size of MCLBYTES which is 2k for the mbufs instead of the previous page size. As TODO I need to add an mtu change function that will take this number and uma alloc as param
-
Dor Laor authored
Using unique_ptr and make sure we don't leak. Note that the FreeBSD convention is to let the upper protocols to free the mbuf in the receive path (without them increasing the ref count)
-
Nadav Har'El authored
Until now, OSV's console defaulted to raw mode, to make the CLI happy. The problem is that on Linux, applications expect to be run in cooked mode, so if we ever run a simple application that tries to read user input, it can be confused. This patch makes OSV console default to cooked mode, and the CLI switch to raw mode before reading an input line - and reset to the default mode just before running the user's command. Unfortunately, we had to resort to adding a JNI class "Stty", since Java has no builtin support for the ioctls required for changing the tty settings.
-
- May 14, 2013
- May 10, 2013
- May 01, 2013
-
-
Nadav Har'El authored
Previously we had two different mutex types - "mutex_t" defined by <osv/mutex.h> for use in C code, and "mutex" defined by <mutex.hh> for use in C++ code. This is difference is unnecessary, and causes a mess for functions that need to accept either type, so they work for both C++ and C code (e.g., consider condvar_wait()). So after this commit, we have just one include file, <osv/mutex.h> which works both in C and C++ code. This results in the same type and same functions being defined, plus some additional conveniences when in C++, such as method variants of the functions (e.g., m.lock() in addition to mutex_lock(m)), and the "with_lock" function. The mutex type is now called either "mutex_t" or "struct mutex" in C code, or can also be called just "mutex" in C++ code (all three names refer to an identical type - there's no longer a different mutex_t and mutex type). This commit also modifies all the includers of <mutex.hh> to use <osv/mutex.h>, and fixes a few miscelleneous compilation issues that were discovered in the process.
-
- Apr 29, 2013
-
-
Guy Zana authored
1. use osv/ioctl.h in the netport, main.c and various tests 2. change ioctl prototype to agree with glibc. we now use the variadic prototype specified in sys/ioctl.h
-
- Apr 28, 2013
-
-
Avi Kivity authored
Setting it up where it is not available (e.g. Xen) will crash.
-
- Apr 22, 2013
-
-
Nadav Har'El authored
While I implemented TCSETS ioctl, TCGETS used to be a no-op. This patch implements it (which is trivial). TGETS is need because the standard idiom for programs which switch to raw mode is to use TCGETS to save the original mode, then use TCSETS, and when exiting restore the original mode. Also used <sys/ioctl.h> definitions (from the host...) instead of the ugly ioctl numbers.
-
Guy Zana authored
the javascript CLI owns echo and line editing discipline and needs raw mode from the console.
-
- Apr 17, 2013
-
-
Nadav Har'El authored
Add support for ICANON mode a.k.a. "cooked" mode (see termios(3)), where the user's input only reaches the reader after a newline, and until then, the erase character case be used to edit the line. This makes it easier for non-perfect typist to use rhino ;-) Various line-discipline features such as word-erase, line kill, flow control and signals, aren't yet supported in this version. Note how the echo and the line discipline (editing) are now both handled in the console_poll() thread, while previously the echo was handled in the read() implementation (console_read()). This means we now have full read-ahead, i.e., the user can now type before read() starts - even during the OSv boot. This patch also removes the old debugging read() function, which doesn't do anything useful.
-
- Apr 14, 2013
-
-
Avi Kivity authored
Rather than polling.
-
Avi Kivity authored
This allows us to initialize it a little later.
-
Avi Kivity authored
-
Avi Kivity authored
We use a polling thread to collect characters and place them in a queue.
-
Avi Kivity authored
Polling only, no interrupt yet.
-
- Apr 11, 2013
-
-
Avi Kivity authored
-
Avi Kivity authored
This is only causing confusion; change all callers to add '\n' explicitly and drop the optional argument.
-
- Apr 07, 2013
-
-
Avi Kivity authored
-
Dor Laor authored
Now our Isa serial device can read characters. Using it by calling readln(char *msg, size_t len); Note that the calls block until the len input chars or a newline.
-
- Apr 02, 2013