Skip to content
Snippets Groups Projects
  1. Oct 09, 2013
  2. Oct 07, 2013
    • Nadav Har'El's avatar
      Add interrupt and quit keys to console driver · d7292625
      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: default avatarNadav Har'El <nyh@cloudius-systems.com>
      d7292625
  3. Oct 02, 2013
  4. Oct 01, 2013
  5. Sep 30, 2013
  6. Sep 29, 2013
  7. Sep 20, 2013
  8. Sep 18, 2013
  9. Sep 15, 2013
    • Nadav Har'El's avatar
      Add copyright statement to drivers/* · c0e0ebf2
      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.
      c0e0ebf2
  10. Sep 14, 2013
    • Glauber Costa's avatar
      hpet: convert counters to nanoseconds · 02442f3f
      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.
      02442f3f
    • Glauber Costa's avatar
      xenfront: initialize softc structure · 1025a960
      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.
      1025a960
  11. Sep 12, 2013
    • Dmitry Fleytman's avatar
      Support for Xen w/o vector callbacks · 1d3e336c
      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.
      1d3e336c
  12. Sep 05, 2013
    • Glauber Costa's avatar
      call read partition table · b3e47d9a
      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.
      b3e47d9a
    • 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
    • Glauber Costa's avatar
      blk: derive size information from device · bfff3c6a
      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.
      bfff3c6a
    • Glauber Costa's avatar
      hpet clock driver · e2991fce
      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.
      e2991fce
    • Glauber Costa's avatar
      acpi: move table initialization to its own constructor · bf15592d
      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
      bf15592d
  13. Sep 04, 2013
  14. Aug 13, 2013
    • Glauber Costa's avatar
      enable and compile the blkfront driver · d6800985
      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.
      d6800985
    • Glauber Costa's avatar
      enable osv xenbus and provide the netfront driver · c71d0cdf
      Glauber Costa authored
      With all the infrastructure in place, we can compile all our xenbus code in,
      and enble the netfront driver.
      c71d0cdf
    • Glauber Costa's avatar
      xen: OSV xenbus · 2ee11194
      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.
      2ee11194
  15. Aug 12, 2013
  16. Aug 08, 2013
    • Glauber Costa's avatar
      console: automatically insert CR · f6a464df
      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.
      f6a464df
    • Glauber Costa's avatar
      remove newline() function for console · 58954552
      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.
      58954552
  17. Aug 01, 2013
    • Glauber Costa's avatar
      do not unmap bios memory · 633a0b7c
      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.
      633a0b7c
    • Glauber Costa's avatar
      speed up pci discovery · 436c8e59
      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)
      436c8e59
  18. Jul 31, 2013
    • Glauber Costa's avatar
      make initialization priorities explicit · f801c763
      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.
      f801c763
  19. Jul 30, 2013
  20. Jul 29, 2013
    • Glauber Costa's avatar
      bio: change bio_list to bio_queue · 8593a8c5
      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.
      8593a8c5
  21. Jul 28, 2013
Loading