Skip to content
Snippets Groups Projects
  1. Oct 13, 2013
  2. Oct 10, 2013
  3. Oct 09, 2013
  4. Oct 08, 2013
    • Nadav Har'El's avatar
      Use same version in <linux/version.h> and uname() · e2554eaf
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      e2554eaf
  5. Oct 07, 2013
    • Nadav Har'El's avatar
      Start using doxygen for OSv's API documention · bc420c7a
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      bc420c7a
  6. Oct 05, 2013
  7. Oct 03, 2013
  8. Sep 30, 2013
  9. Sep 29, 2013
  10. Sep 26, 2013
  11. Sep 25, 2013
    • Nadav Har'El's avatar
      Dynamic linker: run finalizers when unloading shared object · bf0688f4
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      bf0688f4
  12. Sep 24, 2013
    • Nadav Har'El's avatar
      Fix missing poll() wakeup on POLLHUP · 554e80f6
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      554e80f6
  13. Sep 20, 2013
  14. Sep 15, 2013
  15. Sep 12, 2013
  16. Sep 11, 2013
    • Nadav Har'El's avatar
      Add reboot function · 542c319b
      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.
      542c319b
    • Avi Kivity's avatar
      mutex: make the constructor constexpr · a919d5f4
      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.
      a919d5f4
  17. Sep 10, 2013
    • Pekka Enberg's avatar
      mmu: Fix file-backed vma splitting · d72b550c
      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.
      d72b550c
  18. Sep 08, 2013
  19. Sep 05, 2013
    • Glauber Costa's avatar
      read partition table · 7fb8b99b
      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.
      7fb8b99b
    • Glauber Costa's avatar
      add offset calculation · cd14aecc
      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.
      cd14aecc
Loading