qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 334d15: migration-test: Use g_free() instead


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 334d15: migration-test: Use g_free() instead of free()
Date: Thu, 30 Jan 2020 05:15:13 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 334d15d504633a4610b8f4de4e01d8bba24c2655
      
https://github.com/qemu/qemu/commit/334d15d504633a4610b8f4de4e01d8bba24c2655
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  migration-test: Use g_free() instead of free()

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>


  Commit: 3d4095b222d97393b1c2c6e514951ec7798f1c43
      
https://github.com/qemu/qemu/commit/3d4095b222d97393b1c2c6e514951ec7798f1c43
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  multifd: Make sure that we don't do any IO after an error

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: a555b8092abc6f1bbe4b64c516679cbd68fcfbd8
      
https://github.com/qemu/qemu/commit/a555b8092abc6f1bbe4b64c516679cbd68fcfbd8
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/qemu-file.c

  Log Message:
  -----------
  qemu-file: Don't do IO after shutdown

Be sure that we are not doing neither read/write after shutdown of the
QEMUFile.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: b69a0227a803256ad270283872d40ff768f4d56d
      
https://github.com/qemu/qemu/commit/b69a0227a803256ad270283872d40ff768f4d56d
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Don't send data if we have stopped

If we do a cancel, we got out without one error, but we can't do the
rest of the output as in a normal situation.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: d795f47466ead5f189f2efbcf9080dc9c0b92443
      
https://github.com/qemu/qemu/commit/d795f47466ead5f189f2efbcf9080dc9c0b92443
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  migration-test: Make sure that multifd and cancel works

Test that this sequence works:

- launch source
- launch target
- start migration
- cancel migration
- relaunch target
- do migration again

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 392d87e21325fdb01210176faa07472b4985ccf0
      
https://github.com/qemu/qemu/commit/392d87e21325fdb01210176faa07472b4985ccf0
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

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

  Log Message:
  -----------
  migration: Create migration_is_running()

This function returns true if we are in the middle of a migration.
It is like migration_is_setup_or_active() with CANCELLING and COLO.
Adapt all callers that are needed.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 9c4d333c092e9c26d38f740ff3616deb42f21681
      
https://github.com/qemu/qemu/commit/9c4d333c092e9c26d38f740ff3616deb42f21681
  Author: Zhimin Feng <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration/multifd: fix nullptr access in multifd_send_terminate_threads

If the multifd_send_threads is not created when migration is failed,
multifd_save_cleanup would be called twice. In this senario, the
multifd_send_state is accessed after it has been released, the result
is that the source VM is crashing down.

Here is the coredump stack:
    Program received signal SIGSEGV, Segmentation fault.
    0x00005629333a78ef in multifd_send_terminate_threads (err=err@entry=0x0) at 
migration/ram.c:1012
    1012            MultiFDSendParams *p = &multifd_send_state->params[i];
    #0  0x00005629333a78ef in multifd_send_terminate_threads 
(err=err@entry=0x0) at migration/ram.c:1012
    #1  0x00005629333ab8a9 in multifd_save_cleanup () at migration/ram.c:1028
    #2  0x00005629333abaea in multifd_new_send_channel_async 
(task=0x562935450e70, opaque=<optimized out>) at migration/ram.c:1202
    #3  0x000056293373a562 in qio_task_complete 
(task=task@entry=0x562935450e70) at io/task.c:196
    #4  0x000056293373a6e0 in qio_task_thread_result (opaque=0x562935450e70) at 
io/task.c:111
    #5  0x00007f475d4d75a7 in g_idle_dispatch () from 
/usr/lib64/libglib-2.0.so.0
    #6  0x00007f475d4da9a9 in g_main_context_dispatch () from 
/usr/lib64/libglib-2.0.so.0
    #7  0x0000562933785b33 in glib_pollfds_poll () at util/main-loop.c:219
    #8  os_host_main_loop_wait (timeout=<optimized out>) at util/main-loop.c:242
    #9  main_loop_wait (nonblocking=nonblocking@entry=0) at util/main-loop.c:518
    #10 0x00005629334c5acf in main_loop () at vl.c:1810
    #11 0x000056293334d7bb in main (argc=<optimized out>, argv=<optimized out>, 
envp=<optimized out>) at vl.c:4471

If the multifd_send_threads is not created when migration is failed.
In this senario, we don't call multifd_save_cleanup in 
multifd_new_send_channel_async.

Signed-off-by: Zhimin Feng <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 41aa4e9fd847a2145d336406d1cf7bbb7aa8803a
      
https://github.com/qemu/qemu/commit/41aa4e9fd847a2145d336406d1cf7bbb7aa8803a
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M MAINTAINERS
    M include/exec/ram_addr.h
    A include/exec/ramblock.h

  Log Message:
  -----------
  ram_addr: Split RAMBlock definition

We need some of the fields without having to poison everything else.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: df94d32bb14faa0a329782b5354fe0ab5b1e1ef5
      
https://github.com/qemu/qemu/commit/df94d32bb14faa0a329782b5354fe0ab5b1e1ef5
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  multifd: multifd_send_pages only needs the qemufile

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 67a4c8910c7351114f2bffe6b0eceac6ad9c72af
      
https://github.com/qemu/qemu/commit/67a4c8910c7351114f2bffe6b0eceac6ad9c72af
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  multifd: multifd_queue_page only needs the qemufile

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 99f2c6fb46d9df44aa13ec043d807505ae4b5559
      
https://github.com/qemu/qemu/commit/99f2c6fb46d9df44aa13ec043d807505ae4b5559
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  multifd: multifd_send_sync_main only needs the qemufile

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: a6703e4d336b29668b3f5f84da82619dafe33f10
      
https://github.com/qemu/qemu/commit/a6703e4d336b29668b3f5f84da82619dafe33f10
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  multifd: Use qemu_target_page_size()

We will make it cpu independent.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 857a4bbb86d45fe9cd008480d3d6460a998cbb66
      
https://github.com/qemu/qemu/commit/857a4bbb86d45fe9cd008480d3d6460a998cbb66
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Make checkpatch happy with comments

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 00f4b572e60ecfac0fde9193257efc61a76aba7e
      
https://github.com/qemu/qemu/commit/00f4b572e60ecfac0fde9193257efc61a76aba7e
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

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

  Log Message:
  -----------
  multifd: Make multifd_save_setup() get an Error parameter

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: b673eab4e2ca749669405640bb9e3f5140f89e1b
      
https://github.com/qemu/qemu/commit/b673eab4e2ca749669405640bb9e3f5140f89e1b
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/migration.c
    M migration/migration.h
    M migration/ram.c
    M migration/ram.h
    M migration/rdma.c

  Log Message:
  -----------
  multifd: Make multifd_load_setup() get an Error parameter

We need to change the full chain to pass the Error parameter.

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: d32ca5ad7988328f95db6a26beb374c55154c77b
      
https://github.com/qemu/qemu/commit/d32ca5ad7988328f95db6a26beb374c55154c77b
  Author: Juan Quintela <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/Makefile.objs
    M migration/migration.c
    A migration/multifd.c
    A migration/multifd.h
    M migration/ram.c
    M migration/ram.h

  Log Message:
  -----------
  multifd: Split multifd code into its own file

Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: a085664f21d80b3bc4d052a8e9c372abba2d6c38
      
https://github.com/qemu/qemu/commit/a085664f21d80b3bc4d052a8e9c372abba2d6c38
  Author: Eric Auger <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M include/qemu/queue.h
    M migration/vmstate-types.c

  Log Message:
  -----------
  migration: Simplify get_qlist

Instead of inserting read elements at the head and
then reversing the list, it is simpler to add
each element after the previous one. Introduce
QLIST_RAW_INSERT_AFTER helper and use it in
get_qlist().

Signed-off-by: Eric Auger <address@hidden>
Suggested-by: Juan Quintela <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: 42d24611afc7610808ecb8770cf40e84714dd28e
      
https://github.com/qemu/qemu/commit/42d24611afc7610808ecb8770cf40e84714dd28e
  Author: Wei Yang <address@hidden>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M migration/qemu-file.c

  Log Message:
  -----------
  migration/compress: compress QEMUFile is not writable

We open a file with empty_ops for compress QEMUFile, which means this is
not writable.

Signed-off-by: Wei Yang <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>


  Commit: b7382e9e92cba6779dc03ba3cb19ec3572699dd5
      
https://github.com/qemu/qemu/commit/b7382e9e92cba6779dc03ba3cb19ec3572699dd5
  Author: Peter Maydell <address@hidden>
  Date:   2020-01-30 (Thu, 30 Jan 2020)

  Changed paths:
    M MAINTAINERS
    M include/exec/ram_addr.h
    A include/exec/ramblock.h
    M include/qemu/queue.h
    M migration/Makefile.objs
    M migration/migration.c
    M migration/migration.h
    A migration/multifd.c
    A migration/multifd.h
    M migration/qemu-file.c
    M migration/ram.c
    M migration/ram.h
    M migration/rdma.c
    M migration/savevm.c
    M migration/vmstate-types.c
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/juanquintela/tags/pull-migration-pull-request' into staging

Migration pull request

# gpg: Signature made Wed 29 Jan 2020 10:57:23 GMT
# gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
# gpg: Good signature from "Juan Quintela <address@hidden>" [full]
# gpg:                 aka "Juan Quintela <address@hidden>" [full]
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723

* remotes/juanquintela/tags/pull-migration-pull-request:
  migration/compress: compress QEMUFile is not writable
  migration: Simplify get_qlist
  multifd: Split multifd code into its own file
  multifd: Make multifd_load_setup() get an Error parameter
  multifd: Make multifd_save_setup() get an Error parameter
  migration: Make checkpatch happy with comments
  multifd: Use qemu_target_page_size()
  multifd: multifd_send_sync_main only needs the qemufile
  multifd: multifd_queue_page only needs the qemufile
  multifd: multifd_send_pages only needs the qemufile
  ram_addr: Split RAMBlock definition
  migration/multifd: fix nullptr access in multifd_send_terminate_threads
  migration: Create migration_is_running()
  migration-test: Make sure that multifd and cancel works
  migration: Don't send data if we have stopped
  qemu-file: Don't do IO after shutdown
  multifd: Make sure that we don't do any IO after an error
  migration-test: Use g_free() instead of free()

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


Compare: https://github.com/qemu/qemu/compare/bddff6f6787c...b7382e9e92cb



reply via email to

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