Re: [kvm-unit-tests PATCH v9 07/31] scripts: allow machine option to be specified in unittests.cfg

2024-05-08 Thread Thomas Huth
On 08/05/2024 14.58, Thomas Huth wrote: On 08/05/2024 14.55, Thomas Huth wrote: On 08/05/2024 14.27, Nicholas Piggin wrote: On Wed May 8, 2024 at 1:08 AM AEST, Thomas Huth wrote: On 04/05/2024 14.28, Nicholas Piggin wrote: This allows different machines with different requirements

Re: [kvm-unit-tests PATCH v9 07/31] scripts: allow machine option to be specified in unittests.cfg

2024-05-08 Thread Thomas Huth
On 08/05/2024 14.55, Thomas Huth wrote: On 08/05/2024 14.27, Nicholas Piggin wrote: On Wed May 8, 2024 at 1:08 AM AEST, Thomas Huth wrote: On 04/05/2024 14.28, Nicholas Piggin wrote: This allows different machines with different requirements to be supported by run_tests.sh, similarly to how

Re: [kvm-unit-tests PATCH v9 07/31] scripts: allow machine option to be specified in unittests.cfg

2024-05-08 Thread Thomas Huth
On 08/05/2024 14.27, Nicholas Piggin wrote: On Wed May 8, 2024 at 1:08 AM AEST, Thomas Huth wrote: On 04/05/2024 14.28, Nicholas Piggin wrote: This allows different machines with different requirements to be supported by run_tests.sh, similarly to how different accelerators are handled. Acked

Re: [kvm-unit-tests PATCH v9 07/31] scripts: allow machine option to be specified in unittests.cfg

2024-05-07 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: This allows different machines with different requirements to be supported by run_tests.sh, similarly to how different accelerators are handled. Acked-by: Thomas Huth Acked-by: Andrew Jones Signed-off-by: Nicholas Piggin --- docs/unittests.txt

Re: [kvm-unit-tests PATCH v9 17/31] powerpc: Add cpu_relax

2024-05-07 Thread Thomas Huth
++-- 2 files changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v9 12/31] powerpc: general interrupt tests

2024-05-07 Thread Thomas Huth
| 3 + 7 files changed, 467 insertions(+), 1 deletion(-) create mode 100644 powerpc/interrupts.c Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH v9 03/31] powerpc: Mark known failing tests as kfail

2024-05-07 Thread Thomas Huth
On 07/05/2024 06.07, Nicholas Piggin wrote: On Mon May 6, 2024 at 5:37 PM AEST, Thomas Huth wrote: On 04/05/2024 14.28, Nicholas Piggin wrote: Mark the failing h_cede_tm and spapr_vpa tests as kfail. Signed-off-by: Nicholas Piggin --- powerpc/spapr_vpa.c | 3 ++- powerpc/tm.c| 3

Re: [kvm-unit-tests PATCH v9 02/31] report: Add known failure reporting option

2024-05-06 Thread Thomas Huth
On 06/05/2024 10.01, Andrew Jones wrote: On Mon, May 06, 2024 at 09:25:37AM GMT, Thomas Huth wrote: On 04/05/2024 14.28, Nicholas Piggin wrote: There are times we would like to test a function that is known to fail in some conditions due to a bug in implementation (QEMU, KVM, or even hardware

Re: [kvm-unit-tests PATCH v9 03/31] powerpc: Mark known failing tests as kfail

2024-05-06 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: Mark the failing h_cede_tm and spapr_vpa tests as kfail. Signed-off-by: Nicholas Piggin --- powerpc/spapr_vpa.c | 3 ++- powerpc/tm.c| 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/powerpc/spapr_vpa.c

Re: [kvm-unit-tests PATCH v9 02/31] report: Add known failure reporting option

2024-05-06 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: There are times we would like to test a function that is known to fail in some conditions due to a bug in implementation (QEMU, KVM, or even hardware). It would be nice to count these as known failures and not report a summary failure. xfail is not

Re: [kvm-unit-tests PATCH v9 01/31] doc: update unittests doc

2024-05-06 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: This adds a few minor fixes. Signed-off-by: Nicholas Piggin --- docs/unittests.txt | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/unittests.txt b/docs/unittests.txt index 3192a60ec..7cf2c55ad 100644 ---

Re: [kvm-unit-tests PATCH v8 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-04-16 Thread Thomas Huth
On 16/04/2024 09.55, Thomas Huth wrote: On 16/04/2024 09.18, Thomas Huth wrote: On 11/04/2024 21.22, Thomas Huth wrote: On 08/04/2024 18.06, Nico Boehr wrote: Quoting Nicholas Piggin (2024-04-05 10:35:07) The migration harness is complicated and easy to break so CI will be helpful. Signed

Re: [kvm-unit-tests PATCH v8 11/35] powerpc/sprs: Specify SPRs with data rather than code

2024-04-16 Thread Thomas Huth
not being used at the moment for completeness, but also the code might one day be reused for a hypervisor-privileged test. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/reg.h | 2 + powerpc/sprs.c| 647 +- 2 files changed

Re: [kvm-unit-tests PATCH v8 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-04-16 Thread Thomas Huth
On 16/04/2024 09.18, Thomas Huth wrote: On 11/04/2024 21.22, Thomas Huth wrote: On 08/04/2024 18.06, Nico Boehr wrote: Quoting Nicholas Piggin (2024-04-05 10:35:07) The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin ---   .gitlab

Re: [kvm-unit-tests PATCH v8 10/35] powerpc: interrupt stack backtracing

2024-04-16 Thread Thomas Huth
at the return location of the exception handler call, so the unwinder can recognize the initial interrupt frame. The additional cstart entry-frame is no longer required because the unwinder now looks for frame == 0 as well as address == 0. Signed-off-by: Nicholas Piggin --- Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH v8 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-04-16 Thread Thomas Huth
On 11/04/2024 21.22, Thomas Huth wrote: On 08/04/2024 18.06, Nico Boehr wrote: Quoting Nicholas Piggin (2024-04-05 10:35:07) The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin ---   .gitlab-ci.yml  | 32

Re: [kvm-unit-tests PATCH v8 09/35] powerpc: Fix stack backtrace termination

2024-04-16 Thread Thomas Huth
-by: Nicholas Piggin --- powerpc/cstart64.S | 15 +++ 1 file changed, 15 insertions(+) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v8 05/35] arch-run: Add a "continuous" migration option for tests

2024-04-15 Thread Thomas Huth
++ scripts/arch-run.bash | 55 - 4 files changed, 82 insertions(+), 10 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v8 03/35] migration: Add a migrate_skip command

2024-04-15 Thread Thomas Huth
On 16/04/2024 05.22, Nicholas Piggin wrote: On Tue Apr 9, 2024 at 1:59 AM AEST, Nico Boehr wrote: Quoting Nicholas Piggin (2024-04-05 10:35:04) [...] diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash index 39419d4e2..4a1aab48d 100644 --- a/scripts/arch-run.bash +++

Re: [kvm-unit-tests PATCH v8 05/35] arch-run: Add a "continuous" migration option for tests

2024-04-15 Thread Thomas Huth
++ scripts/arch-run.bash | 55 - 4 files changed, 82 insertions(+), 10 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v8 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-04-11 Thread Thomas Huth
On 08/04/2024 18.06, Nico Boehr wrote: Quoting Nicholas Piggin (2024-04-05 10:35:07) The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml | 32 +++- s390x/unittests.cfg | 8

Re: [kvm-unit-tests PATCH v7 07/35] common: add memory dirtying vs migration test

2024-03-28 Thread Thomas Huth
ec); +} + +int main(int argc, char **argv) +{ + void *mem = malloc(NR_PAGES*PAGE_SIZE); Use alloc_pages(5) instead ? Or add at least some white spaces around "*". Apart from that this patch looks sane to me, so with that line fixed: Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v7 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-03-25 Thread Thomas Huth
On 19/03/2024 08.58, Nicholas Piggin wrote: The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml | 18 +++--- s390x/unittests.cfg | 8 2 files changed, 19 insertions(+), 7 deletions(-)

Re: [kvm-unit-tests PATCH v7 01/35] arch-run: Add functions to help handle migration directives from test

2024-03-25 Thread Thomas Huth
insertions(+), 5 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 03/32] powerpc: Fix stack backtrace termination

2024-03-04 Thread Thomas Huth
On 05/03/2024 07.29, Nicholas Piggin wrote: On Tue Feb 27, 2024 at 6:50 PM AEST, Thomas Huth wrote: On 26/02/2024 11.11, Nicholas Piggin wrote: ... /* save DTB pointer */ - std r3, 56(r1) + SAVE_GPR(3,r1) Isn't SAVE_GPR rather meant for the interrupt frame

Re: [kvm-unit-tests PATCH 7/7] common: add memory dirtying vs migration test

2024-03-04 Thread Thomas Huth
On 05/03/2024 03.50, Nicholas Piggin wrote: On Mon Mar 4, 2024 at 4:22 PM AEST, Thomas Huth wrote: On 26/02/2024 10.38, Nicholas Piggin wrote: This test stores to a bunch of pages and verifies previous stores, while being continually migrated. This can fail due to a QEMU TCG physical memory

Re: [kvm-unit-tests PATCH 6/7] gitlab-ci: Run migration selftest on s390x and powerpc

2024-03-04 Thread Thomas Huth
On 05/03/2024 03.38, Nicholas Piggin wrote: On Sat Mar 2, 2024 at 12:16 AM AEST, Thomas Huth wrote: On 26/02/2024 10.38, Nicholas Piggin wrote: The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml | 18

Re: [kvm-unit-tests PATCH 14/32] powerpc: general interrupt tests

2024-03-04 Thread Thomas Huth
On 05/03/2024 03.19, Nicholas Piggin wrote: On Fri Mar 1, 2024 at 10:41 PM AEST, Thomas Huth wrote: On 26/02/2024 11.12, Nicholas Piggin wrote: Add basic testing of various kinds of interrupts, machine check, page fault, illegal, decrementer, trace, syscall, etc. This has a known failure

Re: [kvm-unit-tests PATCH 14/32] powerpc: general interrupt tests

2024-03-04 Thread Thomas Huth
On 05/03/2024 03.30, Nicholas Piggin wrote: On Fri Mar 1, 2024 at 11:45 PM AEST, Andrew Jones wrote: On Fri, Mar 01, 2024 at 01:41:22PM +0100, Thomas Huth wrote: On 26/02/2024 11.12, Nicholas Piggin wrote: Add basic testing of various kinds of interrupts, machine check, page fault, illegal

Re: [kvm-unit-tests PATCH 7/7] common: add memory dirtying vs migration test

2024-03-03 Thread Thomas Huth
On 26/02/2024 10.38, Nicholas Piggin wrote: This test stores to a bunch of pages and verifies previous stores, while being continually migrated. This can fail due to a QEMU TCG physical memory dirty bitmap bug. Good idea, but could we then please drop "continuous" test from

Re: [kvm-unit-tests PATCH 5/7] arch-run: Add a "continuous" migration option for tests

2024-03-03 Thread Thomas Huth
On 26/02/2024 10.38, Nicholas Piggin wrote: The cooperative migration protocol is very good to control precise pre and post conditions for a migration event. However in some cases its intrusiveness to the test program, can mask problems and make analysis more difficult. For example to stress

Re: [kvm-unit-tests PATCH 2/7] migration: Add a migrate_skip command

2024-03-03 Thread Thomas Huth
| 5 + scripts/arch-run.bash | 41 + 6 files changed, 73 insertions(+), 14 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 6/7] gitlab-ci: Run migration selftest on s390x and powerpc

2024-03-01 Thread Thomas Huth
On 26/02/2024 10.38, Nicholas Piggin wrote: The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml

Re: [kvm-unit-tests PATCH 4/7] powerpc: add asm/time.h header with delay and get_clock_us/ms

2024-03-01 Thread Thomas Huth
100644 lib/powerpc/asm/time.h create mode 100644 lib/ppc64/asm/time.h Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 14/32] powerpc: general interrupt tests

2024-03-01 Thread Thomas Huth
On 01/03/2024 14.45, Andrew Jones wrote: On Fri, Mar 01, 2024 at 01:41:22PM +0100, Thomas Huth wrote: On 26/02/2024 11.12, Nicholas Piggin wrote: Add basic testing of various kinds of interrupts, machine check, page fault, illegal, decrementer, trace, syscall, etc. This has a known failure

Re: [kvm-unit-tests PATCH 3/7] (arm|s390): Use migrate_skip in test cases

2024-03-01 Thread Thomas Huth
--- arm/gic.c | 21 - s390x/migration-cmm.c | 8 s390x/migration-skey.c | 4 +++- s390x/migration.c | 1 + 4 files changed, 20 insertions(+), 14 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 1/7] arch-run: Keep infifo open

2024-03-01 Thread Thomas Huth
fo} - rm ${dst_infifo} I assume it will not get deleted by the trap handler? ... sounds fine to me, so I dare to say: Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 14/32] powerpc: general interrupt tests

2024-03-01 Thread Thomas Huth
On 26/02/2024 11.12, Nicholas Piggin wrote: Add basic testing of various kinds of interrupts, machine check, page fault, illegal, decrementer, trace, syscall, etc. This has a known failure on QEMU TCG pseries machines where MSR[ME] can be incorrectly set to 0. Two questions out of curiosity:

Re: [kvm-unit-tests PATCH 12/32] powerpc: Fix emulator illegal instruction test for powernv

2024-03-01 Thread Thomas Huth
On 26/02/2024 11.11, Nicholas Piggin wrote: Illegal instructions cause 0xe40 (HEAI) interrupts rather than program interrupts. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/processor.h | 1 + lib/powerpc/setup.c | 13 + powerpc/emulator.c

Re: [kvm-unit-tests PATCH 08/32] powerpc/sprs: Avoid taking PMU interrupts caused by register fuzzing

2024-03-01 Thread Thomas Huth
| 4 powerpc/sprs.c| 17 +++-- 2 files changed, 15 insertions(+), 6 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 07/32] powerpc/sprs: Don't fail changed SPRs that are used by the test harness

2024-03-01 Thread Thomas Huth
mp;& !(after[i] >> 32)) I guess you could also squash this into the previous patch (to avoid problems with bisecting later?) ... Anyway: Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 05/32] powerpc: Cleanup SPR and MSR definitions

2024-03-01 Thread Thomas Huth
changed, 44 insertions(+), 24 deletions(-) create mode 100644 lib/powerpc/asm/reg.h create mode 100644 lib/ppc64/asm/reg.h Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 04/32] powerpc: interrupt stack backtracing

2024-03-01 Thread Thomas Huth
On 26/02/2024 11.11, Nicholas Piggin wrote: Add support for backtracing across interrupt stacks, and add interrupt frame backtrace for unhandled interrupts. Signed-off-by: Nicholas Piggin --- lib/powerpc/processor.c | 4 ++- lib/ppc64/asm/stack.h | 3 +++ lib/ppc64/stack.c | 55

Re: [kvm-unit-tests PATCH 03/32] powerpc: Fix stack backtrace termination

2024-03-01 Thread Thomas Huth
On 27/02/2024 09.50, Thomas Huth wrote: On 26/02/2024 11.11, Nicholas Piggin wrote: The backtrace handler terminates when it sees a NULL caller address, but the powerpc stack setup does not keep such a NULL caller frame at the start of the stack. This happens to work on pseries because

Re: [kvm-unit-tests PATCH 03/32] powerpc: Fix stack backtrace termination

2024-02-27 Thread Thomas Huth
On 26/02/2024 11.11, Nicholas Piggin wrote: The backtrace handler terminates when it sees a NULL caller address, but the powerpc stack setup does not keep such a NULL caller frame at the start of the stack. This happens to work on pseries because the memory at 0 is mapped and it contains 0 at

Re: [kvm-unit-tests PATCH 02/32] powerpc: Fix pseries getchar return value

2024-02-26 Thread Thomas Huth
volatile (" sc 1 " : "+r"(r3), "+r"(r4), "=r"(r5) : "r"(r3), "r"(r4)); - return r3 == H_SUCCESS && r4 > 0 ? r5 >> 48 : -1; + return r3 == H_SUCCESS && r4 > 0 ? r5 >> 56 : -1; } Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 01/32] powerpc: Fix KVM caps on POWER9 hosts

2024-02-26 Thread Thomas Huth
quot;,cap-ccf-assist=off" fi Since it is needed in both cases, you could also move it out of the if-statement and remove it from the tcg part. Anyway, Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 0/8] Multi-migration support

2024-02-26 Thread Thomas Huth
On 26/02/2024 09.10, Nicholas Piggin wrote: On Fri Feb 23, 2024 at 5:06 PM AEST, Thomas Huth wrote: On 21/02/2024 04.27, Nicholas Piggin wrote: Now that strange arm64 hang is found to be QEMU bug, I'll repost. Since arm64 requires Thomas's uart patch and it is worse affected by the QEMU bug, I

Re: [kvm-unit-tests PATCH v5 0/8] Multi-migration support

2024-02-22 Thread Thomas Huth
On 21/02/2024 04.27, Nicholas Piggin wrote: Now that strange arm64 hang is found to be QEMU bug, I'll repost. Since arm64 requires Thomas's uart patch and it is worse affected by the QEMU bug, I will just not build it on arm. The QEMU bug still affects powerpc (and presumably s390x) but it's not

Re: [kvm-unit-tests PATCH v4 8/8] migration: add a migration selftest

2024-02-18 Thread Thomas Huth
On 17/02/2024 08.19, Nicholas Piggin wrote: On Fri Feb 16, 2024 at 9:15 PM AEST, Thomas Huth wrote: On 09/02/2024 10.11, Nicholas Piggin wrote: Add a selftest for migration support in guest library and test harness code. It performs migrations in a tight loop to irritate races and bugs

Re: [kvm-unit-tests PATCH v4 8/8] migration: add a migration selftest

2024-02-16 Thread Thomas Huth
) Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- arm/Makefile.common | 1 + arm/selftest-migration.c | 1 + arm/unittests.cfg| 6 ++ common/selftest-migration.c | 34 ++ powerpc/Makefile.common | 1 + powerpc

Re: [kvm-unit-tests PATCH v4 8/8] migration: add a migration selftest

2024-02-16 Thread Thomas Huth
) Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- arm/Makefile.common | 1 + arm/selftest-migration.c | 1 + arm/unittests.cfg| 6 ++ Hi Nicholas, I just gave the patches a try, but the arm test seems to fail for me: Only the first getchar() seems

Re: [kvm-unit-tests PATCH v4 6/8] migration: Add quiet migration support

2024-02-09 Thread Thomas Huth
+++ lib/migrate.h | 1 + scripts/arch-run.bash | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v4 4/8] migration: Support multiple migrations

2024-02-09 Thread Thomas Huth
() one or more times. Signed-off-by: Nicholas Piggin --- lib/migrate.c | 8 ++-- lib/migrate.h | 1 + scripts/arch-run.bash | 86 --- 3 files changed, 77 insertions(+), 18 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v4 2/8] arch-run: Clean up initrd cleanup

2024-02-09 Thread Thomas Huth
_UNIT_TESTS_ENV" ] && export KVM_UNIT_TESTS_ENV_OLD="$KVM_UNIT_TESTS_ENV" export KVM_UNIT_TESTS_ENV=$(mktemp) env_params Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v3 4/8] migration: Support multiple migrations

2024-02-09 Thread Thomas Huth
On 09/02/2024 09.39, Nicholas Piggin wrote: On Fri Feb 9, 2024 at 6:19 PM AEST, Thomas Huth wrote: On 09/02/2024 08.01, Nicholas Piggin wrote: Support multiple migrations by flipping dest file/socket variables to source after the migration is complete, ready to start again. A new destination

Re: [kvm-unit-tests PATCH v3 8/8] migration: add a migration selftest

2024-02-09 Thread Thomas Huth
4 Please swap the last two lines! # Test PCI emulation [pci-test] file = pci-test.flat With the nits fixed: Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v3 7/8] Add common/ directory for architecture-independent tests

2024-02-09 Thread Thomas Huth
wed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v3 5/8] arch-run: rename migration variables

2024-02-09 Thread Thomas Huth
+- 1 file changed, 58 insertions(+), 57 deletions(-) Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH v3 4/8] migration: Support multiple migrations

2024-02-09 Thread Thomas Huth
On 09/02/2024 08.01, Nicholas Piggin wrote: Support multiple migrations by flipping dest file/socket variables to source after the migration is complete, ready to start again. A new destination is created if the test outputs the migrate line again. Test cases may now switch to calling migrate()

Re: [kvm-unit-tests PATCH v3 6/8] migration: Add quiet migration support

2024-02-09 Thread Thomas Huth
On 09/02/2024 08.01, Nicholas Piggin wrote: Console output required to support migration becomes quite noisy when doing lots of migrations. Provide a migrate_quiet() call that suppresses console output and doesn't log a message. Signed-off-by: Nicholas Piggin --- lib/migrate.c | 12

Re: [kvm-unit-tests PATCH v3 3/8] migration: use a more robust way to wait for background job

2024-02-08 Thread Thomas Huth
while ! [ -S ${migsock} ] ; do sleep 0.1 ; done + while ! [ -S ${qmp2} ] ; do sleep 0.1 ; done + qmp ${qmp1} '"migrate", "arguments": { "uri": "unix:'${migsock}'" }' > ${qmpout1} # Wait for the migration to complete Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v3 2/8] arch-run: Clean up initrd cleanup

2024-02-08 Thread Thomas Huth
On 09/02/2024 08.01, Nicholas Piggin wrote: Rather than put a big script into the trap handler, have it call a function. Signed-off-by: Nicholas Piggin --- scripts/arch-run.bash | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/arch-run.bash

Re: [kvm-unit-tests PATCH v3 1/8] arch-run: Fix TRAP handler recursion to remove temporary files properly

2024-02-08 Thread Thomas Huth
, and expands the name variables at trap-time rather than install-time, which closes the small race between creation trap handler install. Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- scripts/arch-run.bash | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

Re: [kvm-unit-tests PATCH v2 2/9] arch-run: Clean up temporary files properly

2024-02-06 Thread Thomas Huth
RETURN EXIT # start VM stopped so we don't miss any events eval "$@" -chardev socket,id=mon1,path=${qmp},server=on,wait=off \ So the point is that the "EXIT" trap wasn't executed without the "trap - TERM" in the other trap? ... ok, then your patch certainly makes sense. Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v2 3/9] arch-run: Clean up initrd cleanup

2024-02-05 Thread Thomas Huth
On 02/02/2024 07.57, Nicholas Piggin wrote: Rather than put a big script into the trap handler, have it call a function. Signed-off-by: Nicholas Piggin --- scripts/arch-run.bash | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/arch-run.bash

Re: [kvm-unit-tests PATCH v2 1/9] (arm|powerpc|s390x): Makefile: Fix .aux.o generation

2024-02-05 Thread Thomas Huth
On 02/02/2024 10.30, Andrew Jones wrote: On Fri, Feb 02, 2024 at 04:57:32PM +1000, Nicholas Piggin wrote: Using all prerequisites for the source file results in the build dying on the second time around with: gcc: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files

Re: [kvm-unit-tests PATCH v5 29/29] powerpc: Add timebase tests

2023-12-19 Thread Thomas Huth
a/powerpc/timebase.c b/powerpc/timebase.c new file mode 100644 index ..4d80ea09 --- /dev/null +++ b/powerpc/timebase.c @@ -0,0 +1,328 @@ +/* + * Test Timebase + * + * Copyright 2017 Thomas Huth, Red Hat Inc. No, not really. Please update ;-) Thomas

Re: [kvm-unit-tests PATCH v5 25/29] powerpc: Add rtas stop-self support

2023-12-19 Thread Thomas Huth
printf("RTAS stop-self returnd %d\n", ret); s/returnd/returned/ +} With the typo fixed: Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 24/29] powerpc: interrupt tests

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Add basic testing of various kinds of interrupts, machine check, page fault, illegal, decrementer, trace, syscall, etc. This has a known failure on QEMU TCG pseries machines where MSR[ME] can be incorrectly set to 0. Signed-off-by: Nicholas Piggin

Re: [kvm-unit-tests PATCH v5 22/29] powerpc: Fix emulator illegal instruction test for powernv

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Illegal instructions cause 0xe40 (HEAI) interrupts rather than program interrupts. Signed-off-by: Nicholas Piggin --- powerpc/emulator.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 20/29] scripts: Accommodate powerpc powernv machine differences

2023-12-19 Thread Thomas Huth
must tolerate case differences in kernel load error message. Signed-off-by: Nicholas Piggin --- scripts/runtime.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 19/29] scripts: allow machine option to be specified in unittests.cfg

2023-12-19 Thread Thomas Huth
2 files changed, 18 insertions(+), 6 deletions(-) Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 18/29] powerpc: Fix stack backtrace termination

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: The backtrace handler terminates when it sees a NULL caller address, but the powerpc stack setup does not keep such a NULL caller frame at the start of the stack. This happens to work on pseries because the memory at 0 is mapped and it contains 0 at

Re: [kvm-unit-tests PATCH v5 16/29] powerpc: Set .got section alignment to 256 bytes

2023-12-19 Thread Thomas Huth
. += 64K; Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 14/29] powerpc: Expand exception handler vector granularity

2023-12-19 Thread Thomas Huth
--- lib/powerpc/processor.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 13/29] powerpc: Make interrupt handler error more readable

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Installing the same handler twice reports a shifted trap vector address which is hard to decipher. Print the unshifed address. Signed-off-by: Nicholas Piggin --- lib/powerpc/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [kvm-unit-tests PATCH v5 12/29] powerpc/sprs: Avoid taking async interrupts caused by register fuzzing

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Storing certain values in some registers can cause asynchronous interrupts that can crash the test case, for example decrementer or PMU interrupts. Change the msleep to mdelay which does not enable MSR[EE] and so avoids the problem. This allows

Re: [kvm-unit-tests PATCH v5 11/29] powerpc/sprs: Don't fail changed SPRs that are used by the test harness

2023-12-19 Thread Thomas Huth
I guess you could even squash this into the previous patch. Anyway: Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 10/29] powerpc/sprs: Specify SPRs with data rather than code

2023-12-18 Thread Thomas Huth
not being used at the moment for completeness, but also the code might one day be reused for a hypervisor-privileged test. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- powerpc/sprs.c | 643 ++--- 1 file changed, 450 insertions(+), 193 deletions

Re: [kvm-unit-tests PATCH v5 09/29] powerpc: Fix interrupt stack alignment

2023-12-18 Thread Thomas Huth
insertions(+) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 08/29] powerpc: Require KVM for the TM test

2023-12-18 Thread Thomas Huth
..e71140aa 100644 --- a/powerpc/unittests.cfg +++ b/powerpc/unittests.cfg @@ -65,6 +65,7 @@ file = emulator.elf [h_cede_tm] file = tm.elf +accel = kvm smp = 2,threads=2 extra_params = -machine cap-htm=on -append "h_cede_tm" groups = h_cede_tm Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v5 07/29] powerpc: Add a migration stress tester

2023-12-18 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: This performs 1000 migrations a tight loop to flush out simple issues in the multiple-migration code. Signed-off-by: Nicholas Piggin --- powerpc/Makefile.common | 1 + powerpc/migrate.c | 64 + 2

Re: [kvm-unit-tests PATCH v5 06/29] powerpc: Quiet QEMU TCG pseries capability warnings

2023-12-18 Thread Thomas Huth
fixed in QEMU instead (e.g. by providing a different CPU model for TCG mode). Anyway, for the time being: Reviewed-by: Thomas Huth

Re: [PATCH 18/26] KVM: s390: Stop adding virt/kvm to the arch include path

2023-09-18 Thread Thomas Huth
include $(srctree)/virt/kvm/Makefile.kvm -ccflags-y := -Ivirt/kvm -Iarch/s390/kvm +ccflags-y := -Iarch/s390/kvm kvm-y += kvm-s390.o intercept.o interrupt.o priv.o sigp.o kvm-y += diag.o gaccess.o guestdbg.o vsie.o pv.o Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 2/2] Link with "-z noexecstack" to avoid warning from newer versions of ld

2023-08-14 Thread Thomas Huth
On 27/06/2023 00.34, Sean Christopherson wrote: On Fri, Jun 23, 2023, Thomas Huth wrote: On 23/06/2023 16.24, Sean Christopherson wrote: On Fri, Jun 23, 2023, Thomas Huth wrote: Newer versions of ld (from binutils 2.40) complain on s390x and x86: ld: warning: s390x/cpu.o: missing

Re: [kvm-unit-tests v4 00/12] powerpc: updates, P10, PNV support

2023-07-03 Thread Thomas Huth
On 08/06/2023 09.58, Nicholas Piggin wrote: Posting again, a couple of patches were merged and accounted for review comments from last time. Sorry for not being very responsive ... it's been a busy month. Anyway, I've now merged the first 5 patches and the VPA test since they look fine to

Re: [kvm-unit-tests v4 03/12] powerpc: Abstract H_CEDE calls into a sleep functions

2023-07-03 Thread Thomas Huth
On 08/06/2023 09.58, Nicholas Piggin wrote: This consolidates several implementations, and it no longer leaves MSR[EE] enabled after the decrementer interrupt is handled, but rather disables it on return. The handler no longer allows a continuous ticking, but rather dec has to be re-armed and

Re: [kvm-unit-tests PATCH 2/2] Link with "-z noexecstack" to avoid warning from newer versions of ld

2023-06-23 Thread Thomas Huth
On 23/06/2023 16.24, Sean Christopherson wrote: On Fri, Jun 23, 2023, Thomas Huth wrote: Newer versions of ld (from binutils 2.40) complain on s390x and x86: ld: warning: s390x/cpu.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour

[kvm-unit-tests PATCH 2/2] Link with "-z noexecstack" to avoid warning from newer versions of ld

2023-06-23 Thread Thomas Huth
these warnings by using "-z noexecstack" for linking (which should not have any real influence on the kvm-unit-tests since the information from the ELF header is not used here anyway, so it's just cosmetics). Signed-off-by: Thomas Huth --- Makefile | 2 +- 1 file changed, 1 insertion(+),

[kvm-unit-tests PATCH 1/2] Rework the common LDFLAGS to become more useful again

2023-06-23 Thread Thomas Huth
ditionally to the linker. Signed-off-by: Thomas Huth --- Makefile| 2 +- arm/Makefile.common | 2 +- powerpc/Makefile.common | 2 +- s390x/Makefile | 2 +- x86/Makefile.common | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Make

[kvm-unit-tests PATCH 0/2] Rework LDFLAGS and link with noexecstack

2023-06-23 Thread Thomas Huth
t-tests, I had to discover that the common LDFLAGS are hardly used anywhere, so the first patch cleans up that problem first before adding the new flag in the second patch. Thomas Huth (2): Rework the common LDFLAGS to become more useful again Link with "-z noexecstack" to avoi

Re: [kvm-unit-tests v4 02/12] powerpc: Add some checking to exception handler install

2023-06-21 Thread Thomas Huth
xception handler installed twice %#x\n", trap); + abort(); } + handlers[trap].func = func; + handlers[trap].data = data; } void do_handle_exception(struct pt_regs *regs) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests v4 01/12] powerpc: Report instruction address and MSR in unhandled exception error

2023-06-21 Thread Thomas Huth
On 08/06/2023 09.58, Nicholas Piggin wrote: Signed-off-by: Nicholas Piggin --- Since v3: - New patch lib/powerpc/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/powerpc/processor.c b/lib/powerpc/processor.c index ec85b9d8..05b4b04f 100644 ---

Re: [PATCH] KVM: PPC: remove unneeded variable

2023-06-21 Thread Thomas Huth
  return r; +    /* Indicate we want to get back into the guest */ +    return 1;  }  /* MMU Notifiers */ Please make sure to CC: linuxppc-dev@lists.ozlabs.org when sending patches for KVM on ppc. Reviewed-by: Thomas Huth

Re: [kvm-unit-tests v3 11/13] powerpc: Discover runtime load address dynamically

2023-04-04 Thread Thomas Huth
the address With s/addreses/addresses/ : Acked-by: Thomas Huth

Re: [kvm-unit-tests v3 10/13] powerpc: Add support for more interrupts including HV interrupts

2023-04-04 Thread Thomas Huth
/ HSRR type interrupts which will be used in a later change. Signed-off-by: Nicholas Piggin --- powerpc/cstart64.S | 79 ++ 1 file changed, 65 insertions(+), 14 deletions(-) Acked-by: Thomas Huth

Re: [kvm-unit-tests v3 09/13] powerpc: Expand exception handler vector granularity

2023-04-04 Thread Thomas Huth
On 27/03/2023 14.45, Nicholas Piggin wrote: Exception handlers are currently indexed in units of 0x100, but powerpc can have vectors that are aligned to as little as 0x20 bytes. Increase granularity of the handler functions before adding support for thse vectors. s/thse/those/ Thomas

Re: [kvm-unit-tests v3 08/13] powerpc/spapr_vpa: Add basic VPA tests

2023-04-04 Thread Thomas Huth
On 27/03/2023 14.45, Nicholas Piggin wrote: The VPA is an optional memory structure shared between the hypervisor and operating system, defined by PAPR. This test defines the structure and adds registration, deregistration, and a few simple sanity tests. [Thanks to Thomas Huth for suggesting

Re: [kvm-unit-tests v3 07/13] powerpc/sprs: Specify SPRs with data rather than code

2023-04-04 Thread Thomas Huth
bugs which really motivated me to improve the SPR coverage. --- Since v2: - Merged with "Indirect SPR accessor functions" patch. powerpc/sprs.c | 643 ++--- 1 file changed, 450 insertions(+), 193 deletions(-) Acked-by: Thomas Huth

  1   2   3   >