On Wed Jun 5, 2024 at 11:06 PM AEST, Shivaprasad G Bhat wrote:
> The series fixes the issues exposed by the kvm-unit-tests[1]
> sprs-migration test.
>
> The SDAR, MMCR3 were seen to have some typo/refactoring bugs.
> The first two patches fix them.
>
> The remaining patches take care of
On Wed Jun 5, 2024 at 9:39 PM AEST, Gautam Menghani wrote:
> Doorbell emulation for KVM on PAPR guests is broken as support for DPDES
> was not added in initial patch series [1].
> Add DPDES support and doorbell handling support for V2 API.
Looks good, thanks. So fix for v1 doorbells is coming?
st \
> -nographic \
> -machine pseries,ic-mode=xics -accel kvm
>
> Add doorbell state handling support in the host
> KVM code to fix doorbell emulation.
Reviewed-by: Nicholas Piggin
>
> Fixes: 19d31c5f1157 ("KVM: PPC: Add support for nestedv2 guests&qu
On Wed Jun 5, 2024 at 9:39 PM AEST, Gautam Menghani wrote:
> Add support for using DPDES in the library for using guest state
> buffers. DPDES support is needed for enabling usage of doorbells in a
> L2 KVM on PAPR guest.
>
Reviewed-by: Nicholas Piggin
> Fixes: 6ccbbc33f06a
On Tue Jun 4, 2024 at 11:36 PM AEST, Andrew Jones wrote:
> On Tue, Jun 04, 2024 at 12:49:51PM GMT, Thomas Huth wrote:
> > On 04/05/2024 14.28, Nicholas Piggin wrote:
> > > This moves merges ppc64 directories and files into powerpc, and
> > > merg
On Tue Jun 4, 2024 at 9:01 PM AEST, Thomas Huth wrote:
> 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, at
On Tue Jun 4, 2024 at 8:38 PM AEST, Thomas Huth wrote:
> 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
> &g
On Tue Jun 4, 2024 at 5:30 PM AEST, Thomas Huth wrote:
> 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
On Tue Jun 4, 2024 at 4:12 PM AEST, Thomas Huth wrote:
> 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 mar
On Tue Jun 4, 2024 at 3:29 PM AEST, Thomas Huth wrote:
> 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!
Will do.
Thanks,
Nick
On Tue Jun 4, 2024 at 3:27 PM AEST, Thomas Huth wrote:
> 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.
>
On Mon Jun 3, 2024 at 9:15 PM AEST, Shivaprasad G Bhat wrote:
> The patch adds a one-reg register identifier which can be used to
> read and set the virtual HASHKEYR for the guest during enter/exit
> with KVM_REG_PPC_HASHKEYR. The specific SPR KVM API documentation
> too updated.
>
>
On Mon Jun 3, 2024 at 9:13 PM AEST, Shivaprasad G Bhat wrote:
> The series fixes the issues exposed by the kvm-unit-tests[1]
> sprs-migration test.
>
> The SDAR, MMCR3 were seen to have some typo/refactoring bugs.
> The first two patches fix them.
>
> Though the nestedv2 APIs defined the guest
> + ulong hashkeyr;
> ulong ciabr;
> ulong cfar;
> ulong ppr;
Same comment applies
Reviewed-by: Nicholas Piggin
Thanks,
Nick
> diff --git a/arch/powerpc/kvm/book3s_hv.h b/arch/powerpc/kvm/book3s_hv.h
> index 7b0fd282fe95..c073fdfa7dc4 100644
> --- a/
dexcr;
> ulong ciabr;
> ulong cfar;
> ulong ppr;
Actually I would reorder the patches so you introduce the KVM reg
first, and put this hunk there.
The nested v2 bits look okay. For them,
Reviewed-by: Nicholas Piggin
> diff --git a/arch/powerpc/kvm/book3s
d.
Reviewed-by: Nicholas Piggin
>
> Signed-off-by: Shivaprasad G Bhat
> ---
> Documentation/virt/kvm/api.rst|1 +
> arch/powerpc/include/uapi/asm/kvm.h |1 +
> arch/powerpc/kvm/book3s_hv.c |6 ++
> tools/arch/powerpc/include/uapi/asm/
if the uapi and documentation parts should go in their
own patch in a ppc kvm uapi topic branch? Otherwise looks okay.
Reviewed-by: Nicholas Piggin
>
> Signed-off-by: Shivaprasad G Bhat
> ---
> Documentation/virt/kvm/api.rst|1 +
> arch/powerpc/include/uapi/asm/kvm.h
On Mon Jun 3, 2024 at 7:30 PM AEST, Thomas Huth wrote:
> On 04/05/2024 14.28, Nicholas Piggin wrote:
> > 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
On Mon Jun 3, 2024 at 5:09 PM AEST, Gautam Menghani wrote:
> On Mon, Jun 03, 2024 at 03:42:22PM GMT, Nicholas Piggin wrote:
> > On Wed May 22, 2024 at 6:49 PM AEST, Gautam Menghani wrote:
> > > Doorbell emulation is broken for KVM on PowerVM guests as support for
> &g
On Wed May 22, 2024 at 6:49 PM AEST, Gautam Menghani wrote:
> Doorbell emulation is broken for KVM on PowerVM guests as support for
> DPDES was not added in the initial patch series. Due to this, a KVM on
> PowerVM guest cannot be booted with the XICS interrupt controller as
> doorbells are to be
On Tue May 21, 2024 at 2:43 AM AEST, Christophe Leroy wrote:
>
>
> Le 20/05/2024 à 14:54, Nicholas Piggin a écrit :
> > On Sat May 18, 2024 at 5:00 AM AEST, Christophe Leroy wrote:
> >> On book3s/64, the only user of hugepd is hash in 4k mode.
> >>
> >> Al
On Sat May 18, 2024 at 5:00 AM AEST, Christophe Leroy wrote:
> On book3s/64, the only user of hugepd is hash in 4k mode.
>
> All other setups (hash-64, radix-4, radix-64) use leaf PMD/PUD.
>
> Rework hash-4k to use contiguous PMD and PUD instead.
>
> In that setup there are only two huge page
On Wed May 8, 2024 at 11:36 PM AEST, Thomas Huth wrote:
> 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 Wed May 8, 2024 at 10:36 PM AEST, Michael Ellerman wrote:
> Gautam Menghani writes:
> > PAPR hypervisor has introduced three new counters in the VPA area of
> > LPAR CPUs for KVM L2 guest (see [1] for terminology) observability - 2
> > for context switches from host to guest and vice versa,
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.
> >
s - local_paca->l2_to_l1_cs,
> + l2_runtime_ns -
> local_paca->l2_runtime_agg);
> + local_paca->l1_to_l2_cs = l1_to_l2_ns;
> + local_paca->l2_to_l1_cs = l2_to_l1_ns;
> + local_paca->l2_runtime_agg = l2_runtime_ns;
> +}
So
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 ++-
> > po
On Mon May 6, 2024 at 5:03 PM AEST, Thomas Huth wrote:
> 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 inse
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
incorrectly considered
to be kvm && !tcg.
Use this facility to restrict some of the known test failures to TCG.
Signed-off-by: Nicholas Piggin
---
lib/powerpc/asm/processor.h | 3 +++
lib/powerpc/setup.c | 25 +
powerpc/atomics.c | 2 +-
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
dev
Cc: kvm-ri...@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Reviewed-by: Andrew Jones
Signed-off-by: Nicholas Piggin
---
Makefile | 2 +-
configure | 18 +-
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 5b7998b79..7fe93dfd8
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
instruction interrupt test is added.
Signed-off-by: Nicholas Piggin
---
lib/powerpc/asm/processor.h | 9 +
lib/powerpc/asm/reg.h | 1 +
lib/powerpc/asm/smp.h | 1 +
lib/powerpc/io.c| 7 +++
lib/powerpc/processor.c | 38
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
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
-by: Nicholas Piggin
---
common/sieve.c | 1 +
lib/libcflat.h | 2 --
lib/s390x/io.c | 1 +
lib/s390x/uv.h | 1 +
lib/x86/vm.h | 1 +
s390x/mvpg.c | 1 +
s390x/selftest.c | 1 +
x86/pmu.c | 1 +
x86/pmu_lbr.c | 1 +
x86
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
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
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
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
stack for the boot
processor. Make the stack 64kB while we're here, to match the
size of the regular stack.
Signed-off-by: Nicholas Piggin
---
lib/powerpc/setup.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/powerpc/setup.c b/lib/powerpc/setup.c
index
rtas operations.
Reviewed-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
lib/powerpc/asm/rtas.h | 2 ++
lib/powerpc/rtas.c | 78 +-
2 files changed, 64 insertions(+), 16 deletions(-)
diff --git a/lib/powerpc/asm/rtas.h b/lib/powerpc/asm/rtas.h
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
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
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
error message.
Acked-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
powerpc/unittests.cfg | 1 +
scripts/runtime.bash | 6 --
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/powerpc/unittests.cfg b/powerpc/unittests.cfg
index 699736926..f562de9f4 100644
--- a/powerpc
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
, 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| 650 +-
2 files changed, 460 insertions(+), 192 deletions(-)
diff --git
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
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
and a pass
causes the test to fail. So add kfail for known failures.
Mark the failing ppc64 h_cede_tm and spapr_vpa tests as kfail.
Signed-off-by: Nicholas Piggin
---
lib/libcflat.h | 2 ++
lib/report.c | 33 +
2 files changed, 27 insertions(+), 8 deletions
fails.
Thanks,
Nick
Nicholas Piggin (31):
doc: update unittests doc
report: Add known failure reporting option
powerpc: Mark known failing tests as kfail
powerpc: Update unittests for latest QEMU version
powerpc/sprs: Specify SPRs with data rather than code
powerpc/sprs: Avoid taking
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
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-
On Sat Apr 13, 2024 at 7:48 PM AEST, Michael Ellerman wrote:
> Nicholas Piggin writes:
> > "Fully ordered" atomics (RMW that return a value) are said to have a
> > full barrier before and after the atomic operation. This is implemented
> > as:
> >
> &g
ack atomic ops on cached memory.
[ Remains to be seen if this is always faster when there is other activity
going on, and if it's faster on non-POEWR CPUs or perhaps older ones
like 970 that might not optimise isync so much. ]
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/synch.h |
On Mon Apr 8, 2024 at 3:20 PM AEST, Michael Ellerman wrote:
> Thorsten Leemhuis writes:
> > On 05.04.24 05:20, Michael Ellerman wrote:
> >> "Linux regression tracking (Thorsten Leemhuis)"
> >> writes:
> >>> Hi, Thorsten here, the Linux kernel's regression tracker. Top-posting
> >>> for once, to
This adds testing for the powernv machine, and adds a gitlab-ci test
group instead of specifying all tests in .gitlab-ci.yml.
Signed-off-by: Nicholas Piggin
---
.gitlab-ci.yml| 30 --
powerpc/unittests.cfg | 14 --
2 files changed, 16 insertions
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
dev
Cc: kvm-ri...@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Reviewed-by: Andrew Jones
Signed-off-by: Nicholas Piggin
---
Makefile | 2 +-
configure | 18 +-
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 4f35fffc6..4e0f54543
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
instruction interrupt test is added.
Signed-off-by: Nicholas Piggin
---
lib/powerpc/asm/processor.h | 9 +
lib/powerpc/asm/reg.h | 1 +
lib/powerpc/asm/smp.h | 1 +
lib/powerpc/io.c| 7 +++
lib/powerpc/processor.c | 38
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
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
-by: Nicholas Piggin
---
common/sieve.c | 1 +
lib/libcflat.h | 2 --
lib/s390x/io.c | 1 +
lib/s390x/uv.h | 1 +
lib/x86/vm.h | 1 +
s390x/mvpg.c | 1 +
s390x/selftest.c | 1 +
x86/pmu.c | 1 +
x86/pmu_lbr.c | 1 +
x86
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 | 329
Signed-off-by: Nicholas Piggin
---
powerpc/Makefile.common | 1 +
powerpc/atomics.c | 374
powerpc/unittests.cfg | 9 +
3 files changed, 384 insertions(+)
create mode 100644 powerpc/atomics.c
diff --git a/powerpc/Makefile.common b/powerpc
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
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
stack for the boot
processor. Make the stack 64kB while we're here, to match the
size of the regular stack.
Signed-off-by: Nicholas Piggin
---
lib/powerpc/setup.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/powerpc/setup.c b/lib/powerpc/setup.c
index
rtas operations.
Reviewed-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
lib/powerpc/asm/rtas.h | 2 ++
lib/powerpc/rtas.c | 78 +-
2 files changed, 64 insertions(+), 16 deletions(-)
diff --git a/lib/powerpc/asm/rtas.h b/lib/powerpc/asm/rtas.h
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
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
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
error message.
Acked-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
powerpc/unittests.cfg | 1 +
scripts/runtime.bash | 6 --
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/powerpc/unittests.cfg b/powerpc/unittests.cfg
index 432c81d58..4929e71a1 100644
--- a/powerpc
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 | 6 ++
scripts/common.bash | 8
Consolidate unittests.cfg documentation in one place.
Suggested-by: Andrew Jones
Signed-off-by: Nicholas Piggin
---
arm/unittests.cfg | 26 ++---
docs/unittests.txt| 89 +++
powerpc/unittests.cfg | 25 ++--
riscv/unittests.cfg
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
, 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, 457 insertions(+), 192 deletions(-)
diff --git
, 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
---
lib/powerpc/processor.c | 4 +++-
lib/ppc64/asm/stack.h | 3 +++
lib
if it
were a stack frame. But this is fragile, and does not work with powernv
where address 0 contains firmware instructions.
Use the existing dummy frame on stack as the NULL caller, and create a
new frame on stack for the entry code.
Signed-off-by: Nicholas Piggin
---
powerpc/cstart64.S | 15
KVM does not like to run on POWER9 hosts without cap-ccf-assist=off.
Reviewed-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
powerpc/run | 2 ++
1 file changed, 2 insertions(+)
diff --git a/powerpc/run b/powerpc/run
index e469f1eb3..5cdb94194 100755
--- a/powerpc/run
+++ b/powerpc/run
.
The selftest-migration test time is reduced significantly because
this test
Reviewed-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
common/memory-verify.c | 68 +
common/selftest-migration.c | 8 ++---
powerpc/Makefile.common | 1 +
powerpc/memory-verify.c
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
2 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab
cooperative migration iterations reduced
to avoid increasing test time too much.
Signed-off-by: Nicholas Piggin
---
common/selftest-migration.c | 16 +--
lib/migrate.c | 18
lib/migrate.h | 3 ++
scripts/arch-run.bash | 55
Have tests use the new migrate_skip command in skip paths, rather than
calling migrate_once to prevent harness reporting an error.
s390x/migration.c adds a new command that looks like it was missing
previously.
Reviewed-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
arm/gic.c
a migration.
Reviewed-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
common/selftest-migration.c | 14 -
lib/migrate.c | 19 -
lib/migrate.h | 2 ++
powerpc/unittests.cfg | 6 ++
s390x/unittests.cfg | 5 +
scripts/arch
files and fifos
so it does not have to be removed explicitly.
With this we can let the cat out of the subshell, simplifying the
input pipeline.
Reviewed-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
scripts/arch-run.bash | 12 ++--
1 file changed, 6 insertions(+), 6 deletions
The migration harness will be expanded to deal with more commands
from the test, moving these checks into functions helps keep things
managable.
Reviewed-by: Thomas Huth
Signed-off-by: Nicholas Piggin
---
scripts/arch-run.bash | 20 +++-
1 file changed, 15 insertions(+), 5
/msg00567.html)
Thanks,
Nick
Nicholas Piggin (35):
arch-run: Add functions to help handle migration directives from test
arch-run: Keep infifo open
migration: Add a migrate_skip command
(arm|s390): Use migrate_skip in test cases
arch-run: Add a "continuous" migration option for test
1 - 100 of 6200 matches
Mail list logo