- Feb 10, 2014
-
-
Gleb Natapov authored
Now everything is ready to enable on demand file paging, so disable unconditional populate on mmap for files and provide fault() for file backed vmas. In fact file vma fault() is not different from anon vma fault() so provide one general vma::fault() handler for both. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
Walk page table and write out only dirty pages during file sync instead of writing back entire mapping. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
Currently map_file_page object can be used only once since its internal state changes during mapping operation. For demand paging we do not want to allocate/delete an object each time mapping is needed, so, to make map_file_page object reusable, this patch resets its sate to a starting one during finalize(). Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
Currently pages are allocated just before they are mapped, but sometimes we want to map preallocated pages (for shared mapping or mapping page cache page for instance). This patch moves page acquisition process into separate class. This will allow us to add subclass that provides pages from shared pages pool or from a page cache. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
Makes code easier to understand. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
Currently fill_file_page is used to populate entire vma, so starting offset and mapped file offset are always the same, but if fill_file_page will be used to populate only part of a vma this will no longer be necessarily true. Keep track of the lowest file offset populated and use it for read. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
Value passed to std::vector constructor increase not only vector capacity() but also its size(). We want only former, not later and it is achieved by reserve() function. Also remove prev_off which is a leftover of a debug code. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
Generic page mapper code provides offset to mapper's small/huge_page callbacks, but to make this offset meaningful it should be an offset from a beginning of a vma that is mapped, but currently it is an offset from a starting address of current mapping operation which means it will be always zero it mapping is done page by page. Fix this by passing starting vma address to page mapper for correct offset calculation. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
Trying to execute unmapped page is not a punishable offense as long as vma permissions are correct, so check them. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
It uses low level thread::wait_until() now which calls caller supplied predicate with preemption disabled. If caller supplied code access not yet mapped memory it will trigger an assertion on a page fault path. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
https://github.com/asias/osvAvi Kivity authored
Google Cloud Engine enabling. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Glauber Costa authored
Now we are showing names in gdb, it helps to name all of them. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Replace OSv-specific constructs in tst-epoll.cc by their standard C++ counterparts (i.e., std::thread, std::chrono, std::cout). This test now also runs (and of course, succeeds) on Linux. In general, it is important at all our Linux-ABI tests (where we test our implementation of the Linux/glibc functionality) to be able to run on Linux as well. Otherwise, it is possible our tests don't actually test the right thing (we may test for some expected behavior, but the actual behavior on Linux is different). I'm doing this in preparation for fixing issue #188 (fix edge-triggered epoll). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
When syscall() was asked to perform an unknown syscall, we printed a message with debug() and then called abort(). Since, recently, the message from debug() is not visible on the console. So pass the message directly to abort(), to do the right thing with it. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
The line respective to the mgmt was building it instead of cleaning it up. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Asias He authored
ide_drive::probe(), all the PCI_CLASS_STORAGE devices are probed including the virtio-scsi device. This way ide driver will hijack virtio-scsi handling. Fix it by only matching PCI_CLASS_STORAGE && PCI_SUB_CLASS_STORAGE_IDE devices Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
In GCE, the pci bus looks like: $ lspci -x 00:01.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 03) 00: 86 80 10 71 03 01 00 00 03 00 01 06 00 00 80 00 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03) 00: 86 80 13 71 03 01 00 00 03 00 80 06 00 00 00 00 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30: 00 00 00 00 00 00 00 00 00 00 00 00 09 01 00 00 00:03.0 SCSI storage controller: Red Hat, Inc Virtio SCSI 00: f4 1a 04 10 03 01 00 00 00 00 00 01 00 00 00 00 10: 01 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 f4 1a 08 00 30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00 00:04.0 Ethernet controller: Red Hat, Inc Virtio network device 00: f4 1a 00 10 03 01 00 00 00 00 00 02 00 00 00 00 10: 41 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 f4 1a 01 00 30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00 This makes the code goes to !single_bus branch. However, device 00:00:0 is not present. So, No device is scanned! Obviously, this is not what we want. To fix, the following is almost correct except bus 0 might not be there. void pci_device_enumeration(void) { check_bus(0); } To address it, we scan starting from bus 0 and exit the scan when the first non-empty bus is found. The first non-empty bus should find the entire hierarchy. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
Currently we only support scan one target. We scan target 0 by default. On GCE, the default target is 1. Let's scan scan target 1. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
We already copied req->resp.cmd.response into response. Use the shorter one. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
GCE does not support REPORT LUNS, fallback to TEST_UNIT_READY to scan luns. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
virtio-scsi device can not handle a request of an infinite size. It reports max_sectors in the config space. Respect it by using multiplex_strategy and dev->max_io_size to limit max request size. multiplex_strategy works by splitting large bios into multiple smaller bios. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
tag is a unique identifier of a scsi cmd. tag is required when more than one concurrent requests are in-flight. Set tag to the address of bio. Using bio for tag should be fine, since we can not have two same bio in-flight at the same time. When one bio is reused, the previous one should be finished already. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
resreved -> reserved Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
Fix the REPORT LUNS CDB format according to the scsi spec. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
bio->bio_private is uesed by low-level device driver, e.g. virtio-scsi. In multiplex_strategy, when one bio is splitted into multiple smaller bios, we should copy bio_private into the newly created bios. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
No need to reset VIRTIO_PCI_QUEUE_PFN to 0 when reset the device. This is not required by the virtio spec. Set device status to zero is enough to reset the device. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
msi interrupt is not always implemented. Fallback to gsi interrupt when msi interrupt is not available. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
msi interrupt is not always implemented. Fallback to gsi interrupt when msi interrupt is not available. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
msi interrupt is not always implemented. Fallback to gsi interrupt when msi interrupt is not available. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
Introduce unregister_level_triggered_handler to handle unregister of shared vector. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
The overloaded version of register_interrupt_handler with a gsi parameter is only used by register_level_triggered_handler. Fold it into register_level_triggered_handler. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
nullptr check is done in rcu_dispose. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
Only call rcu_defer if the pointer is not nullptr. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
Add set_ack_and_handler helper to setup ack and handler function of gsi level interrupt. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
Asias He authored
This patch makes multiple devices which share the same interrupt line works, e.g. on GCE, it shares virito-net and virtio-scsi interrupts. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
- Feb 09, 2014
-
-
Asias He authored
pre_eoi return 'true' when the interrupt is for the device, 'false' otherwise. This is the preparation for interrupt sharing support. Signed-off-by:
Asias He <asias@cloudius-systems.com>
-
- Feb 07, 2014
-
-
Zhi Yong Wu authored
When we commit the changes in osv.git, we usually make a mistake to also commit the changes in the submodules. To avoid this, this patch is trying to add "ignore = all" to .gitmodules file. Signed-off-by:
Zhi Yong Wu <zwu.kernel@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
This patch reduces our BSS size from 9MB to less than 1MB, and reduces the minimum amount of memory required to run the "rogue" image from 55 MB to just 47 MB. Together with the previous patch, this fixes #96. Our almost-lock-free SMP allocator uses cpu-to-cpu rings to send freed memory from one CPU to another. So for N cpus we need N^2 of these buffers. But in an apparent attempt to support CPU hotplugging the current code allocated queues for 64 CPUs, instead of the real number of CPUs we have. So even with a single CPU, we always have 64*64 of these buffers, each a little over 2K, so totaling a whopping 8MB, wile only a tiny fraction of this will ever be used This patch changes the code to only allocate the number of these queues we really need. It does not support CPU hot-plugging, but a lot of other places in the code don't support hot-plugging either, so I left a FIXME to remind us where we need to fix. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Zhi Yong Wu authored
Signed-off-by:
Zhi Yong Wu <zwu.kernel@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
I recently added (thanks to Gleb!) the "openjdk8" module, which provides Java 8. However, when one hopes to get a shell with OpenJDK8, using: make image=openjdk8,mgmt.shell The mgmt.shell requires the "java" module, and we end up using both the "java" and "openjdk8" modules. This simple patch allows openjdk8's module.py to say: provides = ['java'] Which means that any later-loaded module which does require('java') will *not* load the "java" module because opendjk8 claims it already provides it. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-