Le 20/03/2024 à 00:26, Jason Gunthorpe a écrit :
> On Tue, Mar 19, 2024 at 11:07:08PM +, Christophe Leroy wrote:
>>
>>
>> Le 18/03/2024 à 17:15, Jason Gunthorpe a écrit :
>>> On Thu, Mar 14, 2024 at 01:11:59PM +, Christophe Leroy wrote:
Le 14/03/2024 à 13:53, Peter Xu a écr
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, and 1 counter
for getting the total time spent inside the KVM guest. Add a tracepoint
that enables read
On Tue, Mar 19, 2024 at 11:07:08PM +, Christophe Leroy wrote:
>
>
> Le 18/03/2024 à 17:15, Jason Gunthorpe a écrit :
> > On Thu, Mar 14, 2024 at 01:11:59PM +, Christophe Leroy wrote:
> >>
> >>
> >> Le 14/03/2024 à 13:53, Peter Xu a écrit :
> >>> On Thu, Mar 14, 2024 at 08:45:34AM +, C
Le 18/03/2024 à 17:15, Jason Gunthorpe a écrit :
> On Thu, Mar 14, 2024 at 01:11:59PM +, Christophe Leroy wrote:
>>
>>
>> Le 14/03/2024 à 13:53, Peter Xu a écrit :
>>> On Thu, Mar 14, 2024 at 08:45:34AM +, Christophe Leroy wrote:
Le 13/03/2024 à 22:47, pet...@redhat.com a é
- Original Message -
> From: "Jason Gunthorpe"
> To: "Shivaprasad G Bhat"
> Cc: "Timothy Pearson" , "Alex Williamson"
> , "linuxppc-dev"
> , "Michael Ellerman" ,
> "npiggin" , "christophe
> leroy" , "aneesh kumar"
> , "naveen n rao"
> , "gbatra" ,
> brk...@linux.vnet.ibm.com, "Alex
On Tue, Mar 12, 2024 at 01:14:20PM -0500, Shivaprasad G Bhat wrote:
> The commit 090bad39b237a ("powerpc/powernv: Add indirect levels to
> it_userspace") which implemented the tce indirect levels
> support for PowerNV ended up removing the single level support
> which existed by default(generic tce
On Mon, Mar 18, 2024 at 10:21:36PM +0800, Baoquan He wrote:
> Currently, in free_area_init_core(), when initialize zone's field, a
> rough value is set to zone->managed_pages. That value is calculated by
> (zone->present_pages - memmap_pages).
>
> In the meantime, add the value to nr_all_pages and
Hi Baoquan,
On Mon, Mar 18, 2024 at 10:21:34PM +0800, Baoquan He wrote:
> This is not needed any more.
I'd swap this and the first patch, so that the first patch would remove
memblock_find_dma_reserve() and it's changelog will explain why it's not
needed and then the second patch will simply drop
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, and 1 counter
for getting the total time spent inside the KVM guest. Add a tracepoint
that enables read
On Tue, Mar 19, 2024 at 12:25:39PM +0800, Muchun Song wrote:
> > @@ -409,14 +409,12 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
> > unsigned long addr,
> >
> > int pmd_huge(pmd_t pmd)
> > {
> > - return !pmd_none(pmd) &&
> > - (pmd_val(pmd) & (_PAGE_VALID|_PAGE_PMD_HUGE)) != _PAGE_
On Tue, 19 Mar 2024 at 10:08, Tobias Huschle wrote:
>
> On 2024-03-18 15:45, Luis Machado wrote:
> > On 3/14/24 13:45, Tobias Huschle wrote:
> >> On Fri, Mar 08, 2024 at 03:11:38PM +, Luis Machado wrote:
> >>> On 2/28/24 16:10, Tobias Huschle wrote:
>
> Questions:
> 1. The kwork
On 2024-03-18 15:45, Luis Machado wrote:
On 3/14/24 13:45, Tobias Huschle wrote:
On Fri, Mar 08, 2024 at 03:11:38PM +, Luis Machado wrote:
On 2/28/24 16:10, Tobias Huschle wrote:
Questions:
1. The kworker getting its negative lag occurs in the following
scenario
- kworker and a cgrou
Audio memory to memory virtual driver use video memory to memory
virtual driver vim2m.c as example. The main difference is
device type is VFL_TYPE_AUDIO and device cap type is V4L2_CAP_AUDIO_M2M.
The device_run function is a dummy function, which is simply
copy the data from input buffer to output
Implement the ASRC memory to memory function using
the v4l2 framework, user can use this function with
v4l2 ioctl interface.
User send the output and capture buffer to driver and
driver store the converted data to the capture buffer.
This feature can be shared by ASRC and EASRC drivers
Signed-of
Add fixed point test controls, one is for Q4.16 format
another one is for Q63 format.
Signed-off-by: Shengjiu Wang
---
drivers/media/test-drivers/vivid/vivid-core.h | 2 ++
.../media/test-drivers/vivid/vivid-ctrls.c| 26 +++
include/media/v4l2-ctrls.h| 6
Add and document a media entity type for an audio resampler.
It is MEDIA_ENT_F_PROC_AUDIO_RESAMPLER.
Signed-off-by: Shengjiu Wang
---
Documentation/userspace-api/media/mediactl/media-types.rst | 6 ++
include/uapi/linux/media.h | 1 +
2 files changed, 7 insert
Declare the interface types that will be used by Audio.
The type is MEDIA_INTF_T_V4L_AUDIO.
Signed-off-by: Shengjiu Wang
---
.../userspace-api/media/mediactl/media-types.rst| 5 +
drivers/media/v4l2-core/v4l2-dev.c | 4
drivers/media/v4l2-core/v4l2-mem2mem.c
Add V4L2_CID_M2M_AUDIO_SOURCE_RATE and V4L2_CID_M2M_AUDIO_DEST_RATE
new IDs for rate control.
Add V4L2_CID_M2M_AUDIO_SOURCE_RATE_OFFSET and
V4L2_CID_M2M_AUDIO_DEST_RATE_OFFSET for clock drift.
Signed-off-by: Shengjiu Wang
---
.../media/v4l/ext-ctrls-audio-m2m.rst | 38 ++
The Audio M2M class includes controls for audio memory-to-memory
use cases. The controls can be used for audio codecs, audio
preprocessing, audio postprocessing.
Signed-off-by: Shengjiu Wang
---
.../userspace-api/media/v4l/common.rst| 1 +
.../media/v4l/ext-ctrls-audio-m2m.rst |
The audio sample format definition is from alsa,
the header file is include/uapi/sound/asound.h, but
don't include this header file directly, because in
user space, there is another copy in alsa-lib.
There will be conflict in userspace for include
videodev2.h & asound.h and asoundlib.h
Here still
Audio signal processing has the requirement for memory to
memory similar as Video.
This patch is to add this support in v4l2 framework, defined
new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and
V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new format v4l2_audio_format
for audio case usage.
The created audio
V4L2_CAP_AUDIO_M2M is similar to V4L2_CAP_VIDEO_M2M flag.
It is used for audio memory to memory case.
Signed-off-by: Shengjiu Wang
---
Documentation/userspace-api/media/v4l/vidioc-querycap.rst| 3 +++
Documentation/userspace-api/media/videodev2.h.rst.exceptions | 1 +
include/uapi/linux/vid
Register m2m platform device,that user can
use M2M feature.
Signed-off-by: Shengjiu Wang
Acked-by: Mark Brown
---
sound/soc/fsl/fsl_easrc.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
index cf7ad30a323b..ccbf45c7
Register m2m platform device, that user can
use M2M feature.
Defined platform data structure and platform
driver name.
Signed-off-by: Shengjiu Wang
Acked-by: Mark Brown
---
include/sound/fsl_asrc_common.h | 23 +++
sound/soc/fsl/fsl_asrc.c| 18 ++
2
Move fsl_asrc_common.h to include/sound that it can be
included from other drivers.
Signed-off-by: Shengjiu Wang
Acked-by: Mark Brown
---
{sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0
sound/soc/fsl/fsl_asrc.h | 2 +-
sound/soc/fsl/fsl_asrc_dma.c
ASRC can be used on memory to memory case, define several
functions for m2m usage and export them as function pointer.
Signed-off-by: Shengjiu Wang
Acked-by: Mark Brown
---
sound/soc/fsl/fsl_easrc.c | 214 ++
sound/soc/fsl/fsl_easrc.h | 4 +
2 files changed
ASRC can be used on memory to memory case, define several
functions for m2m usage.
m2m_prepare: prepare for the start step
m2m_start: the start step
m2m_unprepare: unprepare for stop step, optional
m2m_stop: stop step
m2m_check_format: check format is supported or not
m2m_calc_out_len: calculate o
From: Hans Verkuil
This adds support for the fraction_bits field, used with integer controls.
This allows fixed point formats to be described.
The fraction_bits field is only exposed through VIDIOC_QUERY_EXT_CTRL.
For a given signed two's complement Qf fixed point value 'f' equals
fraction_bits
Audio signal processing also has the requirement for memory to
memory similar as Video.
This asrc memory to memory (memory ->asrc->memory) case is a non
real time use case.
User fills the input buffer to the asrc module, after conversion, then asrc
sends back the output buffer to user. So it is n
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| 20
powerpc/unittests.cfg | 14 --
2 files changed, 16 insertions(+), 18 delet
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 | 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/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
--
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 cb1d6c9
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 | 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/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
Add support for backtracing across interrupt stacks, and add
interrupt frame backtrace for unhandled interrupts.
This requires a back-chain created from initial interrupt stack
frame to the r1 value of the interrupted context. A label is
added at the return location of the exception handler call,
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 the location of the return address pointer if it
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
@@ -
This test stores to a bunch of pages and verifies previous stores,
while being continually migrated. Default runtime is 5 seconds.
Add this test to ppc64 and s390x builds. This can fail due to a QEMU
TCG physical memory dirty bitmap bug, so it is not enabled in unittests
for TCG yet.
The selftest
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(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f
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
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 test migration vs concurrent complicated
memory a
Tests that are run with MIGRATION=yes but skip due to some requirement
not being met will show as a failure due to the harness requirement to
see one successful migration. The workaround for this is to migrate in
test's skip path. Add a new command that just tells the harness to not
expect a migrat
The infifo fifo that is used to send characters to QEMU console is
only able to receive one character before the cat process exits.
Supporting interactions between test and harness involving multiple
characters requires the fifo to remain open.
The infifo is removed by the exit handler like other
The migration harness will be expanded to deal with more commands
from the test, moving these checks into functions helps keep things
managable.
Signed-off-by: Nicholas Piggin
---
scripts/arch-run.bash | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/scri
Tree here
https://gitlab.com/npiggin/kvm-unit-tests/-/tree/powerpc?ref_type=heads
Sorry I lost the v6 tag on the previous series. Since then,
I merged the series with the migration ones since they touch
the same things.
Addressed almost all comments since the last post, I think just
one case wher
On 19/03/2024 4:14 am, Shengjiu Wang wrote:
> On Tue, Mar 19, 2024 at 10:24 AM Shengjiu Wang
> wrote:
>>
>> On Mon, Mar 18, 2024 at 11:56 PM Hans Verkuil wrote:
>>>
>>> Hi Shengjiu,
>>>
>>> I was about to prepare a pull request for this when I realized that
>>> entries for the new drivers need t
66 matches
Mail list logo