Re: [kvm-unit-tests PATCH v5 7/8] Add common/ directory for architecture-independent tests

2024-02-20 Thread Andrew Jones
On Wed, Feb 21, 2024 at 01:27:56PM +1000, Nicholas Piggin wrote: > x86/sieve.c is used by s390x, arm, and riscv via symbolic link. Make a > new directory common/ for architecture-independent tests and move > sieve.c here. > > Reviewed-by: Thomas Huth > Signed-off-by: Nicholas Piggin > --- > arm

[powerpc:fixes] BUILD SUCCESS 20c8c4dafe93e82441583e93bd68c0d256d7bed4

2024-02-20 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git fixes branch HEAD: 20c8c4dafe93e82441583e93bd68c0d256d7bed4 KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat' elapsed time: 1061m configs tested: 123 configs skipped: 3 The following confi

[powerpc] WARNING at arch/powerpc/mm/mmu_context.c:106 switch_mm_irqs_off+0x140/0x17

2024-02-20 Thread Geetika M
While running DLPAR CPU remove test on a IBM Power10 server (6.8.0-rc2) following warning is seen : [ 2334.165288][ T0] [ cut here ] [ 2334.165302][ T0] WARNING: CPU: 45 PID: 0 at arch/powerpc/mm/mmu_context.c:106 switch_mm_irqs_off+0x140/0x170 [ 2334.165316][ T0] Module

Re: [PATCH 1/4] mm/vmalloc: allow arch-specific vmalloc_node overrides

2024-02-20 Thread Christoph Hellwig
On Tue, Feb 20, 2024 at 02:32:53PM -0600, Maxwell Bland wrote: > Present non-uniform use of __vmalloc_node and __vmalloc_node_range makes > enforcing appropriate code and data seperation untenable on certain > microarchitectures, as VMALLOC_START and VMALLOC_END are monolithic > while the use of th

Re: [PATCH v2 00/14] Split crash out from kexec and clean up related config items

2024-02-20 Thread Hari Bathini
Hi Baoquan, On 04/02/24 8:56 am, Baoquan He wrote: Hope Hari and Pingfan can help have a look, see if it's doable. Now, I make it either have both kexec and crash enabled, or disable both of them altogether. Sure. I will take a closer look... Thanks a lot. Please feel free to post patches to

[PATCH v4 1/2] powerpc: Add Power11 architected and raw mode

2024-02-20 Thread Michael Ellerman
From: Madhavan Srinivasan Add CPU table entries for raw and architected mode. Most fields are copied from the Power10 table entries. CPU, MMU and user (ELF_HWCAP) features are unchanged vs P10. However userspace can detect P11 because the AT_PLATFORM value changes to "power11". The logical PVR

[PATCH v4 2/2] powerpc/perf: Power11 Performance Monitoring support

2024-02-20 Thread Michael Ellerman
From: Madhavan Srinivasan Base enablement patch to register performance monitoring hardware support for Power11. Most of fields are copied from power10_pmu struct for power11_pmu struct. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman --- arch/powerpc/perf/core-book3s.c |

Re: [PATCH v12 07/15] media: v4l2: Add audio capture and output support

2024-02-20 Thread Tomasz Figa
On Thu, Jan 18, 2024 at 10:15 PM Shengjiu Wang wrote: > > 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 ne

Re: [PATCH v12 07/15] media: v4l2: Add audio capture and output support

2024-02-20 Thread Tomasz Figa
On Sat, Feb 17, 2024 at 6:42 PM Mauro Carvalho Chehab wrote: > > Em Thu, 18 Jan 2024 20:32:00 +0800 > Shengjiu Wang escreveu: > > > 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 b

[kvm-unit-tests PATCH v5 8/8] migration: add a migration selftest

2024-02-20 Thread Nicholas Piggin
Add a selftest for migration support in guest library and test harness code. It performs migrations in a tight loop to irritate races and bugs in the test harness code. Include the test in s390, powerpc. Acked-by: Claudio Imbrenda (s390x) Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin

[kvm-unit-tests PATCH v5 7/8] Add common/ directory for architecture-independent tests

2024-02-20 Thread Nicholas Piggin
x86/sieve.c is used by s390x, arm, and riscv via symbolic link. Make a new directory common/ for architecture-independent tests and move sieve.c here. Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- arm/sieve.c| 2 +- common/sieve.c | 51

[kvm-unit-tests PATCH v5 6/8] migration: Add quiet migration support

2024-02-20 Thread Nicholas Piggin
Console output required to support migration becomes quite noisy when doing lots of migrations. Provide a migrate_quiet() call that suppresses console output and doesn't log a message. Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- lib/migrate.c | 11 +++ lib/migrat

[kvm-unit-tests PATCH v5 5/8] arch-run: rename migration variables

2024-02-20 Thread Nicholas Piggin
Using 1 and 2 for source and destination is confusing, particularly now with multiple migrations that flip between them. Do a rename pass to 'src' and 'dst' to tidy things up. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- scripts/arch-run.bash | 111 +-

[kvm-unit-tests PATCH v5 4/8] migration: Support multiple migrations

2024-02-20 Thread Nicholas Piggin
Support multiple migrations by flipping dest file/socket variables to source after the migration is complete, ready to start again. A new destination is created if the test outputs the migrate line again. Test cases may now switch to calling migrate() one or more times. Reviewed-by: Thomas Huth S

[kvm-unit-tests PATCH v5 3/8] migration: use a more robust way to wait for background job

2024-02-20 Thread Nicholas Piggin
Starting a pipeline of jobs in the background does not seem to have a simple way to reliably find the pid of a particular process in the pipeline (because not all processes are started when the shell continues to execute). The way PID of QEMU is derived can result in a failure waiting on a PID tha

[kvm-unit-tests PATCH v5 2/8] arch-run: Clean up initrd cleanup

2024-02-20 Thread Nicholas Piggin
Rather than put a big script into the trap handler, have it call a function. Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- scripts/arch-run.bash | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash index 11

[kvm-unit-tests PATCH v5 1/8] arch-run: Fix TRAP handler recursion to remove temporary files properly

2024-02-20 Thread Nicholas Piggin
Migration files were not being removed when the QEMU process is interrupted (e.g., with ^C). This is becaus the SIGINT propagates to the bash TRAP handler, which recursively TRAPs due to the 'kill 0' in the handler. This eventually crashes bash. This can be observed by interrupting a long-running

[kvm-unit-tests PATCH v5 0/8] Multi-migration support

2024-02-20 Thread Nicholas Piggin
Now that strange arm64 hang is found to be QEMU bug, I'll repost. Since arm64 requires Thomas's uart patch and it is worse affected by the QEMU bug, I will just not build it on arm. The QEMU bug still affects powerpc (and presumably s390x) but it's not causing so much trouble for this test case. I

[PATCH 4/4] arm64: dynamic enforcement of pmd-level PXNTable

2024-02-20 Thread Maxwell Bland
In an attempt to protect against write-then-execute attacks wherein an adversary stages malicious code into a data page and then later uses a write gadget to mark the data page executable, arm64 enforces PXNTable when allocating pmd descriptors during the init process. However, these protections ar

[PATCH 1/4] mm/vmalloc: allow arch-specific vmalloc_node overrides

2024-02-20 Thread Maxwell Bland
Present non-uniform use of __vmalloc_node and __vmalloc_node_range makes enforcing appropriate code and data seperation untenable on certain microarchitectures, as VMALLOC_START and VMALLOC_END are monolithic while the use of the vmalloc interface is non-monolithic: in particular, appropriate rando

[PATCH 2/4] mm: pgalloc: support address-conditional pmd allocation

2024-02-20 Thread Maxwell Bland
While other descriptors (e.g. pud) allow allocations conditional on which virtual address is allocated, pmd descriptor allocations do not. However, adding support for this is straightforward and is beneficial to future kernel development targeting the PMD memory granularity. As many architectures

[PATCH 0/4] arm64: mm: support dynamic vmalloc/pmd configuration

2024-02-20 Thread Maxwell Bland
Reworks ARM's virtual memory allocation infrastructure to support dynamic enforcement of page middle directory PXNTable restrictions rather than only during the initial memory mapping. Runtime enforcement of this bit prevents write-then-execute attacks, where malicious code is staged in vmalloc'd d

[PATCH 3/4] arm64: separate code and data virtual memory allocation

2024-02-20 Thread Maxwell Bland
Current BPF and kprobe instruction allocation interfaces do not match the base kernel and intermingle code and data pages within the same sections. In the case of BPF, this appears to be a result of code duplication between the kernel's JIT compiler and arm64's JIT. However, This is no longer nece

[RFC PATCH 08/14] powerpc/thread_info: Introduce TIF_NOTIFY_IPI flag

2024-02-20 Thread K Prateek Nayak
Add support for TIF_NOTIFY_IPI on PowerPC. With TIF_NOTIFY_IPI, a sender sending an IPI to an idle CPU in TIF_POLLING mode will set the TIF_NOTIFY_IPI flag in the target's idle tasks's thread_info to pull the CPU out of idle, as opposed to setting TIF_NEED_RESCHED previously. This avoids spurious c

[RFC PATCH 03/14] sched/core: Use TIF_NOTIFY_IPI to notify an idle CPU in TIF_POLLING mode of pending IPI

2024-02-20 Thread K Prateek Nayak
From: "Gautham R. Shenoy" Problem statement = When measuring IPI throughput using a modified version of Anton Blanchard's ipistorm benchmark [1], configured to measure time taken to perform a fixed number of smp_call_function_single() (with wait set to 1), an increase in benchmar

[RFC PATCH 02/14] sched: Define a need_resched_or_ipi() helper and use it treewide

2024-02-20 Thread K Prateek Nayak
From: "Gautham R. Shenoy" Currently TIF_NEED_RESCHED is being overloaded, to wakeup an idle CPU in TIF_POLLING mode to service an IPI even if there are no new tasks being woken up on the said CPU. In preparation of a proper fix, introduce a new helper "need_resched_or_ipi()" which is intended to

[RFC PATCH 01/14] thread_info: Add helpers to test and clear TIF_NOTIFY_IPI

2024-02-20 Thread K Prateek Nayak
From: "Gautham R. Shenoy" Introduce the notion of TIF_NOTIFY_IPI flag. When a processor in TIF_POLLING mode needs to process an IPI, the sender sets NEED_RESCHED bit in idle task's thread_info to pull the target out of idle and avoids sending an interrupt to the idle CPU. When NEED_RESCHED is set

[RFC PATCH 00/14] Introducing TIF_NOTIFY_IPI flag

2024-02-20 Thread K Prateek Nayak
Hello everyone, Before jumping into the issue, let me clarify the Cc list. Everyone have been cc'ed on Patch 0 through Patch 3. Respective arch maintainers, reviewers, and committers returned by scripts/get_maintainer.pl have been cc'ed on the respective arch side changes. Scheduler and CPU Idle m

Re: [PATCH v6 12/18] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-20 Thread Ryan Roberts
On 19/02/2024 15:18, Catalin Marinas wrote: > On Fri, Feb 16, 2024 at 12:53:43PM +, Ryan Roberts wrote: >> On 16/02/2024 12:25, Catalin Marinas wrote: >>> On Thu, Feb 15, 2024 at 10:31:59AM +, Ryan Roberts wrote: +pte_t contpte_ptep_get_lockless(pte_t *orig_ptep) +{ + /* >>>

Re: [PATCH v6 12/18] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-20 Thread Ryan Roberts
On 16/02/2024 19:54, John Hubbard wrote: > On 2/16/24 08:56, Catalin Marinas wrote: > ... >>> The problem is that the contpte_* symbols are called from the ptep_* inline >>> functions. So where those inlines are called from modules, we need to make >>> sure >>> the contpte_* symbols are available.

Re: [PATCH v4 01/11] dt-bindings: wiiu: Document the Nintendo Wii U devicetree

2024-02-20 Thread Krzysztof Kozlowski
On 20/02/2024 17:20, Christophe Leroy wrote: > Michael, > > Le 19/11/2022 à 12:30, Ash Logan a écrit : >> Adds schema for the various Wii U devicetree nodes used. >> >> Signed-off-by: Ash Logan > > There's an issue at https://github.com/linuxppc/issues/issues/410 with > kernel v6.4 as a target

Re: [PATCH RFC] powerpc/pseries: exploit H_PAGE_SET_UNUSED for partition migration

2024-02-20 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch via B4 Relay > writes: >> From: Nathan Lynch >> >> Although the H_PAGE_INIT hcall's H_PAGE_SET_UNUSED historically has >> been tied to the cooperative memory overcommit (CMO) platform feature, >> the flag also is treated by the PowerVM hypervisor as a hint

Re: [PATCH v4 01/11] dt-bindings: wiiu: Document the Nintendo Wii U devicetree

2024-02-20 Thread Christophe Leroy
Michael, Le 19/11/2022 à 12:30, Ash Logan a écrit : > Adds schema for the various Wii U devicetree nodes used. > > Signed-off-by: Ash Logan There's an issue at https://github.com/linuxppc/issues/issues/410 with kernel v6.4 as a target to merging thing, any plan ? It still applies without reba

Re: [PATCH v3] powerpc: macio: Make remove callback of macio driver void returned

2024-02-20 Thread Christophe Leroy
Hi Michael, ping ? Le 01/02/2023 à 15:36, Dawei Li a écrit : > Commit fc7a6209d571 ("bus: Make remove callback return void") forces > bus_type::remove be void-returned, it doesn't make much sense for any > bus based driver implementing remove callbalk to return non-void to > its caller. > > This

Re: [RESEND PATCH net v4 1/2] soc: fsl: qbman: Always disable interrupts when taking cgr_lock

2024-02-20 Thread Sean Anderson
On 2/19/24 10:30, Vladimir Oltean wrote: > Hi Sean, > > On Thu, Feb 15, 2024 at 11:23:26AM -0500, Sean Anderson wrote: >> smp_call_function_single disables IRQs when executing the callback. To >> prevent deadlocks, we must disable IRQs when taking cgr_lock elsewhere. >> This is already done by qman

Re: [PATCH linux-next 1/3] kexec/kdump: make struct crash_mem available without CONFIG_CRASH_DUMP

2024-02-20 Thread Baoquan He
On 02/13/24 at 05:01pm, Hari Bathini wrote: > struct crash_mem defined under include/linux/crash_core.h represents > a list of memory ranges. While it is used to represent memory ranges >From its name, it's not only representing memory ranges, it's representing crash memory ranges. Except of this,

Re: [PATCH v2] uapi/auxvec: Define AT_HWCAP3 and AT_HWCAP4 aux vector, entries

2024-02-20 Thread Michael Ellerman
On Wed, 14 Feb 2024 16:34:06 -0600, Peter Bergner wrote: > Changes from v1: > - Add Acked-by lines. > > The powerpc toolchain keeps a copy of the HWCAP bit masks in our TCB for fast > access by the __builtin_cpu_supports built-in function. The TCB space for > the HWCAP entries - which are created

Re: [PATCH 0/7] macintosh: Convert to platform remove callback returning void

2024-02-20 Thread Michael Ellerman
On Wed, 10 Jan 2024 16:42:47 +0100, Uwe Kleine-König wrote: > this series converts all drivers below drivers/macintosh to use > .remove_new(). See commit 5c5a7680e67b ("platform: Provide a remove > callback that returns no value") for an extended explanation and the > eventual goal. The TL;DR; is t

Re: [PATCH] powerpc/hv-gpci: Fix the hcall return value checks in single_gpci_request function

2024-02-20 Thread Michael Ellerman
Kajol Jain writes: > Running event > hv_gpci/dispatch_timebase_by_processor_processor_time_in_timebase_cycles,phys_processor_idx=0/ > in one of the system throws below error: > > ---Logs--- > # perf list | grep > hv_gpci/dispatch_timebase_by_processor_processor_time_in_timebase_cycles > > h

Re: [PATCH v3] powerpc/pseries/iommu: DLPAR ADD of pci device doesn't completely initialize pci_controller structure

2024-02-20 Thread Michael Ellerman
On Thu, 15 Feb 2024 16:18:33 -0600, Gaurav Batra wrote: > When a PCI device is Dynamically added, LPAR OOPS with NULL pointer > exception. > > Complete stack is as below > > [ 211.239206] BUG: Kernel NULL pointer dereference on read at 0x0030 > [ 211.239210] Faulting instruction address: 0x

Re: [PATCH v4] KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat'

2024-02-20 Thread Michael Ellerman
On Wed, 07 Feb 2024 11:15:26 +0530, Amit Machhiwal wrote: > Currently, rebooting a pseries nested qemu-kvm guest (L2) results in > below error as L1 qemu sends PVR value 'arch_compat' == 0 via > ppc_set_compat ioctl. This triggers a condition failure in > kvmppc_set_arch_compat() resulting in an EI

Re: [PATCH RFC] powerpc/pseries: exploit H_PAGE_SET_UNUSED for partition migration

2024-02-20 Thread Michael Ellerman
Nathan Lynch via B4 Relay writes: > From: Nathan Lynch > > Although the H_PAGE_INIT hcall's H_PAGE_SET_UNUSED historically has > been tied to the cooperative memory overcommit (CMO) platform feature, > the flag also is treated by the PowerVM hypervisor as a hint that the > page contents need not

Re: [PATCH 0/4] powerpc/ps3 Add ELFv2 support

2024-02-20 Thread Michael Ellerman
Christophe Leroy writes: > Hi, > > Le 19/01/2024 à 11:27, Geoff Levand a écrit : >> The following changes since commit 44a1aad2fe6c10bfe0589d8047057b10a4c18a19: >> >>Merge branch 'topic/ppc-kvm' into next (2023-12-29 15:30:45 +1100) >> >> are available in the Git repository at: >> >>git

Re: [PATCHv8 2/2] watchdog/softlockup: report the most frequent interrupts

2024-02-20 Thread Bitao Hu
Hi, On 2024/2/20 17:35, Thomas Gleixner wrote: On Tue, Feb 20 2024 at 00:19, Bitao Hu wrote: arch/mips/dec/setup.c| 2 +- arch/parisc/kernel/smp.c | 2 +- arch/powerpc/kvm/book3s_hv_rm_xics.c | 2 +- include/linux/irqdesc.h | 9 ++- include

Re: [PATCHv8 2/2] watchdog/softlockup: report the most frequent interrupts

2024-02-20 Thread Thomas Gleixner
On Tue, Feb 20 2024 at 00:19, Bitao Hu wrote: > arch/mips/dec/setup.c| 2 +- > arch/parisc/kernel/smp.c | 2 +- > arch/powerpc/kvm/book3s_hv_rm_xics.c | 2 +- > include/linux/irqdesc.h | 9 ++- > include/linux/kernel_stat.h | 4 + > kerne

Re: Boot failure with ppc64 port on iMacs G5

2024-02-20 Thread John Paul Adrian Glaubitz
Hello, On Tue, 2024-02-20 at 04:16 +0100, tuxayo wrote: > I tried snapshots/2024-01-31/debian-12.0.0-ppc64-NETINST-1.iso > > And was able to start booting from usb with: > boot usb0/disk@1:,\boot\grub\powerpc.elf > (typed in Open Firmware shell) > (usb0 is the top port) > > Grub worked, and then

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2024-02-20 Thread Christophe Leroy
Le 20/02/2024 à 09:51, Christophe Leroy a écrit : > > > Le 19/12/2023 à 07:33, Michael Ellerman a écrit : >> Aneesh Kumar K.V writes: >>> Luming Yu writes: >>> Before we have powerpc to use the generic entry infrastructure, the call to fire user return notifier is made temporarily i

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2024-02-20 Thread Christophe Leroy
Le 19/12/2023 à 07:33, Michael Ellerman a écrit : > Aneesh Kumar K.V writes: >> Luming Yu writes: >> >>> Before we have powerpc to use the generic entry infrastructure, >>> the call to fire user return notifier is made temporarily in powerpc >>> entry code. >>> >> >> It is still not clear what

Re: [PATCH v1 1/1] hvc_console: Allow backends to set I/O buffer size

2024-02-20 Thread Christophe Leroy
Hi, Le 15/01/2023 à 20:56, Geoff Levand a écrit : > To allow HVC backends to set the I/O buffer sizes to values that are most > efficient for the backend, change the macro definitions where the buffer sizes > are set to be conditional on whether or not the macros are already defined. > Also, renam

Re: [PATCH 4/4] Revert "powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2"

2024-02-20 Thread Christophe Leroy
Le 19/01/2024 à 11:27, Geoff Levand a écrit : > Patches provided by Nicholas Piggin enable PS3 > support for ELFv2. The said patches are https://patchwork.ozlabs.org/project/linuxppc-dev/cover/20231227072405.63751-1-npig...@gmail.com/ > > Signed-off-by: Geoff Levand > --- > arch/powerpc/co

Re: [PATCH 0/4] powerpc/ps3 Add ELFv2 support

2024-02-20 Thread Christophe Leroy
Hi, Le 19/01/2024 à 11:27, Geoff Levand a écrit : > The following changes since commit 44a1aad2fe6c10bfe0589d8047057b10a4c18a19: > >Merge branch 'topic/ppc-kvm' into next (2023-12-29 15:30:45 +1100) > > are available in the Git repository at: > >git://git.kernel.org/pub/scm/linux/kernel