[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] eb2ca5: runstate: add runstate_get()
From: |
Richard Henderson |
Subject: |
[Qemu-commits] [qemu/qemu] eb2ca5: runstate: add runstate_get() |
Date: |
Tue, 30 May 2023 11:41:24 -0700 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: eb2ca51994663ac445548c43358fd0c5268f1206
https://github.com/qemu/qemu/commit/eb2ca51994663ac445548c43358fd0c5268f1206
Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M include/sysemu/runstate.h
M softmmu/runstate.c
Log Message:
-----------
runstate: add runstate_get()
It's necessary to restore the state after failed/cancelled migration in
further commit.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230517123752.21615-2-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Commit: 77b3e6d3fec1484d25ff57962f47e9cc91abd589
https://github.com/qemu/qemu/commit/77b3e6d3fec1484d25ff57962f47e9cc91abd589
Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M include/migration/global_state.h
M migration/global_state.c
M migration/migration.c
M migration/savevm.c
Log Message:
-----------
migration: never fail in global_state_store()
Actually global_state_store() can never fail. Let's get rid of extra
error paths.
To make things clear, use new runstate_get() and use same approach for
global_state_store() and global_state_store_running().
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230517123752.21615-3-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Commit: e4343ec6ac28f110089b7c9299ba65baedf9fbb2
https://github.com/qemu/qemu/commit/e4343ec6ac28f110089b7c9299ba65baedf9fbb2
Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M include/sysemu/runstate.h
M softmmu/runstate.c
Log Message:
-----------
runstate: drop unused runstate_store()
The function is unused since previous commit. Drop it.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230517123752.21615-4-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Commit: 5f61f9a4942728c3a82a5666a16d17586495aa16
https://github.com/qemu/qemu/commit/5f61f9a4942728c3a82a5666a16d17586495aa16
Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/migration.c
M migration/migration.h
Log Message:
-----------
migration: switch from .vm_was_running to .vm_old_state
No logic change here, only refactoring. That's a preparation for next
commit where we finally restore the stopped vm state on migration
failure or cancellation.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230517123752.21615-5-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Commit: 983ec2235ca47b0a28ca8cd82ea50dc046d32c43
https://github.com/qemu/qemu/commit/983ec2235ca47b0a28ca8cd82ea50dc046d32c43
Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/migration.c
M softmmu/runstate.c
Log Message:
-----------
migration: restore vmstate on migration failure
1. Otherwise failed migration just drops guest-panicked state, which is
not good for management software.
2. We do keep different paused states like guest-panicked during
migration with help of global_state state.
3. We do restore running state on source when migration is cancelled or
failed.
4. "postmigrate" state is documented as "guest is paused following a
successful 'migrate'", so originally it's only for successful path
and we never documented current behavior.
Let's restore paused states like guest-panicked in case of cancel or
fail too. Allow same transitions like for inmigrate state.
This commit changes the behavior that was introduced by commit
42da5550d6 "migration: set state to post-migrate on failure" and
provides a bit different fix on related
https://bugzilla.redhat.com/show_bug.cgi?id=1355683
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230517123752.21615-6-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Commit: 479a2ad409a625da458649652e605947eb721112
https://github.com/qemu/qemu/commit/479a2ad409a625da458649652e605947eb721112
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/migration-stats.c
M migration/migration-stats.h
M migration/rdma.c
M migration/trace-events
Log Message:
-----------
migration: Don't abuse qemu_file transferred for RDMA
Just create a variable for it, the same way that multifd does. This
way it is safe to use for other thread, etc, etc.
Reviewed-by: Leonardo Bras <leobras@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230515195709.63843-11-quintela@redhat.com>
Commit: 51c353ab33ee9a6366e646877384a35e592e8ea2
https://github.com/qemu/qemu/commit/51c353ab33ee9a6366e646877384a35e592e8ea2
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/ram.c
Log Message:
-----------
migration/RDMA: It is accounting for zero/normal pages in two places
Remove the one in control_save_page().
Reviewed-by: Leonardo Bras <leobras@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230515195709.63843-12-quintela@redhat.com>
Commit: c1fbf411dfb26e8015f0046abb39f185faaea5a3
https://github.com/qemu/qemu/commit/c1fbf411dfb26e8015f0046abb39f185faaea5a3
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/rdma.c
Log Message:
-----------
migration/rdma: Remove QEMUFile parameter when not used
Reviewed-by: Leonardo Bras <leobras@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230515195709.63843-13-quintela@redhat.com>
Commit: af62826fd67fb17f48f623721325bc9d87e2f17b
https://github.com/qemu/qemu/commit/af62826fd67fb17f48f623721325bc9d87e2f17b
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.c
M migration/ram.c
Log Message:
-----------
migration/rdma: Don't use imaginary transfers
RDMA protocol is completely asynchronous, so in qemu_rdma_save_page()
they "invent" that a byte has been transferred. And then they call
qemu_file_credit_transfer() and ram_transferred_add() with that byte.
Just remove that calls as nothing has been sent.
Reviewed-by: Leonardo Bras <leobras@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230515195709.63843-14-quintela@redhat.com>
Commit: 400d034ea3f44d1ec55bf9132d0e25bcaa208b67
https://github.com/qemu/qemu/commit/400d034ea3f44d1ec55bf9132d0e25bcaa208b67
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.c
M migration/qemu-file.h
Log Message:
-----------
migration: Remove unused qemu_file_credit_transfer()
After this change, nothing abuses QEMUFile to account for data
transferrefd during migration.
Reviewed-by: Leonardo Bras <leobras@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230515195709.63843-15-quintela@redhat.com>
Commit: 34ea361e80a490fc8948de2f798b893edd625f91
https://github.com/qemu/qemu/commit/34ea361e80a490fc8948de2f798b893edd625f91
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.c
M migration/qemu-file.h
M migration/ram.c
M migration/rdma.c
Log Message:
-----------
migration/rdma: Simplify the function that saves a page
When we sent a page through QEMUFile hooks (RDMA) there are three
posiblities:
- We are not using RDMA. return RAM_SAVE_CONTROL_DELAYED and
control_save_page() returns false to let anything else to proceed.
- There is one error but we are using RDMA. Then we return a negative
value, control_save_page() needs to return true.
- Everything goes well and RDMA start the sent of the page
asynchronously. It returns RAM_SAVE_CONTROL_DELAYED and we need to
return 1 for ram_save_page_legacy.
Clear?
I know, I know, the interface is as bad as it gets. I think that now
it is a bit clearer, but this needs to be done some other way.
Reviewed-by: Leonardo Bras <leobras@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230515195709.63843-16-quintela@redhat.com>
Commit: 9399cf2b5a0f53da5ec0d7591ee435207ab39e9b
https://github.com/qemu/qemu/commit/9399cf2b5a0f53da5ec0d7591ee435207ab39e9b
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/migration.c
M migration/migration.h
M migration/options.c
M migration/options.h
M migration/rdma.c
Log Message:
-----------
migration: Create migrate_rdma()
Helper to say if we are doing a migration over rdma.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-2-quintela@redhat.com>
Commit: b67be1b43971f4f09da72a7f81f59948c32746f6
https://github.com/qemu/qemu/commit/b67be1b43971f4f09da72a7f81f59948c32746f6
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.c
M migration/qemu-file.h
M migration/ram.c
M migration/rdma.c
M migration/rdma.h
Log Message:
-----------
migration/rdma: Unfold ram_control_before_iterate()
Once there:
- Remove unused data parameter
- unfold it in its callers.
- change all callers to call qemu_rdma_registration_start()
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-3-quintela@redhat.com>
Commit: 03c824098ea54af10a6484a590c8bf3eda899f9a
https://github.com/qemu/qemu/commit/03c824098ea54af10a6484a590c8bf3eda899f9a
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.c
M migration/qemu-file.h
M migration/ram.c
M migration/rdma.c
M migration/rdma.h
Log Message:
-----------
migration/rdma: Unfold ram_control_after_iterate()
Once there:
- Remove unused data parameter
- unfold it in its callers
- change all callers to call qemu_rdma_registration_stop()
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-4-quintela@redhat.com>
Commit: b7c8a57b2834f3bcb592a9e9b08e96376db59292
https://github.com/qemu/qemu/commit/b7c8a57b2834f3bcb592a9e9b08e96376db59292
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.h
M migration/ram.c
M migration/rdma.c
M migration/rdma.h
Log Message:
-----------
migration/rdma: Remove all uses of RAM_CONTROL_HOOK
Instead of going trhough ram_control_load_hook(), call
qemu_rdma_registration_handle() directly.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-5-quintela@redhat.com>
Commit: 3f58e03735d2941802ec050722c0fb632b2e3900
https://github.com/qemu/qemu/commit/3f58e03735d2941802ec050722c0fb632b2e3900
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.c
M migration/qemu-file.h
M migration/ram.c
M migration/rdma.c
M migration/rdma.h
Log Message:
-----------
migration/rdma: Unfold hook_ram_load()
There is only one flag called with: RAM_CONTROL_BLOCK_REG.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-6-quintela@redhat.com>
Commit: 9bb529a0d71c67a857f121e9411e472e1f699656
https://github.com/qemu/qemu/commit/9bb529a0d71c67a857f121e9411e472e1f699656
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.c
M migration/qemu-file.h
M migration/ram.c
M migration/rdma.c
M migration/rdma.h
Log Message:
-----------
migration/rdma: Create rdma_control_save_page()
The only user of ram_control_save_page() and save_page() hook was
rdma. Just move the function to rdma.c, rename it to
rdma_control_save_page().
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-7-quintela@redhat.com>
Commit: 882d1f26b3c6d02467eb65ba945c0764d746cff5
https://github.com/qemu/qemu/commit/882d1f26b3c6d02467eb65ba945c0764d746cff5
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.c
M migration/qemu-file.h
M migration/rdma.c
Log Message:
-----------
qemu-file: Remove QEMUFileHooks
The only user was rdma, and its use is gone.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-8-quintela@redhat.com>
Commit: 6d9347f6e57bcbb2f62c0d73b948fa3d7ed3066a
https://github.com/qemu/qemu/commit/6d9347f6e57bcbb2f62c0d73b948fa3d7ed3066a
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/qemu-file.h
M migration/ram.c
M migration/rdma.h
Log Message:
-----------
migration/rdma: Move rdma constants from qemu-file.h to rdma.h
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-9-quintela@redhat.com>
Commit: a7e0ba1a39dbd3d829c0896356cdbeee59333778
https://github.com/qemu/qemu/commit/a7e0ba1a39dbd3d829c0896356cdbeee59333778
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/ram.c
M migration/rdma.c
M migration/rdma.h
M migration/trace-events
Log Message:
-----------
migration/rdma: Remove qemu_ prefix from exported functions
Functions are long enough even without this.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-10-quintela@redhat.com>
Commit: c63c544005e6b1375a9c038f0e0fb8dfb8b249f4
https://github.com/qemu/qemu/commit/c63c544005e6b1375a9c038f0e0fb8dfb8b249f4
Author: Juan Quintela <quintela@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M migration/rdma.c
Log Message:
-----------
migration/rdma: Check sooner if we are in postcopy for save_page()
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230509120700.78359-11-quintela@redhat.com>
Commit: 5042ced5075b92941a812828efc62106a6ff1666
https://github.com/qemu/qemu/commit/5042ced5075b92941a812828efc62106a6ff1666
Author: Thomas Huth <thuth@redhat.com>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M tests/avocado/virtio-gpu.py
Log Message:
-----------
tests/avocado/virtio-gpu: Cancel test if drm rendering is not available
The test_vhost_user_vga_virgl test currently fails on some CI
machines with:
qemu-system-x86_64: egl: no drm render node available
qemu-system-x86_64: egl: render node init failed
The other test in this file already checks whether there is
an error while starting QEMU - we should do the same for the
test_vhost_user_vga_virgl test, too.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230530180330.48722-1-thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Commit: b6bf64e58639436495bdf1dbd8bcdbc5cb4de88f
https://github.com/qemu/qemu/commit/b6bf64e58639436495bdf1dbd8bcdbc5cb4de88f
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2023-05-30 (Tue, 30 May 2023)
Changed paths:
M include/migration/global_state.h
M include/sysemu/runstate.h
M migration/global_state.c
M migration/migration-stats.c
M migration/migration-stats.h
M migration/migration.c
M migration/migration.h
M migration/options.c
M migration/options.h
M migration/qemu-file.c
M migration/qemu-file.h
M migration/ram.c
M migration/rdma.c
M migration/rdma.h
M migration/savevm.c
M migration/trace-events
M softmmu/runstate.c
Log Message:
-----------
Merge tag 'migration-20230530-pull-request' of
https://gitlab.com/juan.quintela/qemu into staging
Migration 20230530 Pull request (take 2)
Hi
Resend last PULL request, this time it compiles when CONFIG_RDMA is
not configured in.
[take 1]
On this PULL request:
- Set vmstate migration failure right (vladimir)
- Migration QEMUFileHook removal (juan)
- Migration Atomic counters (juan)
Please apply.
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmR2P48ACgkQ9IfvGFhy
# 1yN/EhAA1HAg2YPcUxNFJw/4apv782KrtMgtZW+HiYkKn51/VthHEP/V2OQSpUuc
# dv4QBH+lZXPDb5xkQM8kVfcUCB16yd38w9b6zvRCG6JN2IxyOMN6810pxV3PqTq9
# 86+/W1yly0XkR95kH7wqAjlbkEe6yAKTvabiJfRLUs48E794U1ok5p+O0L3rDEbI
# Og8Z/jvcaU4tSVmWH4+tI0wZY4iSwo2u2XO2tyxEh7PrAlql1wCvfD6szs7rDTtT
# i8TsWJ8mtx0VTLx1QBwDsU02kTmUTptJZrxbn5bY7vfLNz5ztZD4Mv4g9aNFuJ5B
# xumSl5T6HHBfxdl7NAzBBM6v0GmN21gfNXoB4WKDIVlCXgYyTeQHfrJBmrkZJwj8
# by8NHhtWDkc5M0em6ZwW9reDRXa80fQAhrVAE2+5wK0qI/1xm/tHroZm37X1v88j
# wvbDAnurdo7V8QC/kbIX+691lS2krB9IC2qiA40egS2UxzaNxIy7ohc+cnr4dzjP
# ofAKjJOTw7c/Vl6npBoJ/eJpa1/f3fVVvYBOkcyJezHwUJJUq0SXEhzoz4y6IpvR
# 4ZqbmQoUW8nilNN9NabdewwHCjGhXHBtyQMSUINaIFDyI/bcS5W6I2NblM9CBuYd
# gm6dXhTwNXmgh4aO48OVxmnyLgw7qSDz2yhIhy4MR+Yueh8Zifs=
# =lRhq
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 30 May 2023 11:25:19 AM PDT
# gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [undefined]
# gpg: aka "Juan Quintela <quintela@trasno.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723
* tag 'migration-20230530-pull-request' of
https://gitlab.com/juan.quintela/qemu: (21 commits)
migration/rdma: Check sooner if we are in postcopy for save_page()
migration/rdma: Remove qemu_ prefix from exported functions
migration/rdma: Move rdma constants from qemu-file.h to rdma.h
qemu-file: Remove QEMUFileHooks
migration/rdma: Create rdma_control_save_page()
migration/rdma: Unfold hook_ram_load()
migration/rdma: Remove all uses of RAM_CONTROL_HOOK
migration/rdma: Unfold ram_control_after_iterate()
migration/rdma: Unfold ram_control_before_iterate()
migration: Create migrate_rdma()
migration/rdma: Simplify the function that saves a page
migration: Remove unused qemu_file_credit_transfer()
migration/rdma: Don't use imaginary transfers
migration/rdma: Remove QEMUFile parameter when not used
migration/RDMA: It is accounting for zero/normal pages in two places
migration: Don't abuse qemu_file transferred for RDMA
migration: restore vmstate on migration failure
migration: switch from .vm_was_running to .vm_old_state
runstate: drop unused runstate_store()
migration: never fail in global_state_store()
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Compare: https://github.com/qemu/qemu/compare/f89f54d52bf8...b6bf64e58639