diff mbox series

[kvm-unit-tests,v1,2/4] powerpc: use migrate_once() in migration tests

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

Commit Message

Nico Boehr Nov. 30, 2022, 2:22 p.m. UTC
Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
---
 powerpc/Makefile.common | 1 +
 powerpc/sprs.c          | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Thomas Huth Dec. 9, 2022, 1:18 p.m. UTC | #1
On 30/11/2022 15.22, Nico Boehr wrote:
> Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
> ---
>   powerpc/Makefile.common | 1 +
>   powerpc/sprs.c          | 4 ++--
>   2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
> index 12c280c15fff..8ce00340b6be 100644
> --- a/powerpc/Makefile.common
> +++ b/powerpc/Makefile.common
> @@ -36,6 +36,7 @@ cflatobjs += lib/getchar.o
>   cflatobjs += lib/alloc_phys.o
>   cflatobjs += lib/alloc.o
>   cflatobjs += lib/devicetree.o
> +cflatobjs += lib/migrate.o
>   cflatobjs += lib/powerpc/io.o
>   cflatobjs += lib/powerpc/hcall.o
>   cflatobjs += lib/powerpc/setup.o
> diff --git a/powerpc/sprs.c b/powerpc/sprs.c
> index d3c8780e8376..5cc1cd16cfda 100644
> --- a/powerpc/sprs.c
> +++ b/powerpc/sprs.c
> @@ -21,6 +21,7 @@
>    */
>   #include <libcflat.h>
>   #include <util.h>
> +#include <migrate.h>
>   #include <alloc.h>
>   #include <asm/handlers.h>
>   #include <asm/hcall.h>
> @@ -285,8 +286,7 @@ int main(int argc, char **argv)
>   	get_sprs(before);
>   
>   	if (pause) {
> -		puts("Now migrate the VM, then press a key to continue...\n");
> -		(void) getchar();
> +		migrate_once();
>   	} else {
>   		puts("Sleeping...\n");
>   		handle_exception(0x900, &dec_except_handler, &decr);

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
index 12c280c15fff..8ce00340b6be 100644
--- a/powerpc/Makefile.common
+++ b/powerpc/Makefile.common
@@ -36,6 +36,7 @@  cflatobjs += lib/getchar.o
 cflatobjs += lib/alloc_phys.o
 cflatobjs += lib/alloc.o
 cflatobjs += lib/devicetree.o
+cflatobjs += lib/migrate.o
 cflatobjs += lib/powerpc/io.o
 cflatobjs += lib/powerpc/hcall.o
 cflatobjs += lib/powerpc/setup.o
diff --git a/powerpc/sprs.c b/powerpc/sprs.c
index d3c8780e8376..5cc1cd16cfda 100644
--- a/powerpc/sprs.c
+++ b/powerpc/sprs.c
@@ -21,6 +21,7 @@ 
  */
 #include <libcflat.h>
 #include <util.h>
+#include <migrate.h>
 #include <alloc.h>
 #include <asm/handlers.h>
 #include <asm/hcall.h>
@@ -285,8 +286,7 @@  int main(int argc, char **argv)
 	get_sprs(before);
 
 	if (pause) {
-		puts("Now migrate the VM, then press a key to continue...\n");
-		(void) getchar();
+		migrate_once();
 	} else {
 		puts("Sleeping...\n");
 		handle_exception(0x900, &dec_except_handler, &decr);