public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v1 0/4] lib: add function to request migration
@ 2022-11-30 14:22 Nico Boehr
  2022-11-30 14:22 ` [kvm-unit-tests PATCH v1 1/4] " Nico Boehr
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Nico Boehr @ 2022-11-30 14:22 UTC (permalink / raw)
  To: kvm; +Cc: frankja, imbrenda, thuth, pbonzini, andrew.jones, lvivier

With this series, I pick up a suggestion Claudio has brought up in my
CMM-migration series[1].

Migration tests can ask migrate_cmd to migrate them to a new QEMU
process. Requesting migration and waiting for completion is hence a
common pattern which is repeated all over the code base. Add a function
which does all of that to avoid repetition.

Since migrate_cmd currently can only migrate exactly once, this function
is called migrate_once() and is a no-op when it has been called before.
This can simplify the control flow, especially when tests are skipped.

[1] https://lore.kernel.org/kvm/20221125154646.5974cb52@p-imbrenda/

Nico Boehr (4):
  lib: add function to request migration
  powerpc: use migrate_once() in migration tests
  s390x: use migrate_once() in migration tests
  arm: use migrate_once() in migration tests

 arm/Makefile.common     |  1 +
 arm/debug.c             | 14 ++++--------
 arm/gic.c               | 49 ++++++++++++-----------------------------
 lib/migrate.c           | 34 ++++++++++++++++++++++++++++
 lib/migrate.h           |  9 ++++++++
 powerpc/Makefile.common |  1 +
 powerpc/sprs.c          |  4 ++--
 s390x/Makefile          |  1 +
 s390x/migration-cmm.c   | 27 ++++++++---------------
 s390x/migration-sck.c   |  4 ++--
 s390x/migration-skey.c  | 23 ++++++++-----------
 s390x/migration.c       |  7 ++----
 12 files changed, 88 insertions(+), 86 deletions(-)
 create mode 100644 lib/migrate.c
 create mode 100644 lib/migrate.h

-- 
2.36.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-12-09 13:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-30 14:22 [kvm-unit-tests PATCH v1 0/4] lib: add function to request migration Nico Boehr
2022-11-30 14:22 ` [kvm-unit-tests PATCH v1 1/4] " Nico Boehr
2022-11-30 17:30   ` Claudio Imbrenda
2022-12-01  8:12     ` Nico Boehr
2022-11-30 14:22 ` [kvm-unit-tests PATCH v1 2/4] powerpc: use migrate_once() in migration tests Nico Boehr
2022-12-09 13:18   ` Thomas Huth
2022-11-30 14:22 ` [kvm-unit-tests PATCH v1 3/4] s390x: " Nico Boehr
2022-11-30 17:34   ` Claudio Imbrenda
2022-11-30 14:22 ` [kvm-unit-tests PATCH v1 4/4] arm: " Nico Boehr
2022-12-02 11:56   ` Andrew Jones
2022-12-09 12:56     ` Nico Boehr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox