1. 28 9月, 2009 1 次提交
  2. 27 9月, 2009 3 次提交
  3. 26 9月, 2009 1 次提交
    • M
      Fix coding style issue · 3df04ac3
      Mark McLoughlin 提交于
      Replace:
      
        if (-1 == foo())
      
      with:
      
        if (foo() == -1)
      
      While this coding style is not in direct contravention of our currently
      ratified CODING_STYLE treaty, it could be argued that the Article 3 of
      the European Convention on Human Rights (prohibiting torture and "inhuman
      or degrading treatment") reads on the matter.
      
      [This commit message was brought to you without humour, as is evidenced
      by the absence of any emoticons]
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3df04ac3
  4. 16 9月, 2009 1 次提交
  5. 15 9月, 2009 2 次提交
  6. 12 9月, 2009 2 次提交
    • B
      Fix sys-queue.h conflict for good · 72cf2d4f
      Blue Swirl 提交于
      Problem: Our file sys-queue.h is a copy of the BSD file, but there are
      some additions and it's not entirely compatible. Because of that, there have
      been conflicts with system headers on BSD systems. Some hacks have been
      introduced in the commits 15cc9235,
      f40d7537,
      96555a96 and
      3990d09a but the fixes were fragile.
      
      Solution: Avoid the conflict entirely by renaming the functions and the
      file. Revert the previous hacks.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      72cf2d4f
    • A
      Make get_ticks_per_sec() a static inline · 274dfed8
      Anthony Liguori 提交于
      ticks_per_sec is a constant.  There's no need to store it as a variable as it
      never changes since our time is based on units.
      
      Convert get_ticks_per_sec() to a static inline and move the constant into
      qemu-timer.h.  Remove all references to QEMU_TIMER_BASE so that we consistently
      use this interface.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      274dfed8
  7. 11 9月, 2009 8 次提交
  8. 10 9月, 2009 8 次提交
  9. 06 9月, 2009 1 次提交
  10. 04 9月, 2009 4 次提交
  11. 28 8月, 2009 8 次提交
    • G
      switch balloon initialization to -device. · 382f0743
      Gerd Hoffmann 提交于
      With that patch applied "-balloon virtio,args" becomes a shortcut for
      "-device virtio-balloon-pci,args".
      
      Side effects:
       - ballon device gains support for id=<tag>.
       - ballon device is off by default now.
       - initialization order changes, which may in different pci slot
         assignment depending on the VM configuration.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      382f0743
    • G
      add qemu_error() + friends · ac7531ec
      Gerd Hoffmann 提交于
      This patch adds some functions for error reporting to address the
      problem that error messages should be routed to different destinations
      depending on the context of the caller, i.e. monitor command errors
      should go to the monitor, command line errors to stderr.
      
      qemu_error() is a printf-like function to report errors.
      
      qemu_errors_to_file() and qemu_errors_to_mon() switch the destination
      for the error message to the specified file or monitor.  When setting a
      new destination the old one will be kept.  One can switch back using
      qemu_errors_to_previous().  i.e. it works like a stack.
      
      main() calls qemu_errors_to_file(stderr), so errors go to stderr by
      default.  monitor callbacks are wrapped into qemu_errors_to_mon() +
      qemu_errors_to_previous(), so any errors triggered by monitor commands
      will go to the monitor.
      
      Each thread has its own error message destination.  qemu-kvm probably
      should add a qemu_errors_to_file(stderr) call to the i/o-thread
      initialization code.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ac7531ec
    • M
      qdev: convert watchdogs · 09aaa160
      Markus Armbruster 提交于
      -watchdog NAME is now equivalent to -device NAME, except it treats
      option argument '?' specially, and supports only one watchdog.
      
      A side effect is that a device created with -watchdog may now receive
      a different PCI address.
      
      i6300esb is now available on any machine with a PCI bus, not just PCs.
      ib700 is still PC only, but that could be changed easily.
      
      The only remaining use of struct WatchdogTimerModel and
      watchdog_add_model() is supporting '-watchdog ?'.  Should be replaced
      by searching device_info_list for watchdog devices when we can
      identify them there.
      
      Also fixes ib700 not to use vm_clock before it is initialized: in
      wdt_ib700_init(), called from register_watchdogs(), which runs before
      init_timers().  The bug made ib700_write_enable_reg() crash in
      qemu_del_timer().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      09aaa160
    • M
    • C
      raw-posix: add Linux native AIO support · 5c6c3a6c
      Christoph Hellwig 提交于
      Now that do have a nicer interface to work against we can add Linux native
      AIO support.  It's an extremly thing layer just setting up an iocb for
      the io_submit system call in the submission path, and registering an
      eventfd with the qemu poll handler to do complete the iocbs directly
      from there.
      
      This started out based on Anthony's earlier AIO patch, but after
      estimated 42,000 rewrites and just as many build system changes
      there's not much left of it.
      
      To enable native kernel aio use the aio=native sub-command on the
      drive command line.  I have also added an option to qemu-io to
      test the aio support without needing a guest.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      5c6c3a6c
    • J
      make load_vmstate() return errors · 05f2401e
      Juan Quintela 提交于
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      05f2401e
    • J
      split do_loadvm() into do_loadvm() and load_vmstate() · 7b630349
      Juan Quintela 提交于
      do_loadvm() is now called from the monitor.
      load_vmstate() is called by do_loadvm() and when -loadvm command line is used.
      Command line don't have to play games with vmstop()/vmstart()
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      7b630349
    • A
      extend -smp parsing to include cores= and threads= options · dc6b1c09
      Andre Przywara 提交于
      For injecting multi-core and multi-threading CPU topology into guests
      extend the -smp syntax to accommodate cores and threads specification.
      Syntax: -smp smp_value[,cores=nr_cores][,threads=nr_threads]\
      [,socket=nr_sockets][,maxcpus=max_cpus]
      smp_value is the legacy value specifying the total number of vCPUs for
      the guest. If you specify one of cores, threads or sockets this value
      can be omitted. Missing values will be computed to fulfill:
      smp_value = nr_cores * nr_threads * nr_sockets
      where it will favour sockets over cores over threads (to mimic the
      current behavior, which will only inject multiple sockets.)
      So -smp 4,threads=2 will inject two sockets with 2 threads each,
      -smp cores=4 is an abbreviation for -smp 4,cores=4,threads=1,sockets=1.
      If max_cpus (the number of hotpluggable CPUs) is omitted, it will
      be set to smp_value.
      Signed-off-by: NAndre Przywara <andre.przywara@amd.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      dc6b1c09
  12. 24 8月, 2009 1 次提交
    • A
      Unbreak large mem support by removing kqemu · 4a1418e0
      Anthony Liguori 提交于
      kqemu introduces a number of restrictions on the i386 target.  The worst is that
      it prevents large memory from working in the default build.
      
      Furthermore, kqemu is fundamentally flawed in a number of ways.  It relies on
      the TSC as a time source which will not be reliable on a multiple processor
      system in userspace.  Since most modern processors are multicore, this severely
      limits the utility of kqemu.
      
      kvm is a viable alternative for people looking to accelerate qemu and has the
      benefit of being supported by the upstream Linux kernel.  If someone can
      implement work arounds to remove the restrictions introduced by kqemu, I'm
      happy to avoid and/or revert this patch.
      
      N.B. kqemu will still function in the 0.11 series but this patch removes it from
      the 0.12 series.
      
      Paul, please Ack or Nack this patch.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      4a1418e0