Re: [PATCH 2/2] asm-generic: add an optional pfn_valid check to pfn_valid

2024-10-14 Thread Thomas Huth
(phys)pfn_to_page(PHYS_PFN(phys)) #endif /* __ASSEMBLY__ */ With the typo fixed: Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v2 2/4] Makefile: Prepare for clang EFI builds

2024-09-04 Thread Thomas Huth
tdlib endif Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 1/3] riscv: Drop mstrict-align

2024-09-03 Thread Thomas Huth
AGS += -mstrict-align +#CFLAGS += -mstrict-align CFLAGS += -std=gnu99 CFLAGS += -ffreestanding CFLAGS += -O2 Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH 3/3] riscv: gitlab-ci: Add clang build tests

2024-09-03 Thread Thomas Huth
1 file changed, 28 insertions(+) Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH 2/3] configure: Support cross compiling with clang

2024-09-03 Thread Thomas Huth
1 file changed, 8 insertions(+), 3 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH] build: retain intermediate .aux.o targets

2024-07-26 Thread Thomas Huth
On 26/07/2024 06.15, Nicholas Piggin wrote: On Fri Jun 14, 2024 at 6:38 PM AEST, Nicholas Piggin wrote: On Fri Jun 14, 2024 at 11:08 AM AEST, Segher Boessenkool wrote: On Fri, Jun 14, 2024 at 10:43:39AM +1000, Nicholas Piggin wrote: On Wed Jun 12, 2024 at 6:28 PM AEST, Segher Boessenkool wrote

Re: [kvm-unit-tests PATCH v10 15/15] powerpc/gitlab-ci: Enable more tests with Fedora 40

2024-06-19 Thread Thomas Huth
On 12/06/2024 07.23, Nicholas Piggin wrote: With Fedora 40 (QEMU 8.2), more tests can be enabled. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml| 2 +- powerpc/unittests.cfg | 17 - 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/

Re: [kvm-unit-tests PATCH v10 13/15] powerpc: Add a panic test

2024-06-19 Thread Thomas Huth
| 16 powerpc/run| 2 +- powerpc/selftest.c | 18 -- powerpc/unittests.cfg | 5 + 5 files changed, 39 insertions(+), 3 deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v10 10/15] powerpc: Remove remnants of ppc64 directory and build structure

2024-06-19 Thread Thomas Huth
On 12/06/2024 07.23, Nicholas Piggin wrote: This moves merges ppc64 directories and files into powerpc, and merges the 3 makefiles into one. The configure --arch=powerpc option is aliased to ppc64 for good measure. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- Seems like this

Re: [kvm-unit-tests PATCH v10 14/15] powerpc/gitlab-ci: Upgrade powerpc to Fedora 40

2024-06-19 Thread Thomas Huth
On 12/06/2024 07.23, Nicholas Piggin wrote: QEMU has fixed a number of powerpc test fails in Fedora 40, so upgrade to that image. Other architectures seem to be okay with Fedora 40 except for x86-64, which fails some xsave and realmode tests, so only change powerpc to start with. Signed-off-by:

Re: [kvm-unit-tests PATCH v10 08/15] powerpc: add pmu tests

2024-06-18 Thread Thomas Huth
On 12/06/2024 07.23, Nicholas Piggin wrote: Add some initial PMU testing. - PMC5/6 tests - PMAE / PMI test - BHRB basic tests Signed-off-by: Nicholas Piggin --- ... diff --git a/powerpc/pmu.c b/powerpc/pmu.c new file mode 100644 index 0..bdc45e167 --- /dev/null +++ b/powerpc/pmu.c @@

Re: [kvm-unit-tests PATCH v10 08/15] powerpc: add pmu tests

2024-06-18 Thread Thomas Huth
On 12/06/2024 07.23, Nicholas Piggin wrote: Add some initial PMU testing. - PMC5/6 tests - PMAE / PMI test - BHRB basic tests Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/processor.h | 2 + lib/powerpc/asm/reg.h | 9 + lib/powerpc/asm/setup.h | 1 + lib/powerpc/setup

[PATCH] Documentation: Remove the unused "topology_updates" from kernel-parameters.txt

2024-06-16 Thread Thomas Huth
The "topology_updates" switch has been removed four years ago in commit c30f931e891e ("powerpc/numa: remove ability to enable topology updates"), so let's remove this from the documentation, too. Signed-off-by: Thomas Huth --- Documentation/admin-guide/kernel-paramete

Re: [kvm-unit-tests PATCH v9 31/31] powerpc: gitlab CI update

2024-06-04 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: This adds testing for the powernv machine, and adds a gitlab-ci test group instead of specifying all tests in .gitlab-ci.yml, and adds a few new tests (smp, atomics) that are known to work in CI. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml

Re: [kvm-unit-tests PATCH v9 30/31] powerpc: Add facility to query TCG or KVM host

2024-06-04 Thread Thomas Huth
nged, 41 insertions(+), 11 deletions(-) As mentioned elsewhere, it would be nice to have this earlier in the series so you could use the conditions in the earlier patches already (but if it is too cumbersome to rework, I don't insist on that). Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v9 29/31] powerpc: Remove remnants of ppc64 directory and build structure

2024-06-04 Thread Thomas Huth
nt to see your new mail address here? Apart from that: Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH v9 27/31] powerpc: add pmu tests

2024-06-04 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: Add some initial PMU testing. - PMC5/6 tests - PMAE / PMI test - BHRB basic tests Signed-off-by: Nicholas Piggin --- ... diff --git a/lib/powerpc/setup.c b/lib/powerpc/setup.c index a4ff678ce..8ff4939e2 100644 --- a/lib/powerpc/setup.c +++ b/lib/po

Re: [kvm-unit-tests PATCH v9 26/31] powerpc: add usermode support

2024-06-04 Thread Thomas Huth
() can't be used directly). A usermode privileged instruction interrupt test is added. Signed-off-by: Nicholas Piggin --- Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v9 25/31] powerpc: Add sieve.c common test

2024-06-04 Thread Thomas Huth
mode 12 powerpc/sieve.c Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v9 24/31] common/sieve: Support machines without MMU

2024-06-04 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: Not all powerpc CPUs provide MMU support. Define vm_available() that is true by default but archs can override it. Use this to run VM tests. Cc: Paolo Bonzini Cc: Thomas Huth Cc: k...@vger.kernel.org Reviewed-by: Andrew Jones Signed-off-by

Re: [kvm-unit-tests PATCH v9 23/31] common/sieve: Use vmalloc.h for setup_mmu definition

2024-06-04 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: There is no good reason to put setup_vm in libcflat.h when it's defined in vmalloc.h. Cc: Paolo Bonzini Cc: Thomas Huth Cc: Janosch Frank Cc: Claudio Imbrenda Cc: Nico Böhr Cc: David Hildenbrand Cc: k...@vger.kernel.org Cc: li

Re: [kvm-unit-tests PATCH v9 22/31] powerpc: Add MMU support

2024-06-04 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: Add support for radix MMU, 4kB and 64kB pages. This also adds MMU interrupt test cases, and runs the interrupts test entirely with MMU enabled if it is available (aside from machine check tests). Acked-by: Andrew Jones (configure changes) Signed-off-

Re: [kvm-unit-tests PATCH v9 21/31] powerpc: Add timebase tests

2024-06-03 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: This has a known failure on QEMU TCG machines where the decrementer interrupt is not lowered when the DEC wraps from -ve to +ve. Would it then make sense to mark the test with accel = kvm to avoid the test failure when running with TCG? diff --git

Re: [kvm-unit-tests PATCH v9 20/31] powerpc: Add atomics tests

2024-06-03 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: Signed-off-by: Nicholas Piggin --- Please provide at least a short patch description about what is being tested here! Thanks, Thomas

Re: [kvm-unit-tests PATCH v9 19/31] powerpc: Avoid using larx/stcx. in spinlocks when only one CPU is running

2024-06-03 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: The test harness uses spinlocks if they are implemented with larx/stcx. it can prevent some test scenarios such as testing migration of a reservation. I'm having a hard time to understand that patch description. Maybe you could rephrase it / elaborat

Re: [kvm-unit-tests PATCH v9 18/31] powerpc: Permit ACCEL=tcg,thread=single

2024-06-03 Thread Thomas Huth
deletions(-) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v9 16/31] powerpc: add SMP and IPI support

2024-06-03 Thread Thomas Huth
IPI support. Signed-off-by: Nicholas Piggin I now skimmed through the patch and it looks fine so far: Acked-by: Thomas Huth

Re: [kvm-unit-tests PATCH v9 15/31] powerpc: Enable page alloc operations

2024-06-03 Thread Thomas Huth
On 04/05/2024 14.28, Nicholas Piggin wrote: These will be used for stack allocation for secondary CPUs. Signed-off-by: Nicholas Piggin --- lib/powerpc/setup.c | 8 powerpc/Makefile.common | 1 + 2 files changed, 9 insertions(+) Reviewed-by: Thomas Huth

Re: [kvm-unit-tests PATCH v9 14/31] powerpc: Remove broken SMP exception stack setup

2024-06-03 Thread Thomas Huth
| 16 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Thomas Huth

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 to be

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 b/powerpc/spap

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 the

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 --- a/docs

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
espite 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 fil

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
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
: 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 +++ b/scripts/arch-run.b

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(-) dif

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, no

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 on

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 selftest-migration.

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 tes

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

2024-03-03 Thread Thomas Huth
s.cfg | 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 on

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
} - 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 the

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 th

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

2024-02-26 Thread Thomas Huth
asm 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 Q

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 in the

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 to

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

2024-02-09 Thread Thomas Huth
| 11 +++ 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
[ -f "$KVM_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
rch = arm64 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() o

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
ination has created the incoming and qmp sockets + 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 b/scripts/

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
e creation, 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 deletion

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

2024-02-06 Thread Thomas Huth
2" INT TERM + trap "rm -f ${qmp}" 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 b/scripts/a

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 Th

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

2023-12-19 Thread Thomas Huth
/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
oken, 0, 1, NULL); + 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

  1   2   3   >