1. 04 9月, 2009 1 次提交
  2. 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
  3. 24 8月, 2009 4 次提交
    • 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
    • J
      QEMU set irq0override in fw_cfg · 6b35e7bf
      Jes Sorensen 提交于
      Hi,
      
      After discussing the issue with Avi, Gleb and a couple others on irq,
      we came to the conclusion that it is preferred to have QEMU request
      features from the BIOS, rather than notifying the BIOS that it is
      running on QEMU or KVM. This way memory ranges can change etc. and
      an older BIOS will continue to work on newer QEMU if it receives the
      info as a fw_cfg value.
      
      This one also matches what qemu-kvm does for irq0override, except I
      haven't made it configurable. I leave that as an exercise for whoever
      would be interested in switching off irq0override.
      
      Thanks,
      Jes
      
      Set irq0 override in fw_cfg, informing the BIOS that QEMU expects
      override on irq0. This matches qemu-kvm, and will help sharing a
      single BIOS binary.
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6b35e7bf
    • Z
      Clean up VGA type selection; far too many variables being used to track one... · 86176759
      Zachary Amsden 提交于
      Clean up VGA type selection; far too many variables being used to track one state leads to confusion if new variables are added.
      Signed-off-by: NZachary Amsden <zamsden@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      86176759
    • A
      Do not disable autostart for live migration · 6b99dadc
      Avi Kivity 提交于
      If the user does not want autostart, they can specify -S.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6b99dadc
  4. 11 8月, 2009 9 次提交
  5. 09 8月, 2009 1 次提交
  6. 30 7月, 2009 1 次提交
    • P
      fix migration to obey -S · d399f677
      Paolo Bonzini 提交于
      Since migration returns right away, starting the VM right
      after calling qemu_start_incoming_migration is wrong even
      if -S is not passed.  We have to do this after migration
      has completed.
      
      Cc: Glauber Costa  <glommer@redhat.com>
      Cc: Anthony Liguori  <aliguori@us.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      d399f677
  7. 28 7月, 2009 11 次提交
  8. 27 7月, 2009 2 次提交
  9. 17 7月, 2009 3 次提交
    • B
      Fix OpenBSD build · 96555a96
      Blue Swirl 提交于
      The header sys-queue.h must be #included early, otherwise at some point OS
      queue macros will be used. On OpenBSD, those don't define TAILQ_FOREACH_SAFE.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      96555a96
    • G
      qdev/compat: compat property infrastructure. · b6b61144
      Gerd Hoffmann 提交于
      This add support for switching devices into a compatibility mode
      using device properties.  Machine types can have a list of properties
      for specific devices attached to allow the easy creation of machine
      types compatible to older qemu versions.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b6b61144
    • P
      honor -S on incoming migration · 89befdd1
      Paolo Bonzini 提交于
      -S is not honored by qemu on incoming migration.  If a domain is migrated
      while paused, thus, it will start running on the remote machine; this
      is wrong.
      
      Given the trivial patch to fix this, it looks more like a thinko
      than anything else, probably dating back to the qemu-kvm merge.
      The interesting part is that the -S mechanism was in fact *used* when
      migrating (setting autostart = 0) and the incoming migration code was
      starting the VM at the end of the migration.
      
      Since I was removing the vm_start from there, I also corrected a related
      imprecision.  The code was doing a vm_stop "just in case", but we can
      be sure that the VM is not running---the vm_start call in vl.c has not
      been reached yet.  So the vm_stop is removed together with the vm_start.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      89befdd1