Skip to content
Snippets Groups Projects
  1. Jul 30, 2013
  2. Jul 29, 2013
    • Glauber Costa's avatar
      BSDEDIT/blkfront: implement disk_alloc · 46b5ee0c
      Glauber Costa authored
      Disk alloc is a simple function that, well, allocates a disk. It is supposed
      to be provided by the device code, but for simplicity I am providing it in
      blkfront itself. We have no really better way to put it: device.c is quite generic,
      and we seem to have no disk specific file.
      
      If time brings us more users of such function, then I will move it somewhere else.
      46b5ee0c
    • Glauber Costa's avatar
      bsd: initialize taskqueue · c7f7d13b
      Glauber Costa authored
      Xenbus will use BSD taskqueues in the following way:
      
        taskqueue_enqueue(taskqueue_thread, &xbs->xbs_probe_children);
      
      taskqueue_thread seems to be the main bsd taskqueue, which wasn't ported in our
      initial port. So I am definiting it and initializing.
      
      It seems a bit odd to do this in net.cc, but this is where the rest of the BSD
      initialization lives anyway (maybe the filename should change?). Let me know if
      you feel strongly about it, and I will change. But for me it is okay for now.
      c7f7d13b
    • Glauber Costa's avatar
      device: expand device state · 909bc45c
      Glauber Costa authored
      BSD devices will use more state than we currently have. Extend the current
      device to cope with that.
      909bc45c
    • Glauber Costa's avatar
      expand DS flags · 277318d7
      Glauber Costa authored
      BSD uses more flags than we define. This patch defines the aditional missing
      flags.
      277318d7
    • Glauber Costa's avatar
      bsd: block and network xen drivers · 71940e91
      Glauber Costa authored
      Those are the verbatim files, straight from BSD.
      71940e91
    • Glauber Costa's avatar
      bsd: pcpu stubs · 05f014f2
      Glauber Costa authored
      BSD register a structure with its per cpu data. We can do the same, using
      just the fields we need.
      05f014f2
    • Glauber Costa's avatar
      Expand BSD compile flags · 171e09a5
      Glauber Costa authored
      Here are some compile-time definitions that will make importing of BSD code
      easier. They should be straightforward and trivially true for our current
      setup: x86_64 is our current arch (and when we support others we can just replace
      the static -D__x86_64__ with a test that goes precisely here, it makes no sense
      to support code that is not SMP, and the id string is included by pretty much
      every BSD file - and I believe we have no interest in that.
      171e09a5
    • Glauber Costa's avatar
      kthread: also allow for process creation · 4d2f9bfe
      Glauber Costa authored
      Xen BSD code will attempt to create processes to serve as deamons for xenstore.
      We can basically emulate this by creating threads.
      
      The only thing I am doing differently from the already existent thread creation
      layer that we have, is that callers will expect a struct proc to be returned. We
      had this as a stub, now I am creating a small struct with just the PID to serve
      as a return placeholder. The listener processes in xenstore never dies, so I am
      not implementing a deallocate routine for them
      4d2f9bfe
    • 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
    • Glauber Costa's avatar
      trivial: fix bsd porting slock implementation · 024a1d9e
      Glauber Costa authored
      We take the write version instead of the read version when locking.
      Unlocking is fine
      024a1d9e
    • Avi Kivity's avatar
      build: avoid using __attribute__((cold) if the compiler doesn't support it · 6d151431
      Avi Kivity authored
      __attribute__((cold)) on labels isn't supported by gcc 4.7.  Detect support
      for the feature and enable it conditionally.
      6d151431
    • Dor Laor's avatar
      Change the max per-cpu free page buffer · c2815d3e
      Dor Laor authored
      When netperf is executed, there is high demand for pages.
      Here is a table of values for the max constant and the matching
      netperf results:
      
      buf size  Throughput Mbps
      1024     16700
       512     16800
       256     15500
       128     14500
        64     13680
      c2815d3e
    • Avi Kivity's avatar
      Merge branch 'eoi' · 33316048
      Avi Kivity authored
      kvm pveoi support
      33316048
    • Avi Kivity's avatar
      lock_guard: avoid using 'using constructor' · 99ba7e34
      Avi Kivity authored
      The feature allowing reuse of an inherited constructor is not available
      on in gcc 4.7.
      99ba7e34
    • Avi Kivity's avatar
      apic: kvm pv eoi · d450e60d
      Avi Kivity authored
      kvm provides a way to EOI without exiting; detect its availability and use it.
      d450e60d
    • Avi Kivity's avatar
      interrupt: use the apic's eoi() method instead of directly writing to the x2apic · 66bd77a0
      Avi Kivity authored
      Works with xapic, and allows us to hook eoi().
      66bd77a0
    • Avi Kivity's avatar
      apic: add read() method · 5f8652e9
      Avi Kivity authored
      5f8652e9
    • Avi Kivity's avatar
      interrupt: add separate pre- and post-eoi interrupt handler · f496f7a7
      Avi Kivity authored
      kvm's pv_eoi functionality fails if any vmexits are taken before the EOI
      (likely due to a bug).  Work around this by deferring the handler until after
      the interrupt has been EOIed.  Since level-triggered interrupts must be acked
      at the device level prior to the EOI, add an additional handler to be called
      prior to the EOI.
      f496f7a7
    • Avi Kivity's avatar
      percpu: align percpu data · 38b6390a
      Avi Kivity authored
      Make sure percpu data is aligned correctly as some hardware features expect it.
      38b6390a
    • Nadav Har'El's avatar
      CLI: Remove global (JVM-wide) variables. · 92b6753b
      Nadav Har'El authored
      RhinoCLI relied on a bunch of global Java variables such as _cx and _args.
      This was not only ugly, it also prevents us from running multiple instances
      of the CLI on the same JVM - e.g., to support multiple telnet connections.
      
      There isn't actually a need for these JVM-wide global variables. At most,
      we need to global use variables in the Javascript interpreter (so each
      instance of the interpreter would have its own copy).
      
      This patch puts main's arguments in a new global-per-javascript-interpreter
      variable "mainargs" instead of the global-for-entire-JVM _args. "_cx" isn't
      needed at all: one of uses was to for Java to convert a String[] into the
      equivalent Javascript alternative - but Java should just return String[]
      and let Javascript worry about handling that (it seems to work just fine
      without change). A second use was for returning an exit code, but a more
      appropriate methods to do the same thing without global variables exist.
      92b6753b
  3. Jul 28, 2013
Loading