1. 15 3月, 2012 2 次提交
    • L
      qapi: Convert migrate · e1c37d0e
      Luiz Capitulino 提交于
      The migrate command is one of those commands where HMP and QMP completely
      mix up together. This made the conversion to the QAPI (which separates the
      command into QMP and HMP parts) a bit difficult.
      
      The first important change to be noticed is that this commit completes the
      removal of the Monitor object from migration code, started by the previous
      commit.
      
      Another important and tricky change is about supporting the non-detached
      mode. That is, if the user doesn't pass '-d' the migrate command will lock
      the monitor and will only release it when migration is finished.
      
      To support this in the new HMP command (hmp_migrate()), it is necessary
      to create a timer which runs every second and checks if the migration is
      still active. If it is, the timer callback will re-schedule itself to run
      one second in the future. If the migration has already finished, the
      monitor lock is released and the user can use it normally.
      
      All these changes should be transparent to the user.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      e1c37d0e
    • L
      Purge migration of (almost) everything to do with monitors · 539de124
      Luiz Capitulino 提交于
      The Monitor object is passed back and forth within the migration/savevm
      code so that it can print errors and progress to the user.
      
      However, that approach assumes a HMP monitor, being completely invalid
      in QMP.
      
      This commit drops almost every single usage of the Monitor object, all
      monitor_printf() calls have been converted into DPRINTF() ones.
      
      There are a few remaining Monitor objects, those are going to be dropped
      by the next commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      539de124
  2. 09 1月, 2012 1 次提交
  3. 04 1月, 2012 1 次提交
    • A
      vmstate, memory: decouple vmstate from memory API · c5705a77
      Avi Kivity 提交于
      Currently creating a memory region automatically registers it for
      live migration.  This differs from other state (which is enumerated
      in a VMStateDescription structure) and ties the live migration code
      into the memory core.
      
      Decouple the two by introducing a separate API, vmstate_register_ram(),
      for registering a RAM block for migration.  Currently the same
      implementation is reused, but later it can be moved into a separate list,
      and registrations can be moved to VMStateDescription blocks.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      c5705a77
  4. 15 12月, 2011 1 次提交
  5. 13 12月, 2011 4 次提交
  6. 05 12月, 2011 1 次提交
  7. 02 12月, 2011 1 次提交
  8. 22 11月, 2011 1 次提交
  9. 02 11月, 2011 1 次提交
  10. 22 10月, 2011 1 次提交
  11. 20 10月, 2011 11 次提交
  12. 19 10月, 2011 1 次提交
  13. 04 10月, 2011 1 次提交
    • L
      RunState: Rename enum values as generated by the QAPI · 0461d5a6
      Luiz Capitulino 提交于
      Next commit will convert the query-status command to use the
      RunState type as generated by the QAPI.
      
      In order to "transparently" replace the current enum by the QAPI
      one, we have to make some changes to some enum values.
      
      As the changes are simple renames, I'll do them in one shot. The
      changes are:
      
       - Rename the prefix from RSTATE_ to RUN_STATE_
       - RUN_STATE_SAVEVM to RUN_STATE_SAVE_VM
       - RUN_STATE_IN_MIGRATE to RUN_STATE_INMIGRATE
       - RUN_STATE_PANICKED to RUN_STATE_INTERNAL_ERROR
       - RUN_STATE_POST_MIGRATE to RUN_STATE_POSTMIGRATE
       - RUN_STATE_PRE_LAUNCH to RUN_STATE_PRELAUNCH
       - RUN_STATE_PRE_MIGRATE to RUN_STATE_PREMIGRATE
       - RUN_STATE_RESTORE to RUN_STATE_RESTORE_VM
       - RUN_STATE_PRE_MIGRATE to RUN_STATE_FINISH_MIGRATE
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      0461d5a6
  14. 16 9月, 2011 2 次提交
  15. 06 9月, 2011 1 次提交
    • M
      savevm: Include writable devices with removable media · 07b70bfb
      Markus Armbruster 提交于
      savevm and loadvm silently ignore block devices with removable media,
      such as floppies and SD cards.  Rolling back a VM to a previous
      checkpoint will *not* roll back writes to block devices with removable
      media.
      
      Moreover, bdrv_is_removable() is a confused mess, and wrong in at
      least one case: it considers "-drive if=xen,media=cdrom -M xenpv"
      removable.  It'll be cleaned up later in this series.
      
      Read-only block devices are also ignored, but that's okay.
      
      Fix by ignoring only read-only block devices and empty block devices.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      07b70bfb
  16. 21 8月, 2011 1 次提交
  17. 25 7月, 2011 1 次提交
    • B
      Wrap recv to avoid warnings · 00aa0040
      Blue Swirl 提交于
      Avoid warnings like these by wrapping recv():
        CC    slirp/ip_icmp.o
      /src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':
      /src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]
      /usr/local/lib/gcc/i686-mingw32msvc/4.6.0/../../../../i686-mingw32msvc/include/winsock2.h:547:32: note: expected 'char *' but argument is of type 'struct icmp *'
      
      Remove also casts used to avoid warnings.
      Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      00aa0040
  18. 20 7月, 2011 1 次提交
  19. 16 6月, 2011 1 次提交
    • J
      Reset system before loadvm · 5a8a49d7
      Jan Kiszka 提交于
      In case we load the vmstate during incoming migration, we start from a
      clean, default machine state as we went through system reset before. But
      if we load from a snapshot, the machine can be in any state. That can
      cause troubles if loading an older image which does not carry all state
      information the executing QEMU requires. Hardly any device takes care of
      this scenario.
      
      However, fixing this is trivial. We just need to issue a system reset
      during loadvm as well.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      5a8a49d7
  20. 08 6月, 2011 1 次提交
  21. 16 4月, 2011 2 次提交
  22. 22 3月, 2011 1 次提交
  23. 21 3月, 2011 2 次提交
    • P
      change all other clock references to use nanosecond resolution accessors · 74475455
      Paolo Bonzini 提交于
      This was done with:
      
          sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
              $(git grep -l 'qemu_get_clock\>' )
          sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
              $(git grep -l 'qemu_new_timer\>' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      
      There was exactly one false positive in qemu_run_timers:
      
           -    current_time = qemu_get_clock (clock);
           +    current_time = qemu_get_clock_ns (clock);
      
      which is of course not in this patch.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      74475455
    • P
      change all rt_clock references to use millisecond resolution accessors · 7bd427d8
      Paolo Bonzini 提交于
      This was done with:
      
          sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \
              $(git grep -l 'get_clock\>.*rt_clock' )
          sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \
              $(git grep -l 'new_timer\>.*rt_clock' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7bd427d8