- 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 07, 2013
-
-
Nadav Har'El authored
This patch adds interrupt (by default ctrl-C) and quit (by default ctrl-\) handling to the console driver, when the ISIG termios flag is enabled (and this patch enables this flag by default). The application can change these characters or disable ISIG with ioctls, exactly as in Unix. The ^C character sends a SIGINT to the (only) process, and ^\ sends SIGQUIT. By default both abort OSv, but when running Java we get a much more interesting SIGQUIT handler - it shows a trace of all running threads and other information. Note that our line-discipline code currently sits in the console driver (we do not have ptys yet), so it only applies to the console, not to SSH connections or the likes. Also note that by default (before the patch to issue #49), qemu will catch the ^C and ^\ and won't even pass them to OSv, so apply the patch to #49 (or change the interrupt or quit characters) to see this feature working. This patch relates to issue #53. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
- Oct 02, 2013
-
-
Pekka Enberg authored
The page_size constant is not used in the code so lets just remove it. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Oct 01, 2013
-
-
Pekka Enberg authored
Make kvmclock::probe() easier to follow by simplifying the processor feature checks. Cc: Venkatesh Srinivas <venkateshs@google.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Sep 30, 2013
-
-
Venkatesh Srinivas authored
Older versions of KVM and user VMMs expose kvmclock MSRs at different MSR offsets. Detect the old flag in kvmclock::probe() and use the old MSRs if they are the only ones available. Signed-off-by:
Venkatesh Srinivas <venkateshs@google.com> Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
- Sep 29, 2013
-
-
Dmitry Fleytman authored
1. MSI-X printous fixed 2. Duplicate EOLs removed Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com>
-
- Sep 20, 2013
-
-
Pekka Enberg authored
Switch to the mmu::page_size constant instead of inventing our own. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
The 'offset' variable is first assigned to "bio->bio_offset" and then immediately overwritten with "bio->bio_data & 0xfff". Fix that up. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Sep 18, 2013
-
-
Pekka Enberg authored
Fix few minor but annoying coding style issues in drivers/virtio-blk.cc. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Sep 15, 2013
-
-
Nadav Har'El authored
Add Cloudius copyright and license statement to drivers/*. A couple of header files were based on Linux's BSD-licensed header files (e.g., include/uapi/linux/virtio_net.h) so they included the BSD license, but not any copyright statement, so we can just replace that by our own statement of the BSD license.
-
- Sep 14, 2013
-
-
Glauber Costa authored
I've made the mistake of presenting the counter value directly instead of converting it to nanoseconds. We need to do that, by grabbing the period from the device and using it. Since hpet is already our slow fallback anyway, I am using simple multiplication and not bothering with complex mult / shift stuff.
-
Glauber Costa authored
The Xen hypervisor not always initialize its pages. The BSD drivers will however assume they are zeroed, and so things may break if they are not (misterious flag tests suddenly being true, for instance). Initialize manually the data we have just received from malloc when we deal with softc.
-
- Sep 12, 2013
-
-
Dmitry Fleytman authored
This patch implements GSI interrupt support for Xen bus. Needed in Xen environments w/o vector callbacks for HVM. One example of such an environment is Amazon EC2.
-
- Sep 05, 2013
-
-
Glauber Costa authored
I would like to call read_partition_table automatically from device_register, which would guarantee that every device that comes up have its partitions scanned. Although totally possible on KVM, it is not possible on Xen, due to the assynchronous nature of the bringup protocol: the device is exposed and created in a moment where IO is not yet possible, so reading the partition table will fail. Just read them both from the drivers when we are sure the driver is ready.
-
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.
-
Glauber Costa authored
Currently we get it from the private data, but since I plan to use the same private data for all partitions, we need a unique value, that already exists in the device. So use it.
-
Glauber Costa authored
This patch implement the HPET clock driver, that should work as a fallback for both Xen and KVM, in case the paravirtual clock is not present. This is unfortunately the situation for all HVM guests running on EC2, so support for this is paramount. I have tested on KVM forcing the kvmclock to disappear, and it seems to work all right.
-
Glauber Costa authored
Right now we are doing it right before we parse the MADT, but this is by far not MADT specific. Other users are planned, and the best way to resolve the disputes is to have it in a separate constructor
-
- Sep 04, 2013
-
-
Pekka Enberg authored
As a cleanup, use wait_for_queue() like virtio-net does.
-
- Aug 13, 2013
-
-
Glauber Costa authored
The xen block driver needs some extra state not needed for the network drivers. Namely, the same way virtio-blk does, we need to tell the block layer which is our strategy, read and write functions. For that, we need some extra code that I am implementing in xenfront-blk.cc.
-
Glauber Costa authored
With all the infrastructure in place, we can compile all our xenbus code in, and enble the netfront driver.
-
Glauber Costa authored
This commit includes the basic translation layer so we can support BSD devices for Xen as is. I believe there is room for improvement, but that provides a very good starting point. I would like to provide you guys with a smaller commit, but it is quite cumbersome to separate the device implementation from the bus implementation per se. Part of it is due to the way Xen does things. For instance: when we are talking virtio devices, each of them will have its own pci device. For xen, only one pci device will be exposed, with its own interrupt, and that will be the xenbus. The xenbus is then responsible for querying the xenstore and figuring out which devices are there. Maybe there is a different way of doing things (I believe for instance that there is no reason to have shared interrupts between all devices) but that is the way BSD does things. And about the bus-is-the-device, even Linux as far as I know. Another thing to note, is that BSD devices registered with a device_method_t seem to be fully hierarchical. I am not doing it this way here (I am mostly ignoring the xenbus device_method_t definitions), which means there are a lot of assumptions that probably won't hold with other kinds of drivers. But it should not be hard to extend, and that simplifies things.
-
- Aug 12, 2013
-
-
Avi Kivity authored
Without this, the networking stack will ignore TSO. Improves Java Echo test from ~2Gbps to ~5Gbps. With Dor Laor.
-
- Aug 08, 2013
-
-
Glauber Costa authored
Our console works well with KVM, that redirects the serial to stdio. In Xen, this seems not to work very well (some documentation sources - not all - lists 'serial="stdio"' as a valid option, but it doesn't really work). In that case, LFs are not automatically translated into CRLF and the terminal output is totally borked. This is obviously not exclusive to Xen: by changing our qemu command line to run a pts instead of stdio, and then connecting to that pts, the same thing happens. This patch modifies our console's write() function to respect the termios ONLCR flag, which is now set by default. When write() sees a newline character and this flag is set we output a CF before any LF. The termios structure is left outside the specific console, and we pass a pointer down to it. Our pre-console implementation of simple_write outputs CRs unconditionally. The normal stdio serial still works. Telnet still works.
-
Glauber Costa authored
Our console write() takes 3 parameters. The last one controls whether or not we will issue a newline at the end of input. If it is true, we will call the console's implementation of newline(). It is always passed as false, though. Remove it and fix the callers.
-
- Aug 01, 2013
-
-
Glauber Costa authored
There is no harm in leaving it mappend, and there is a potential harm in unmapping, since our mapping code does not keep reference counters. So if we map an already mapped area, the unmap code will just unmap it for good. Avi spotted this.
-
Glauber Costa authored
We are currently using PCI's brute force enumeration, which consists of scanning all possible combination of b,d,f. This makes us issue many inb operations, a lot more than we could do if we were using smarter enumeration. In my system, the inbs alone account for more than 5M cycles, which takes around 4s to run (remember this is xen, it is faster in KVM) We can do a lot better by using recursive discovery, and only scanning the buses we need to. In the case of virtual systems the difference is even bigger, since it is very unlikely that we will have any complex setup with more than one bridge. Boot for me feels instantaneous now (once we get to start OSV)
-
- Jul 31, 2013
-
-
Glauber Costa authored
I have recently ran into an early init bug due that ended up being tracked down to a changeset in which the initialization priorities of the constructors were changed. One of the changed ones was kvmclock, but the change did not update kvmclock. I propose we use constants for that. To avoid things like this in the future, wherever priorities are used, I believe they should come from the same place so that the order is utterly obvious. To handle that, I am creating the prio.hh file, and sticking all priority definitions in there.
-
- Jul 30, 2013
-
-
Dor Laor authored
-
Dor Laor authored
-
Christoph Hellwig authored
We need to read the various config bits from the device config, not the guest config.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
Without this we get errors reading/writing from larger imageṡ. Our current 10g usr.img actually is enough to trigger this, but our lack of error handling papered over it so far.
-
- Jul 29, 2013
-
-
Glauber Costa authored
bio queue is the name used by BSD. Since it is just a name difference, I would better change our code, since there are few users (only ramdisk), than to patch all code I am importing from BSD that uses it.
-
- Jul 28, 2013
-
-
Dor Laor authored
Based on FreeBSD virtio code Provides a x7 boost for rx netperf
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-