1. 02 6月, 2017 5 次提交
  2. 31 5月, 2017 5 次提交
  3. 23 5月, 2017 1 次提交
    • E
      shutdown: Prepare for use of an enum in reset/shutdown_request · aedbe192
      Eric Blake 提交于
      We want to track why a guest was shutdown; in particular, being able
      to tell the difference between a guest request (such as ACPI request)
      and host request (such as SIGINT) will prove useful to libvirt.
      Since all requests eventually end up changing shutdown_requested in
      vl.c, the logical change is to make that value track the reason,
      rather than its current 0/1 contents.
      
      Since command-line options control whether a reset request is turned
      into a shutdown request instead, the same treatment is given to
      reset_requested.
      
      This patch adds an internal enum ShutdownCause that describes reasons
      that a shutdown can be requested, and changes qemu_system_reset() to
      pass the reason through, although for now nothing is actually changed
      with regards to what gets reported.  The enum could be exported via
      QAPI at a later date, if deemed necessary, but for now, there has not
      been a request to expose that much detail to end clients.
      
      For the most part, we turn 0 into SHUTDOWN_CAUSE_NONE, and 1 into
      SHUTDOWN_CAUSE_HOST_ERROR; the only specific case where we have enough
      information right now to use a different value is when we are reacting
      to a host signal.  It will take a further patch to edit all call-sites
      that can trigger a reset or shutdown request to properly pass in any
      other reasons; this patch includes TODOs to point such places out.
      
      qemu_system_reset() trades its 'bool report' parameter for a
      'ShutdownCause reason', with all non-zero values having the same
      effect; this lets us get rid of the weird #defines for VMRESET_*
      as synonyms for bools.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20170515214114.15442-3-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      aedbe192
  4. 19 5月, 2017 16 次提交
  5. 18 5月, 2017 1 次提交
  6. 17 5月, 2017 7 次提交
  7. 11 5月, 2017 2 次提交
    • K
      block: New BdrvChildRole.activate() for blk_resume_after_migration() · 4417ab7a
      Kevin Wolf 提交于
      Instead of manually calling blk_resume_after_migration() in migration
      code after doing bdrv_invalidate_cache_all(), integrate the BlockBackend
      activation with cache invalidation into a single function. This is
      achieved with a new callback in BdrvChildRole that is called by
      bdrv_invalidate_cache_all().
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      4417ab7a
    • K
      migration: Unify block node activation error handling · ace21a58
      Kevin Wolf 提交于
      Migration code activates all block driver nodes on the destination when
      the migration completes. It does so by calling
      bdrv_invalidate_cache_all() and blk_resume_after_migration(). There is
      one code path for precopy and one for postcopy migration, resulting in
      four function calls, which used to have three different failure modes.
      
      This patch unifies the behaviour so that failure to activate all block
      nodes is non-fatal, but the error message is logged and the VM isn't
      automatically started. 'cont' will retry activating the block nodes.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      ace21a58
  8. 09 5月, 2017 3 次提交