[GIT PULL] Please pull powerpc/linux.git powerpc-6.9-4 tag

2024-05-04 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 6.9: The following changes since commit 210cfef579260ed6c3b700e7baeae51a5e183f43: selftests/powerpc/papr-vpd: Fix missing variable initialization (2024-04-12 14:40:07 +1000) are available in th

Re: [PATCH 0/6] Deduplicate string exposure in sysfs

2024-05-04 Thread Greg Kroah-Hartman
On Sat, May 04, 2024 at 04:31:42PM +0200, Lukas Wunner wrote: > Dear Greg, > > On Sat, Apr 20, 2024 at 10:00:00PM +0200, Lukas Wunner wrote: > > Introduce a generic ->show() callback to expose a string as a device > > attribute in sysfs. Deduplicate various identical callbacks across > > the tree

Re: WARNING: CPU: 1 PID: 1 at net/core/netpoll.c:370 netpoll_send_skb+0x1fc/0x20c at boot when netconsole is enabled (kernel v6.9-rc5, v6.8.7, sungem, PowerMac G4 DP)

2024-05-04 Thread Erhard Furtner
On Mon, 29 Apr 2024 18:36:30 -0700 Jakub Kicinski wrote: > On Sun, 28 Apr 2024 12:53:06 +0200 Erhard Furtner wrote: > > With netconsole enabled I get this "WARNING: CPU: 1 PID: 1 at > > net/core/netpoll.c:370 netpoll_send_skb+0x1fc/0x20c" and "WARNING: > > CPU: 1 PID: 1 at kernel/locking/irqflag-

Re: [PATCH 0/6] Deduplicate string exposure in sysfs

2024-05-04 Thread Lukas Wunner
Dear Greg, On Sat, Apr 20, 2024 at 10:00:00PM +0200, Lukas Wunner wrote: > Introduce a generic ->show() callback to expose a string as a device > attribute in sysfs. Deduplicate various identical callbacks across > the tree. > > Result: Minus 216 LoC, minus 1576 bytes vmlinux size (x86_64 allye

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

2024-05-04 Thread Nicholas Piggin
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| 30 -- powerp

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

2024-05-04 Thread Nicholas Piggin
Use device tree properties to determine whether KVM or TCG is in use. Logically these are not the inverse of one another, because KVM can be used on top of a TCG processor (if TCG is emulating HV mode, or if it provides a nested hypervisor interface with spapr). This can be a problem because some

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

2024-05-04 Thread Nicholas Piggin
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. Signed-off-by: Nicholas Piggin --- MAINTAINERS| 1 - configure

[kvm-unit-tests PATCH v9 28/31] configure: Make arch_libdir a first-class entity

2024-05-04 Thread Nicholas Piggin
arch_libdir was brought in to improve the heuristic determination of the lib/ directory based on arch and testdir names, but it did not entirely clean that mess up. Remove the arch_libdir->arch->testdir heuristic and just require everybody sets arch_libdir correctly. Fail if the lib/arch or lib/ar

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

2024-05-04 Thread Nicholas Piggin
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.c | 23 ++ powerpc/Makefile.common |

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

2024-05-04 Thread Nicholas Piggin
The biggest difficulty for user mode is MMU support. Otherwise it is a simple matter of setting and clearing MSR[PR] with rfid and sc respectively. Some common harness operations will fail in usermode, so some workarounds are reqiured (e.g., puts() can't be used directly). A usermode privileged i

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

2024-05-04 Thread Nicholas Piggin
Now that sieve copes with lack of MMU support, it can be run by powerpc. Signed-off-by: Nicholas Piggin --- powerpc/Makefile.common | 1 + powerpc/sieve.c | 1 + powerpc/unittests.cfg | 3 +++ 3 files changed, 5 insertions(+) create mode 12 powerpc/sieve.c diff --git a/powerpc/Ma

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

2024-05-04 Thread Nicholas Piggin
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: Nicholas Piggin --- common/sieve.c | 14 +++

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

2024-05-04 Thread Nicholas Piggin
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: linux-s...@vger.kernel.org Acked-by: Andrew Jones Signed-off-by: Ni

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

2024-05-04 Thread Nicholas Piggin
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-by: Nicholas Piggin --- configure

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

2024-05-04 Thread Nicholas Piggin
This has a known failure on QEMU TCG machines where the decrementer interrupt is not lowered when the DEC wraps from -ve to +ve. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/reg.h | 1 + powerpc/Makefile.common | 1 + powerpc/timebase.c | 331

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

2024-05-04 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- powerpc/Makefile.common | 1 + powerpc/atomics.c | 375 powerpc/unittests.cfg | 9 + 3 files changed, 385 insertions(+) create mode 100644 powerpc/atomics.c diff --git a/powerpc/Makefile.common b/powerpc/Mak

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

2024-05-04 Thread Nicholas Piggin
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. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/smp.h| 1 + lib/powerpc/smp.c| 5 + lib/powerpc/spinlock.c | 29 ++

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

2024-05-04 Thread Nicholas Piggin
Modify run script to permit single vs mttcg threading, add a thread=single smp case to unittests.cfg. Signed-off-by: Nicholas Piggin --- powerpc/run | 4 ++-- powerpc/unittests.cfg | 6 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/powerpc/run b/powerpc/run inde

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

2024-05-04 Thread Nicholas Piggin
powerpc SMP support is very primitive and does not set up a first-class runtime environment for secondary CPUs. This reworks SMP support, and provides a complete C and harness environment for the secondaries, including interrupt handling, as well as IPI support. Signed-off-by: Nicholas Piggin --

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

2024-05-04 Thread Nicholas Piggin
Add a cpu_relax variant that uses SMT priority nop instructions like Linux. This was split out of the SMP patch because it affects the sprs test case. Signed-off-by: Nicholas Piggin --- lib/ppc64/asm/barrier.h | 1 + powerpc/sprs.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions

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

2024-05-04 Thread Nicholas Piggin
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(+) diff --git a/lib/powerpc/setup.c b/lib/powerpc/setup.c index 58be93f08..73ca2f931 100644 --- a/lib

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

2024-05-04 Thread Nicholas Piggin
The exception stack setup does not work correctly for SMP, because it is the boot processor that calls cpu_set() which sets SPRG2 to the exception stack, not the target CPU itself. So secondaries never got their SPRG2 set to a valid exception stack. Remove the SMP code and just set an exception st

[kvm-unit-tests PATCH v9 13/31] powerpc: Add rtas stop-self support

2024-05-04 Thread Nicholas Piggin
In preparation for improved SMP support, add stop-self support to the harness. This is non-trivial because it requires an unlocked rtas call: a CPU can't be holding a spin lock when it goes offline or it will deadlock other CPUs. rtas permits stop-self to be called without serialising all other rta

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

2024-05-04 Thread Nicholas Piggin
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 --- lib/powerpc/asm/processor.h | 4 + lib/po

[kvm-unit-tests PATCH v9 11/31] powerpc/sprs: Test hypervisor registers on powernv machine

2024-05-04 Thread Nicholas Piggin
This enables HV privilege registers to be tested with the powernv machine. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- powerpc/sprs.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/powerpc/sprs.c b/powerpc/sprs.c index c25dac1

[kvm-unit-tests PATCH v9 10/31] powerpc: Fix emulator illegal instruction test for powernv

2024-05-04 Thread Nicholas Piggin
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 | 16 3 files changed, 30

[kvm-unit-tests PATCH v9 09/31] powerpc: Support powernv machine with QEMU TCG

2024-05-04 Thread Nicholas Piggin
Add support for QEMU's powernv machine. This uses standard firmware (skiboot) rather than a minimal firmware shim. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/processor.h | 23 +++ lib/powerpc/asm/reg.h | 4 ++ lib/powerpc/hcall.c | 4

[kvm-unit-tests PATCH v9 08/31] scripts: Accommodate powerpc powernv machine differences

2024-05-04 Thread Nicholas Piggin
The QEMU powerpc powernv machine has minor differences that must be accommodated for in output parsing: - Summary parsing must search more lines of output for the summary line, to accommodate OPAL message on shutdown. - Premature failure testing must tolerate case differences in kernel load er

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

2024-05-04 Thread Nicholas Piggin
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 | 7 +++ scripts/common.bash | 8 ++--

[kvm-unit-tests PATCH v9 06/31] powerpc/sprs: Avoid taking PMU interrupts caused by register fuzzing

2024-05-04 Thread Nicholas Piggin
Storing certain values in MMCR0 can cause PMU interrupts when msleep enables MSR[EE], and this crashes the test. Freeze the PMU counters and clear any PMU exception before calling msleep. Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/reg.h | 4 powerpc/sprs.c

[kvm-unit-tests PATCH v9 05/31] powerpc/sprs: Specify SPRs with data rather than code

2024-05-04 Thread Nicholas Piggin
A significant rework that builds an array of 'struct spr', where each element describes an SPR. This makes various metadata about the SPR like name and access type easier to carry and use. Hypervisor privileged registers are described despite not being used at the moment for completeness, but also

[kvm-unit-tests PATCH v9 04/31] powerpc: Update unittests for latest QEMU version

2024-05-04 Thread Nicholas Piggin
The latest QEMU fixes some known bugs in migration which allow some migration tests to be re-enabled on tcg. Signed-off-by: Nicholas Piggin --- powerpc/unittests.cfg | 5 - 1 file changed, 5 deletions(-) diff --git a/powerpc/unittests.cfg b/powerpc/unittests.cfg index 432c81d58..699736926 1

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

2024-05-04 Thread Nicholas Piggin
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/spapr_vpa.c index c2075e157..46fa0485c 100644 --- a/p

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

2024-05-04 Thread Nicholas Piggin
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 same thing, xfail means failure is required a

[kvm-unit-tests PATCH v9 00/31] powerpc improvements

2024-05-04 Thread Nicholas Piggin
Tree here https://gitlab.com/npiggin/kvm-unit-tests/-/tree/powerpc Since v8: - Migration improvements merged and out of series. - Rebased on upstream. - Did some more splitting of patches to make review easier. - Added a new kfail option for known failures because I add a bunch and I don't want

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

2024-05-04 Thread Nicholas Piggin
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/unittests.txt +++ b/docs/unittests.txt @@ -15,8

[powerpc:next-test] BUILD SUCCESS 72a67796ed7cc697e55e53d68eba4c87c5ae04ee

2024-05-04 Thread kernel test robot
allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20240504 gcc arc randconfig-002-20240504 gcc arm allmodconfig gcc arm