mbox series

[kvm-unit-tests,v3,0/4] lib: add function to request migration

Message ID 20221212111731.292942-1-nrb@linux.ibm.com (mailing list archive)
Headers show
Series lib: add function to request migration | expand

Message

Nico Boehr Dec. 12, 2022, 11:17 a.m. UTC
v2->v3:
---
* s390x: remove unneeded parenthesis (thanks Claudio)

v1->v2:
---
* arm: commit message gib->gic (thanks Andrew)
* arm: remove unneeded {} (thanks Andrew)
* s390x: make patch less intrusive (thanks Claudio)

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 +
 powerpc/Makefile.common |  1 +
 s390x/Makefile          |  1 +
 lib/migrate.h           |  9 ++++++++
 lib/migrate.c           | 34 ++++++++++++++++++++++++++++
 arm/debug.c             | 17 +++++---------
 arm/gic.c               | 49 ++++++++++++-----------------------------
 powerpc/sprs.c          |  4 ++--
 s390x/migration-cmm.c   | 24 ++++++--------------
 s390x/migration-sck.c   |  4 ++--
 s390x/migration-skey.c  | 20 ++++++-----------
 s390x/migration.c       |  7 ++----
 12 files changed, 85 insertions(+), 86 deletions(-)
 create mode 100644 lib/migrate.h
 create mode 100644 lib/migrate.c

Comments

Claudio Imbrenda Dec. 13, 2022, 3:36 p.m. UTC | #1
Paolo and/or Thomas: if you do not have objections, could you pick this
series?

every affected architecture has been reviewed :)


On Mon, 12 Dec 2022 12:17:27 +0100
Nico Boehr <nrb@linux.ibm.com> wrote:

> v2->v3:
> ---
> * s390x: remove unneeded parenthesis (thanks Claudio)
> 
> v1->v2:
> ---
> * arm: commit message gib->gic (thanks Andrew)
> * arm: remove unneeded {} (thanks Andrew)
> * s390x: make patch less intrusive (thanks Claudio)
> 
> 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 +
>  powerpc/Makefile.common |  1 +
>  s390x/Makefile          |  1 +
>  lib/migrate.h           |  9 ++++++++
>  lib/migrate.c           | 34 ++++++++++++++++++++++++++++
>  arm/debug.c             | 17 +++++---------
>  arm/gic.c               | 49 ++++++++++++-----------------------------
>  powerpc/sprs.c          |  4 ++--
>  s390x/migration-cmm.c   | 24 ++++++--------------
>  s390x/migration-sck.c   |  4 ++--
>  s390x/migration-skey.c  | 20 ++++++-----------
>  s390x/migration.c       |  7 ++----
>  12 files changed, 85 insertions(+), 86 deletions(-)
>  create mode 100644 lib/migrate.h
>  create mode 100644 lib/migrate.c
>
Thomas Huth Dec. 13, 2022, 4:26 p.m. UTC | #2
On 13/12/2022 16.36, Claudio Imbrenda wrote:
> 
> Paolo and/or Thomas: if you do not have objections, could you pick this
> series?
> 
> every affected architecture has been reviewed :)

Done.

  Thanks,
   Thomas


> 
> On Mon, 12 Dec 2022 12:17:27 +0100
> Nico Boehr <nrb@linux.ibm.com> wrote:
> 
>> v2->v3:
>> ---
>> * s390x: remove unneeded parenthesis (thanks Claudio)
>>
>> v1->v2:
>> ---
>> * arm: commit message gib->gic (thanks Andrew)
>> * arm: remove unneeded {} (thanks Andrew)
>> * s390x: make patch less intrusive (thanks Claudio)
>>
>> 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 +
>>   powerpc/Makefile.common |  1 +
>>   s390x/Makefile          |  1 +
>>   lib/migrate.h           |  9 ++++++++
>>   lib/migrate.c           | 34 ++++++++++++++++++++++++++++
>>   arm/debug.c             | 17 +++++---------
>>   arm/gic.c               | 49 ++++++++++++-----------------------------
>>   powerpc/sprs.c          |  4 ++--
>>   s390x/migration-cmm.c   | 24 ++++++--------------
>>   s390x/migration-sck.c   |  4 ++--
>>   s390x/migration-skey.c  | 20 ++++++-----------
>>   s390x/migration.c       |  7 ++----
>>   12 files changed, 85 insertions(+), 86 deletions(-)
>>   create mode 100644 lib/migrate.h
>>   create mode 100644 lib/migrate.c
>>
>