Skip to content
Snippets Groups Projects
  1. Jan 22, 2014
  2. Jan 21, 2014
  3. Jan 16, 2014
  4. Jan 15, 2014
  5. Jan 10, 2014
  6. Jan 02, 2014
  7. Dec 27, 2013
  8. Dec 20, 2013
  9. Dec 19, 2013
  10. Dec 18, 2013
  11. Dec 17, 2013
    • Nadav Har'El's avatar
      Fix assertion failure during many-cpu boot · 0b9fc40b
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      0b9fc40b
  12. Dec 11, 2013
  13. Dec 06, 2013
  14. Dec 05, 2013
  15. Dec 03, 2013
  16. Dec 01, 2013
    • Pekka Enberg's avatar
      virtio: Add virtio-rng driver · fd1be662
      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: default avatarPekka Enberg <penberg@cloudius-systems.com>
      fd1be662
    • Nadav Har'El's avatar
      Fix crash on malformed command line · 082ff373
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      082ff373
    • Nadav Har'El's avatar
      Fix exception (in x86 sense, not C++) handling during boot · cba2f09a
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      cba2f09a
  17. Nov 20, 2013
  18. Nov 15, 2013
  19. Nov 08, 2013
  20. Nov 06, 2013
  21. Oct 24, 2013
  22. Oct 23, 2013
  23. Oct 16, 2013
Loading