-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
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
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-
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
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
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
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
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
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 |
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
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
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 +++
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
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
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
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
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 ++
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
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
--
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
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
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
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
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
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
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
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
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
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 ++--
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
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
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
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
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
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
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
allnoconfig gcc
arc allyesconfig gcc
arc defconfig gcc
arc randconfig-001-20240504 gcc
arc randconfig-002-20240504 gcc
arm allmodconfig gcc
arm
37 matches
Mail list logo