qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] bdf46d: migration: reorder code to make it sy


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] bdf46d: migration: reorder code to make it symmetric
Date: Fri, 26 Feb 2016 08:00:05 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: bdf46d6478df86d5810048459582dc8f5a15b064
      
https://github.com/qemu/qemu/commit/bdf46d6478df86d5810048459582dc8f5a15b064
  Author: Wei Yang <address@hidden>
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: reorder code to make it symmetric

In qemu_savevm_state_complete_precopy(), it iterates on each device to add
a json object and transfer related status to destination, while the order
of the last two steps could be refined.

Current order:

    json_start_object()
        save_section_header()
        vmstate_save()
    json_end_object()
        save_section_footer()

After the change:

    json_start_object()
        save_section_header()
        vmstate_save()
        save_section_footer()
    json_end_object()

This patch reorder the code to to make it symmetric. No functional change.

Signed-off-by: Wei Yang <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: d8b9d7719cf6fb3186ecc817b3c04005eb1a1f01
      
https://github.com/qemu/qemu/commit/d8b9d7719cf6fb3186ecc817b3c04005eb1a1f01
  Author: Matthew Fortune <address@hidden>
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
    M migration/postcopy-ram.c

  Log Message:
  -----------
  migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD

sys/eventfd.h was being guarded only by a check for linux but does
not exist on older distributions like CentOS 5. Move the include
into the code that uses it and add an appropriate guard.

Signed-off-by: Matthew Fortune <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: a609ad8b6924c0476e3c3d4b8e9079974d3c6ecf
      
https://github.com/qemu/qemu/commit/a609ad8b6924c0476e3c3d4b8e9079974d3c6ecf
  Author: Thomas Huth <address@hidden>
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Add docs/migration.txt to the "Migration" section

Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 8da5ef579f956857ca1887ce0bc5e189dd9de0c4
      
https://github.com/qemu/qemu/commit/8da5ef579f956857ca1887ce0bc5e189dd9de0c4
  Author: Sascha Silbe <address@hidden>
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
    M include/migration/vmstate.h

  Log Message:
  -----------
  migration/vmstate: document VMStateFlags

The VMState API is rather sparsely documented. Start by describing the
meaning of all VMStateFlags.

Reviewed-by: Amit Shah <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Sascha Silbe <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: 0aa6aefc9c93db1f64e3ba406ee5234da75b545b
      
https://github.com/qemu/qemu/commit/0aa6aefc9c93db1f64e3ba406ee5234da75b545b
  Author: Denis V. Lunev <address@hidden>
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
    M include/migration/migration.h
    M migration/migration.c

  Log Message:
  -----------
  migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context

There is a possibility to hit an assert in qcow2_get_specific_info that
s->qcow_version is undefined. This happens when VM in starting from
suspended state, i.e. it processes incoming migration, and in the same
time 'info block' is called.

The problem is that qcow2_invalidate_cache() closes the image and
memset()s BDRVQcowState in the middle.

The patch moves processing of bdrv_invalidate_cache_all out of
coroutine context for standard migration to avoid that.

Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
CC: Paolo Bonzini <address@hidden>
CC: Juan Quintela <address@hidden>
CC: Amit Shah <address@hidden>
Message-Id: <address@hidden>

[Amit: Fix a use-after-free bug]

Signed-off-by: Amit Shah <address@hidden>


  Commit: ea6a55bcc0d144ac5086cebf7f84afa7071afe90
      
https://github.com/qemu/qemu/commit/ea6a55bcc0d144ac5086cebf7f84afa7071afe90
  Author: Denis V. Lunev <address@hidden>
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration (postcopy): move bdrv_invalidate_cache_all of of coroutine context

There is a possibility to hit an assert in qcow2_get_specific_info that
s->qcow_version is undefined. This happens when VM in starting from
suspended state, i.e. it processes incoming migration, and in the same
time 'info block' is called.

The problem is that qcow2_invalidate_cache() closes the image and
memset()s BDRVQcowState in the middle.

The patch moves processing of bdrv_invalidate_cache_all out of
coroutine context for postcopy migration to avoid that. This function
is called with the following stack:
  process_incoming_migration_co
  qemu_loadvm_state
  qemu_loadvm_state_main
  loadvm_process_command
  loadvm_postcopy_handle_run

Signed-off-by: Denis V. Lunev <address@hidden>
Tested-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
CC: Paolo Bonzini <address@hidden>
CC: Juan Quintela <address@hidden>
CC: Amit Shah <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>


  Commit: aa53d5bfc35d73099184bdd1c538591a5f795c9e
      
https://github.com/qemu/qemu/commit/aa53d5bfc35d73099184bdd1c538591a5f795c9e
  Author: Peter Maydell <address@hidden>
  Date:   2016-02-26 (Fri, 26 Feb 2016)

  Changed paths:
    M MAINTAINERS
    M include/migration/migration.h
    M include/migration/vmstate.h
    M migration/migration.c
    M migration/postcopy-ram.c
    M migration/savevm.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/amit-migration/tags/migration-for-2.6-5' into staging

migration pull
 - fix a qcow2 assert
 - fix for older distros (CentOS 5)
 - documentation for vmstate flags
 - minor code rearrangement

# gpg: Signature made Fri 26 Feb 2016 15:15:15 GMT using RSA key ID 854083B6
# gpg: Good signature from "Amit Shah <address@hidden>"
# gpg:                 aka "Amit Shah <address@hidden>"
# gpg:                 aka "Amit Shah <address@hidden>"

* remotes/amit-migration/tags/migration-for-2.6-5:
  migration (postcopy): move bdrv_invalidate_cache_all of of coroutine context
  migration (ordinary): move bdrv_invalidate_cache_all of of coroutine context
  migration/vmstate: document VMStateFlags
  MAINTAINERS: Add docs/migration.txt to the "Migration" section
  migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD
  migration: reorder code to make it symmetric

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/4d1e324b2241...aa53d5bfc35d

reply via email to

[Prev in Thread] Current Thread [Next in Thread]