From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Date: Wed, 22 Mar 2017 08:28:05 +0000 Subject: [kvm-unit-tests PATCH v4 0/2] powerpc: Test SPR persistency during migration Message-Id: <1490171287-30893-1-git-send-email-thuth@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org, Laurent Vivier , Drew Jones , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Cc: kvm-ppc@vger.kernel.org, Paolo Bonzini , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Matlack Here's a KVM-unit-test to check the persistency of SPRs during migration. First patch adds a helper script for doing migration tests in the kvm-unit-test framework, and the second patch contains the SPR tester. v4: - Fix the error paths in run_migration() - use "exit 2" instead of "exit 1" to avoid trouble with the return code magic in the powerpc/run script and make sure to terminate the two QEMU instances in case of migration failure. v3: - Migration shell script code has been moved to a helper function in arch-run.bash, so that this now also works with the standalone tests. - Introduced the helper function migration_cmd there, too, so that other architectures can use this, too. - Use "$@" instead of $* when calling QEMU. v2: - Addressed review feedback from v1 - Now using cpu_relax() instead of asm volatile ("nop") Thomas Huth (2): Add the possibility to do simple migration tests powerpc: Add Special Purpose Register persistency test powerpc/Makefile.common | 3 +- powerpc/cstart64.S | 2 + powerpc/run | 2 +- powerpc/sprs.c | 304 ++++++++++++++++++++++++++++++++++++++++++++++++ powerpc/unittests.cfg | 5 + scripts/arch-run.bash | 63 ++++++++++ scripts/runtime.bash | 3 + 7 files changed, 380 insertions(+), 2 deletions(-) create mode 100644 powerpc/sprs.c -- 1.8.3.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Subject: [kvm-unit-tests PATCH v4 0/2] powerpc: Test SPR persistency during migration Date: Wed, 22 Mar 2017 09:28:05 +0100 Message-ID: <1490171287-30893-1-git-send-email-thuth@redhat.com> Cc: kvm-ppc@vger.kernel.org, Paolo Bonzini , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Matlack To: kvm@vger.kernel.org, Laurent Vivier , Drew Jones , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47780 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758632AbdCVI2S (ORCPT ); Wed, 22 Mar 2017 04:28:18 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Here's a KVM-unit-test to check the persistency of SPRs during migration. First patch adds a helper script for doing migration tests in the kvm-unit-test framework, and the second patch contains the SPR tester. v4: - Fix the error paths in run_migration() - use "exit 2" instead of "exit 1" to avoid trouble with the return code magic in the powerpc/run script and make sure to terminate the two QEMU instances in case of migration failure. v3: - Migration shell script code has been moved to a helper function in arch-run.bash, so that this now also works with the standalone tests. - Introduced the helper function migration_cmd there, too, so that other architectures can use this, too. - Use "$@" instead of $* when calling QEMU. v2: - Addressed review feedback from v1 - Now using cpu_relax() instead of asm volatile ("nop") Thomas Huth (2): Add the possibility to do simple migration tests powerpc: Add Special Purpose Register persistency test powerpc/Makefile.common | 3 +- powerpc/cstart64.S | 2 + powerpc/run | 2 +- powerpc/sprs.c | 304 ++++++++++++++++++++++++++++++++++++++++++++++++ powerpc/unittests.cfg | 5 + scripts/arch-run.bash | 63 ++++++++++ scripts/runtime.bash | 3 + 7 files changed, 380 insertions(+), 2 deletions(-) create mode 100644 powerpc/sprs.c -- 1.8.3.1