Re: [PATCH 09/13] mm/powerpc: Redefine pXd_huge() with pXd_leaf()

2024-03-19 Thread Christophe Leroy
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

[PATCH v2] arch/powerpc/kvm: Add support for reading VPA counters for pseries guests

2024-03-19 Thread Gautam Menghani
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

Re: [PATCH 09/13] mm/powerpc: Redefine pXd_huge() with pXd_leaf()

2024-03-19 Thread Jason Gunthorpe
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

Re: [PATCH 09/13] mm/powerpc: Redefine pXd_huge() with pXd_leaf()

2024-03-19 Thread Christophe Leroy
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 é

Re: [RFC PATCH 1/3] powerpc/pseries/iommu: Bring back userspace view for single level TCE tables

2024-03-19 Thread Timothy Pearson
- 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

Re: [RFC PATCH 1/3] powerpc/pseries/iommu: Bring back userspace view for single level TCE tables

2024-03-19 Thread Jason Gunthorpe
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

Re: [PATCH 4/6] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()

2024-03-19 Thread Mike Rapoport
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

Re: [PATCH 2/6] x86: remove memblock_find_dma_reserve()

2024-03-19 Thread Mike Rapoport
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

[PATCH] arch/powerpc/kvm: Add support for reading VPA counters for pseries guests

2024-03-19 Thread Gautam Menghani
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

Re: [PATCH v2 05/14] mm/sparc: Change pXd_huge() behavior to exclude swap entries

2024-03-19 Thread Peter Xu
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_

Re: [RFC] sched/eevdf: sched feature to dismiss lag on wakeup

2024-03-19 Thread Vincent Guittot
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

Re: [RFC] sched/eevdf: sched feature to dismiss lag on wakeup

2024-03-19 Thread Tobias Huschle
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

[PATCH v15 16/16] media: vim2m-audio: add virtual driver for audio memory to memory

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 15/16] media: imx-asrc: Add memory to memory driver

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 14/16] media: vivid: add fixed point test controls

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 13/16] media: uapi: Add an entity type for audio resampler

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 12/16] media: uapi: Declare interface types for Audio

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 11/16] media: uapi: Add audio rate controls support

2024-03-19 Thread Shengjiu Wang
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 ++

[PATCH v15 10/16] media: uapi: Add V4L2_CTRL_CLASS_M2M_AUDIO

2024-03-19 Thread Shengjiu Wang
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 |

[PATCH v15 09/16] media: uapi: Define audio sample format fourcc type

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 08/16] media: v4l2: Add audio capture and output support

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 07/16] media: uapi: Add V4L2_CAP_AUDIO_M2M capability flag

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 06/16] ASoC: fsl_easrc: register m2m platform device

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 05/16] ASoC: fsl_asrc: register m2m platform device

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 04/16] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 03/16] ASoC: fsl_easrc: define functions for memory to memory usage

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 02/16] ASoC: fsl_asrc: define functions for memory to memory usage

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 01/16] media: v4l2-ctrls: add support for fraction_bits

2024-03-19 Thread Shengjiu Wang
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

[PATCH v15 00/16] Add audio support in v4l2 framework

2024-03-19 Thread Shengjiu Wang
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

[kvm-unit-tests PATCH v7 35/35] powerpc: gitlab CI update

2024-03-19 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. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml| 20 powerpc/unittests.cfg | 14 -- 2 files changed, 16 insertions(+), 18 delet

[kvm-unit-tests PATCH v7 34/35] powerpc: Remove remnants of ppc64 directory and build structure

2024-03-19 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 v7 33/35] configure: Make arch_libdir a first-class entity

2024-03-19 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 v7 32/35] powerpc: add pmu tests

2024-03-19 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 v7 31/35] powerpc: add usermode support

2024-03-19 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 v7 30/35] powerpc: Add sieve.c common test

2024-03-19 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 v7 29/35] common/sieve: Support machines without MMU

2024-03-19 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 v7 28/35] common/sieve: Use vmalloc.h for setup_mmu definition

2024-03-19 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 v7 27/35] powerpc: Add MMU support

2024-03-19 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 v7 26/35] powerpc: Add timebase tests

2024-03-19 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 | 329

[kvm-unit-tests PATCH v7 25/35] powerpc: Add atomics tests

2024-03-19 Thread Nicholas Piggin
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

[kvm-unit-tests PATCH v7 24/35] powerpc: Avoid using larx/stcx. in spinlocks when only one CPU is running

2024-03-19 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 v7 23/35] powerpc: Permit ACCEL=tcg,thread=single

2024-03-19 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 v7 22/35] powerpc: add SMP and IPI support

2024-03-19 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 v7 21/35] powerpc: Remove broken SMP exception stack setup

2024-03-19 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 v7 20/35] powerpc: Add rtas stop-self support

2024-03-19 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 v7 19/35] powerpc: general interrupt tests

2024-03-19 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 v7 18/35] powerpc/sprs: Test hypervisor registers on powernv machine

2024-03-19 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 cb1d6c9

[kvm-unit-tests PATCH v7 17/35] powerpc: Fix emulator illegal instruction test for powernv

2024-03-19 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 v7 16/35] powerpc: Support powernv machine with QEMU TCG

2024-03-19 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 v7 15/35] scripts: Accommodate powerpc powernv machine differences

2024-03-19 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 v7 14/35] scripts: allow machine option to be specified in unittests.cfg

2024-03-19 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 | 6 ++ scripts/common.bash | 8 ++--

[kvm-unit-tests PATCH v7 13/35] doc: start documentation directory with unittests.cfg doc

2024-03-19 Thread Nicholas Piggin
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 |

[kvm-unit-tests PATCH v7 12/35] powerpc/sprs: Avoid taking PMU interrupts caused by register fuzzing

2024-03-19 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 v7 11/35] powerpc/sprs: Specify SPRs with data rather than code

2024-03-19 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 v7 10/35] powerpc: interrupt stack backtracing

2024-03-19 Thread Nicholas Piggin
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,

[kvm-unit-tests PATCH v7 09/35] powerpc: Fix stack backtrace termination

2024-03-19 Thread Nicholas Piggin
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-unit-tests PATCH v7 08/35] powerpc: Fix KVM caps on POWER9 hosts

2024-03-19 Thread Nicholas Piggin
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 @@ -

[kvm-unit-tests PATCH v7 07/35] common: add memory dirtying vs migration test

2024-03-19 Thread Nicholas Piggin
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

[kvm-unit-tests PATCH v7 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-03-19 Thread Nicholas Piggin
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

[kvm-unit-tests PATCH v7 04/35] (arm|s390): Use migrate_skip in test cases

2024-03-19 Thread Nicholas Piggin
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

[kvm-unit-tests PATCH v7 05/35] arch-run: Add a "continuous" migration option for tests

2024-03-19 Thread Nicholas Piggin
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

[kvm-unit-tests PATCH v7 03/35] migration: Add a migrate_skip command

2024-03-19 Thread Nicholas Piggin
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

[kvm-unit-tests PATCH v7 02/35] arch-run: Keep infifo open

2024-03-19 Thread Nicholas Piggin
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

[kvm-unit-tests PATCH v7 01/35] arch-run: Add functions to help handle migration directives from test

2024-03-19 Thread Nicholas Piggin
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

[kvm-unit-tests PATCH v7 00/35] migration, powerpc improvements

2024-03-19 Thread Nicholas Piggin
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

Re: [PATCH v14 00/16] Add audio support in v4l2 framework

2024-03-19 Thread Hans Verkuil
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