Re: [PATCH v6 03/16] dma-debug: refactor to use physical addresses for page mapping

2025-09-09 Thread Leon Romanovsky
On Tue, Sep 09, 2025 at 10:37:48PM +0300, Leon Romanovsky wrote: > On Tue, Sep 09, 2025 at 04:27:31PM +0300, Leon Romanovsky wrote: > > From: Leon Romanovsky > > <...> > > > include/linux/page-flags.h | 1 + > > <...> > > > --- a/include/linux/page-flags.h > > +++ b/include/linux/page

Re: [PATCH v2 net-next 0/3] ptp: add pulse signal loopback support for debugging

2025-09-09 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Fri, 5 Sep 2025 11:07:08 +0800 you wrote: > Some PTP devices support looping back the periodic pulse signal for > debugging. For example, the PTP device of QorIQ platform and the NETC v4 > Timer has the ability t

Re: [linux-next20250903] Kernel OOPs at perf_callchain_user

2025-09-09 Thread Venkat Rao Bagalkote
On 08/09/25 2:13 pm, Athira Rajeev wrote: On 5 Sep 2025, at 10:14 AM, Venkat Rao Bagalkote wrote: Greetings!!! IBM CI has reported kernel crash, while running perf test case on next20250903 kernel. Test: https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/perf/pe

Re: [TECH TOPIC] Reaching consensus on CONFIG_HIGHMEM phaseout

2025-09-09 Thread Matthew Wilcox
On Tue, Sep 09, 2025 at 11:23:37PM +0200, Arnd Bergmann wrote: > While removing a feature that is actively used is clearly a regression > and not normally done, I expect removing highmem is going to happen > at some point anyway when there are few enough users, but the question > is when that time

[TECH TOPIC] Reaching consensus on CONFIG_HIGHMEM phaseout

2025-09-09 Thread Arnd Bergmann
High memory is one of the least popular features of the Linux kernel. Added in 1999 for linux-2.3.16 to support large x86 machines, there are very few systems that still need it. I talked about about this recently at the Embedded Linux Conference on 32-bit systems [1][2][3] and there were a few old

[PATCH v6 08/16] kmsan: convert kmsan_handle_dma to use physical addresses

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky Convert the KMSAN DMA handling function from page-based to physical address-based interface. The refactoring renames kmsan_handle_dma() parameters from accepting (struct page *page, size_t offset, size_t size) to (phys_addr_t phys, size_t size). The existing semantics where

[PATCH v7 0/9] powerpc/pseries: Add hypervisor pipe (HVPIPE) suport

2025-09-09 Thread Haren Myneni
On powerPC systems, the Hardware Management Console (HMC) is used to create and manage logical partitions (LPAR) and both HMC and LPARs exchange information over Ethernet which can expose security implications. Hence the current method of communication is not viable for secure boot configuration.

Re: [RFC V2 8/8] powerpc: Enable Generic Entry/Exit for syscalls.

2025-09-09 Thread Mukesh Kumar Chaurasiya
On 9/9/25 12:24, Shrikanth Hegde wrote: On 9/9/25 2:32 AM, Mukesh Kumar Chaurasiya wrote: Enable the syscall entry and exit path from generic framework. Signed-off-by: Mukesh Kumar Chaurasiya --- Hi Mukesh. Thanks for working on this and getting it to better shape.   arch/powerpc/Kcon

Re: [TECH TOPIC] Reaching consensus on CONFIG_HIGHMEM phaseout

2025-09-09 Thread H. Peter Anvin
On September 9, 2025 2:23:37 PM PDT, Arnd Bergmann wrote: >High memory is one of the least popular features of the Linux kernel. >Added in 1999 for linux-2.3.16 to support large x86 machines, there >are very few systems that still need it. I talked about about this >recently at the Embedded Linux

[PATCH v6 07/16] dma-mapping: convert dma_direct_*map_page to be phys_addr_t based

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky Convert the DMA direct mapping functions to accept physical addresses directly instead of page+offset parameters. The functions were already operating on physical addresses internally, so this change eliminates the redundant page-to-physical conversion at the API boundary.

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-09 Thread Alexander Gordeev
On Tue, Sep 09, 2025 at 12:09:48PM +0200, David Hildenbrand wrote: > On 09.09.25 11:40, Alexander Gordeev wrote: > > On Tue, Sep 09, 2025 at 11:07:36AM +0200, David Hildenbrand wrote: > > > On 08.09.25 09:39, Kevin Brodsky wrote: > > > > arch_{enter,leave}_lazy_mmu_mode() currently have a stateless

Re: [TECH TOPIC] Reaching consensus on CONFIG_HIGHMEM phaseout

2025-09-09 Thread H. Peter Anvin
On September 9, 2025 3:24:29 PM PDT, Linus Torvalds wrote: >On Tue, 9 Sept 2025 at 14:39, H. Peter Anvin wrote: >> >> 1 GB systems used highmem too, sadly. And 1 GB was the norm for a big chuck >> of the late 32-bit era. > >Well, while on x86 1GB systems did use highmem, they'd typically not >u

[PATCH v3 1/2] powerpc/ftrace: support CONFIG_FUNCTION_GRAPH_RETVAL

2025-09-09 Thread Aditya Bodkhe
commit a1be9ccc57f0 ("function_graph: Support recording and printing the return value of function") introduced support for function graph return value tracing. Additionally, commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs") further refactored and optimized the implementation

Re: [PATCH v2 12/12] wireguard: kconfig: Simplify crypto kconfig selections

2025-09-09 Thread Jason A. Donenfeld
Hi Eric, Just a small nit -- would you commit this with the subject line all lower case, like the other wireguard commits? By the way, I have been reading every single one of your patches. It didn't seem like it'd be useful for me to respond endlessly with Acked-by/Reviewed-by, so I haven't. But

Re: [TECH TOPIC] Reaching consensus on CONFIG_HIGHMEM phaseout

2025-09-09 Thread Linus Torvalds
On Tue, 9 Sept 2025 at 14:39, H. Peter Anvin wrote: > > 1 GB systems used highmem too, sadly. And 1 GB was the norm for a big chuck > of the late 32-bit era. Well, while on x86 1GB systems did use highmem, they'd typically not use very much of it. IOW, they'd have about 900MB as lowmem (ok, I t

Re: [PATCH v3 1/6] PCI: pnv_php: Properly clean up allocated IRQs on unplug

2025-09-09 Thread Timothy Pearson
- Original Message - > From: "Jiri Slaby" > To: "Timothy Pearson" > Cc: "linuxppc-dev" , "linux-kernel" > , "linux-pci" > , "Madhavan Srinivasan" , > "Michael Ellerman" , > "christophe leroy" , "Naveen N Rao" > , "Bjorn Helgaas" > , "Shawn Anastasio" > Sent: Tuesday, September 9, 2

[PATCH] vfio/pci: Fix INTx handling on legacy DisINTx- PCI devices

2025-09-09 Thread Timothy Pearson
PCI devices prior to PCI 2.3 both use level interrupts and do not support interrupt masking, leading to a failure when passed through to a KVM guest on at least the ppc64 platform, which does not utilize the resample IRQFD. This failure manifests as receiving and acknowledging a single interrupt in

[PATCH v6 11/16] dma-mapping: export new dma_*map_phys() interface

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky Introduce new DMA mapping functions dma_map_phys() and dma_unmap_phys() that operate directly on physical addresses instead of page+offset parameters. This provides a more efficient interface for drivers that already have physical addresses available. The new functions are

Re: [PATCH v6 03/16] dma-debug: refactor to use physical addresses for page mapping

2025-09-09 Thread Leon Romanovsky
On Tue, Sep 09, 2025 at 04:27:31PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky <...> > include/linux/page-flags.h | 1 + <...> > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -614,6 +614,7 @@ FOLIO_FLAG(dropbehind, FOLIO_HEAD_PAGE) > * available

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-09 Thread Juergen Gross
On 09.09.25 11:07, David Hildenbrand wrote: On 08.09.25 09:39, Kevin Brodsky wrote: arch_{enter,leave}_lazy_mmu_mode() currently have a stateless API (taking and returning no value). This is proving problematic in situations where leave() needs to restore some context back to its original state

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-09 Thread Kevin Brodsky
On 09/09/2025 13:54, David Hildenbrand wrote: > On 09.09.25 13:45, Alexander Gordeev wrote: >> On Tue, Sep 09, 2025 at 12:09:48PM +0200, David Hildenbrand wrote: >>> On 09.09.25 11:40, Alexander Gordeev wrote: On Tue, Sep 09, 2025 at 11:07:36AM +0200, David Hildenbrand wrote: > On 08.09.25

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-09 Thread David Hildenbrand
On 08.09.25 09:39, Kevin Brodsky wrote: arch_{enter,leave}_lazy_mmu_mode() currently have a stateless API (taking and returning no value). This is proving problematic in situations where leave() needs to restore some context back to its original state (before enter() was called). In particular, t

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-09 Thread Alexander Gordeev
On Tue, Sep 09, 2025 at 03:49:46PM +0200, Kevin Brodsky wrote: > On 09/09/2025 13:54, David Hildenbrand wrote: > > On 09.09.25 13:45, Alexander Gordeev wrote: > >> On Tue, Sep 09, 2025 at 12:09:48PM +0200, David Hildenbrand wrote: > >>> On 09.09.25 11:40, Alexander Gordeev wrote: > On Tue, Sep

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-09 Thread Kevin Brodsky
On 09/09/2025 12:57, Juergen Gross wrote: > On 09.09.25 11:07, David Hildenbrand wrote: >> On 08.09.25 09:39, Kevin Brodsky wrote: >>> [...] >>> >>> Note: it is difficult to provide a default definition of >>> lazy_mmu_state_t for architectures implementing lazy_mmu, because >>> that definition wou

Re: [PATCH v2 0/7] Nesting support for lazy MMU mode

2025-09-09 Thread Kevin Brodsky
On 09/09/2025 11:21, David Hildenbrand wrote: > On 09.09.25 04:16, Andrew Morton wrote: >> On Mon,  8 Sep 2025 08:39:24 +0100 Kevin Brodsky >> wrote: >> >>> The main change enabling nesting is patch 2, following the approach >>> suggested by Catalin Marinas [4]: have enter() return some state and

[PATCH v6 16/16] nvme-pci: unmap MMIO pages with appropriate interface

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky Block layer maps MMIO memory through dma_map_phys() interface with help of DMA_ATTR_MMIO attribute. There is a need to unmap that memory with the appropriate unmap function, something which wasn't possible before adding new REQ attribute to block layer in previous patch. Re

[PATCH v6 14/16] block-dma: migrate to dma_map_phys instead of map_page

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky After introduction of dma_map_phys(), there is no need to convert from physical address to struct page in order to map page. So let's use it directly. Reviewed-by: Keith Busch Signed-off-by: Leon Romanovsky --- block/blk-mq-dma.c | 4 ++-- 1 file changed, 2 insertions(+)

[PATCH v6 13/16] mm/hmm: properly take MMIO path

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky In case peer-to-peer transaction traverses through host bridge, the IOMMU needs to have IOMMU_MMIO flag, together with skip of CPU sync. The latter was handled by provided DMA_ATTR_SKIP_CPU_SYNC flag, but IOMMU flag was missed, due to assumption that such memory can be trea

[PATCH v6 09/16] dma-mapping: implement DMA_ATTR_MMIO for dma_(un)map_page_attrs()

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky Make dma_map_page_attrs() and dma_map_page_attrs() respect DMA_ATTR_MMIO. DMA_ATR_MMIO makes the functions behave the same as dma_(un)map_resource(): - No swiotlb is possible - Legacy dma_ops arches use ops->map_resource() - No kmsan - No arch_dma_map_phys_direct() The

[PATCH v6 06/16] iommu/dma: implement DMA_ATTR_MMIO for iommu_dma_(un)map_phys()

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky Make iommu_dma_map_phys() and iommu_dma_unmap_phys() respect DMA_ATTR_MMIO. DMA_ATTR_MMIO makes the functions behave the same as iommu_dma_(un)map_resource(): - No swiotlb is possible - No cache flushing is done (ATTR_MMIO should not be cached memory) - prot for iommu_ma

[PATCH v6 03/16] dma-debug: refactor to use physical addresses for page mapping

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky Convert the DMA debug infrastructure from page-based to physical address-based mapping as a preparation to rely on physical address for DMA mapping routines. The refactoring renames debug_dma_map_page() to debug_dma_map_phys() and changes its signature to accept a phys_addr

[PATCH v6 01/16] dma-mapping: introduce new DMA attribute to indicate MMIO memory

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky This patch introduces the DMA_ATTR_MMIO attribute to mark DMA buffers that reside in memory-mapped I/O (MMIO) regions, such as device BARs exposed through the host bridge, which are accessible for peer-to-peer (P2P) DMA. This attribute is especially useful for exporting dev

[PATCH v6 00/16] dma-mapping: migrate to physical address-based API

2025-09-09 Thread Leon Romanovsky
From: Leon Romanovsky Changelog: v6: * Based on "dma-debug: don't enforce dma mapping check on noncoherent allocations" patch. * Removed some unused variables from kmsan conversion. * Fixed missed ! in dma check. v5: https://lore.kernel.org/all/cover.1756822782.git.l...@kernel.org * Added

Re: [PATCH v2 4/7] x86/xen: support nested lazy_mmu sections (again)

2025-09-09 Thread Kevin Brodsky
On 09/09/2025 11:56, David Hildenbrand wrote: > On 09.09.25 11:37, Jürgen Groß wrote: >> On 09.09.25 11:13, David Hildenbrand wrote: >>> On 08.09.25 09:39, Kevin Brodsky wrote: Commit 49147beb0ccb ("x86/xen: allow nesting of same lazy mode") originally introduced support for nested lazy s

[PATCH v2] powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure

2025-09-09 Thread Christophe Leroy
PAGE_KERNEL_TEXT is an old macro that is used to tell kernel whether kernel text has to be mapped read-only or read-write based on build time options. But nowadays, with functionnalities like jump_labels, static links, etc ... more only less all kernels need to be read-write at some point, and som

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-09 Thread David Hildenbrand
On 09.09.25 11:40, Alexander Gordeev wrote: On Tue, Sep 09, 2025 at 11:07:36AM +0200, David Hildenbrand wrote: On 08.09.25 09:39, Kevin Brodsky wrote: arch_{enter,leave}_lazy_mmu_mode() currently have a stateless API (taking and returning no value). This is proving problematic in situations whe

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-09 Thread Jürgen Groß
On 08.09.25 09:39, Kevin Brodsky wrote: arch_{enter,leave}_lazy_mmu_mode() currently have a stateless API (taking and returning no value). This is proving problematic in situations where leave() needs to restore some context back to its original state (before enter() was called). In particular, t

Re: [PATCH v2 4/7] x86/xen: support nested lazy_mmu sections (again)

2025-09-09 Thread David Hildenbrand
On 09.09.25 11:37, Jürgen Groß wrote: On 09.09.25 11:13, David Hildenbrand wrote: On 08.09.25 09:39, Kevin Brodsky wrote: Commit 49147beb0ccb ("x86/xen: allow nesting of same lazy mode") originally introduced support for nested lazy sections (LAZY_MMU and LAZY_CPU). It later got reverted by com

Re: [PATCH v2 4/7] x86/xen: support nested lazy_mmu sections (again)

2025-09-09 Thread Jürgen Groß
On 08.09.25 09:39, Kevin Brodsky wrote: Commit 49147beb0ccb ("x86/xen: allow nesting of same lazy mode") originally introduced support for nested lazy sections (LAZY_MMU and LAZY_CPU). It later got reverted by commit c36549ff8d84 as its implementation turned out to be intolerant to preemption. N

Re: [PATCH v2 4/7] x86/xen: support nested lazy_mmu sections (again)

2025-09-09 Thread Jürgen Groß
On 09.09.25 11:13, David Hildenbrand wrote: On 08.09.25 09:39, Kevin Brodsky wrote: Commit 49147beb0ccb ("x86/xen: allow nesting of same lazy mode") originally introduced support for nested lazy sections (LAZY_MMU and LAZY_CPU). It later got reverted by commit c36549ff8d84 as its implementation

Re: [RFC V2 8/8] powerpc: Enable Generic Entry/Exit for syscalls.

2025-09-09 Thread Shrikanth Hegde
On 9/9/25 2:32 AM, Mukesh Kumar Chaurasiya wrote: Enable the syscall entry and exit path from generic framework. Signed-off-by: Mukesh Kumar Chaurasiya --- Hi Mukesh. Thanks for working on this and getting it to better shape. arch/powerpc/Kconfig| 1 + arch/power

[PATCH v17 05/12] mm/page_table_check: Provide addr parameter to page_table_check_ptes_set()

2025-09-09 Thread Andrew Donnellan
From: Rohan McLure To provide support for powerpc platforms, provide an addr parameter to the __page_table_check_ptes_set() and page_table_check_ptes_set() routines. This parameter is needed on some powerpc platforms which do not encode whether a mapping is for user or kernel in the pte. On such

[PATCH v17 04/12] mm/page_table_check: Reinstate address parameter in [__]page_table_check_pmd[s]_set()

2025-09-09 Thread Andrew Donnellan
From: Rohan McLure This reverts commit a3b837130b58 ("mm/page_table_check: remove unused parameter in [__]page_table_check_pmd_set"). Reinstate previously unused parameters for the purpose of supporting powerpc platforms, as many do not encode user/kernel ownership of the page in the pte, but in

Re: [PATCH v2 4/7] x86/xen: support nested lazy_mmu sections (again)

2025-09-09 Thread David Hildenbrand
On 08.09.25 09:39, Kevin Brodsky wrote: Commit 49147beb0ccb ("x86/xen: allow nesting of same lazy mode") originally introduced support for nested lazy sections (LAZY_MMU and LAZY_CPU). It later got reverted by commit c36549ff8d84 as its implementation turned out to be intolerant to preemption. N

Re: [PATCH v2 0/7] Nesting support for lazy MMU mode

2025-09-09 Thread Kevin Brodsky
On 08/09/2025 18:56, Lorenzo Stoakes wrote: > On Mon, Sep 08, 2025 at 08:39:24AM +0100, Kevin Brodsky wrote: >> When the lazy MMU mode was introduced eons ago, it wasn't made clear >> whether such a sequence was legal: >> >> arch_enter_lazy_mmu_mode() >> ... >> arch_enter_laz

Re: [PATCH v2 2/7] mm: introduce local state for lazy_mmu sections

2025-09-09 Thread Kevin Brodsky
On 09/09/2025 07:40, Andrew Morton wrote: > On Mon, 8 Sep 2025 08:39:26 +0100 Kevin Brodsky > wrote: > >> arch_{enter,leave}_lazy_mmu_mode() currently have a stateless API >> (taking and returning no value). This is proving problematic in >> situations where leave() needs to restore some context

Re: [PATCH v3 1/6] PCI: pnv_php: Properly clean up allocated IRQs on unplug

2025-09-09 Thread Jiri Slaby
On 15. 07. 25, 23:36, Timothy Pearson wrote: In cases where the root of a nested PCIe bridge configuration is unplugged, the pnv_php driver would leak the allocated IRQ resources for the child bridges' hotplug event notifications, resulting in a panic. Fix this by walking all child buses and deal

[PATCH v7 2/9] powerpc/pseries: Define HVPIPE specific macros

2025-09-09 Thread Haren Myneni
Define HVPIPE specific macros which are needed to support ibm,send-hvpipe-msg and ibm,receive-hvpipe-msg RTAS calls and used to handle HVPIPE message events. Signed-off-by: Haren Myneni Reviewed-by: Mahesh Salgaonkar Reviewed-by: Tyrel Datwyler Tested-by: Shashank MS --- arch/powerpc/include/

[PATCH v7 5/9] powerpc/pseries: Receive payload with ibm,receive-hvpipe-msg RTAS

2025-09-09 Thread Haren Myneni
ibm,receive-hvpipe-msg RTAS call is used to receive data from the source (Ex: Hardware Management Console) over the hypervisor pipe. The hypervisor will signal the OS via a Hypervisor Pipe Event external interrupt when data is available to be received from the pipe and the event message has the sou

[PATCH v7 9/9] powerpc/pseries: HVPIPE changes to support migration

2025-09-09 Thread Haren Myneni
The hypervisor assigns one pipe per partition for all sources and assigns new pipe after migration. Also the partition ID that is used by source as its target ID may be changed after the migration. So disable hvpipe during SUSPEND event with ‘hvpipe enable’ system parameter value = 0 and enable it

[PATCH v7 7/9] powerpc/pseries: Enable HVPIPE event message interrupt

2025-09-09 Thread Haren Myneni
The hypervisor signals the OS via a Hypervisor Pipe Event external interrupt when data is available to be received from the pipe. Then the OS should call RTAS check-exception and provide the input Event Mask as defined for the ‘ibm,hvpipe-msg-events’. In response, check-exception will return an ev

[PATCH v7 4/9] powerpc/pseries: Send payload with ibm,send-hvpipe-msg RTAS

2025-09-09 Thread Haren Myneni
ibm,send-hvpipe-msg RTAS call is used to send data to the source (Ex: Hardware Management Console) over the hypervisor pipe. The maximum data length of 4048 bytes is supported with this RTAS call right now. The user space uses write() to send this payload which invokes this RTAS. Then the write ret

[PATCH v7 3/9] powerpc/pseries: Add papr-hvpipe char driver for HVPIPE interfaces

2025-09-09 Thread Haren Myneni
The hypervisor provides ibm,send-hvpipe-msg and ibm,receive-hvpipe-msg RTAS calls which can be used by the partition to communicate through an inband hypervisor channel with different external sources such as Hardware Management Console (HMC). The information exchanged, whether it be messages, raw

[RFC V2 7/8] powerpc: Enable IRQ generic entry/exit path.

2025-09-09 Thread Mukesh Kumar Chaurasiya
Enable generic entry/exit path for ppc irq. Signed-off-by: Mukesh Kumar Chaurasiya --- arch/powerpc/Kconfig| 1 + arch/powerpc/include/asm/entry-common.h | 93 ++--- arch/powerpc/include/asm/interrupt.h| 492 +++- arch/powerpc/kernel/interrupt.c