Re: [PATCH 0/3] Fairphone 5 DisplayPort over USB-C support

2025-02-26 Thread Luca Weiss
On Wed Feb 26, 2025 at 6:44 PM CET, Konrad Dybcio wrote: > On 26.02.2025 3:10 PM, Luca Weiss wrote: >> This series adds all the necessary bits to enable DisplayPort-out over >> USB-C on Fairphone 5. >> >> There's currently a dt validation error with this, not quite sure how to >> resolve this: >>

Re: [PATCH v9 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-02-26 Thread Matthew Wilcox
On Wed, Feb 26, 2025 at 04:00:25PM -0500, Zi Yan wrote: > +static int __split_unmapped_folio(struct folio *folio, int new_order, > + struct page *split_at, struct page *lock_at, > + struct list_head *list, pgoff_t end, > + struct xa_state *xas, struct address_spa

[PATCH v3 2/2] selftests/lib.mk: Introduce check to validate required dependencies

2025-02-26 Thread Siddharth Menon
Currently, kselftests does not have a generalised mechanism to skip compilation and run tests when required kernel configuration flags are missing. This patch introduces a check to validate the presence of required config flags specified in the selftest config files. In case scripts/config or the

[PATCH v3 0/2 RESEND] update kselftest framework to check for required configs

2025-02-26 Thread Siddharth Menon
Currently, kselftests does not have a generalised mechanism to skip compilation and run tests when required kernel configuration options are disabled. This patch series adresses this issue by checking whether all required configs from selftest//config are enabled in the current kernel Siddharth M

[PATCH v3 1/2 RESEND] selftests: Introduce script to validate required dependencies

2025-02-26 Thread Siddharth Menon
This patch adds a script to validate that the current kernel configuration satisfies the requirements for selftests by comparing the current kernel configs against the required selftest configs. The script also runs kselftest_deps.sh to check for any missing libraries required by the selftest. A

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-26 Thread Joe Damato
On Thu, Feb 27, 2025 at 12:18:33PM +0800, Jason Wang wrote: > On Thu, Feb 27, 2025 at 6:13 AM Michael S. Tsirkin wrote: > > > > On Wed, Feb 26, 2025 at 03:27:42PM -0500, Joe Damato wrote: > > > On Wed, Feb 26, 2025 at 01:08:49PM -0500, Joe Damato wrote: > > > > On Wed, Feb 26, 2025 at 01:03:09PM -

Re: [PATCH 3/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C

2025-02-26 Thread Dmitry Baryshkov
On Wed, Feb 26, 2025 at 03:10:20PM +0100, Luca Weiss wrote: > Extend the USB graph to connect the OCP96011 switch, the PTN36502 > redriver, the USB controllers and the MDSS, so that DisplayPort over > USB-C is working. > > Signed-off-by: Luca Weiss > --- > arch/arm64/boot/dts/qcom/qcm6490-fairph

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-26 Thread Jason Wang
On Thu, Feb 27, 2025 at 6:13 AM Michael S. Tsirkin wrote: > > On Wed, Feb 26, 2025 at 03:27:42PM -0500, Joe Damato wrote: > > On Wed, Feb 26, 2025 at 01:08:49PM -0500, Joe Damato wrote: > > > On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote: > > > > On Wed, Feb 26, 2025 at 01:48:50PM +08

[PATCH] KVM: selftests: access_tracking_perf_test: add option to skip the sanity check

2025-02-26 Thread Maxim Levitsky
Add an option to skip sanity check of number of still idle pages, and force it on, in case hypervisor or NUMA balancing is detected. Signed-off-by: Maxim Levitsky --- .../selftests/kvm/access_tracking_perf_test.c | 23 +-- .../testing/selftests/kvm/include/test_util.h | 1 + too

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Hou Tao
Hi, On 2/27/2025 11:17 AM, Alexei Starovoitov wrote: > On Wed, Feb 26, 2025 at 6:43 PM Hou Tao wrote: lookup procedure A A: find the old element (instead of the new old) update procedure B B: delete the old element update pro

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Alexei Starovoitov
On Wed, Feb 26, 2025 at 6:43 PM Hou Tao wrote: > > >> > >> lookup procedure A > >> A: find the old element (instead of the new old) > >> > >> update procedure B > >> B: delete the old element > >> update procedure C on the same CPU: > >> C: r

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Hou Tao
Hi, On 2/27/2025 9:59 AM, Alexei Starovoitov wrote: > On Wed, Feb 26, 2025 at 5:48 PM Hou Tao wrote: >> Hi, >> >> On 2/27/2025 7:17 AM, Zvi Effron wrote: >>> On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov >>> wrote: On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > Hi, > > O

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Alexei Starovoitov
On Wed, Feb 26, 2025 at 5:48 PM Hou Tao wrote: > > Hi, > > On 2/27/2025 7:17 AM, Zvi Effron wrote: > > On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov > > wrote: > >> On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > >>> Hi, > >>> > >>> On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: > O

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Hou Tao
Hi, On 2/27/2025 7:17 AM, Zvi Effron wrote: > On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov > wrote: >> On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: >>> Hi, >>> >>> On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: > Hi Toke, > >>

[PATCH net-next v20 20/25] ovpn: implement peer add/get/dump/delete via netlink

2025-02-26 Thread Antonio Quartulli
This change introduces the netlink command needed to add, delete and retrieve/dump known peers. Userspace is expected to use these commands to handle known peer lifecycles. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/netlink.c | 677 - driver

[PATCH net-next v20 24/25] ovpn: add basic ethtool support

2025-02-26 Thread Antonio Quartulli
Implement support for basic ethtool functionality. Note that ovpn is a virtual device driver, therefore various ethtool APIs are just not meaningful and thus not implemented. Signed-off-by: Antonio Quartulli Reviewed-by: Andrew Lunn --- drivers/net/ovpn/main.c | 15 +++ 1 file chan

[PATCH net-next v20 21/25] ovpn: implement key add/get/del/swap via netlink

2025-02-26 Thread Antonio Quartulli
This change introduces the netlink commands needed to add, get, delete and swap keys for a specific peer. Userspace is expected to use these commands to create, inspect (non sensitive data only), destroy and rotate session keys for a specific peer. Signed-off-by: Antonio Quartulli --- drivers/n

[PATCH net-next v20 03/25] ovpn: add basic netlink support

2025-02-26 Thread Antonio Quartulli
This commit introduces basic netlink support with family registration/unregistration functionalities and stub pre/post-doit. More importantly it introduces the YAML uAPI description along with its auto-generated files: - include/uapi/linux/ovpn.h - drivers/net/ovpn/netlink-gen.c - drivers/net/ovpn

[PATCH net-next v20 25/25] testing/selftests: add test tool and scripts for ovpn module

2025-02-26 Thread Antonio Quartulli
The ovpn-cli tool can be compiled and used as selftest for the ovpn kernel module. [NOTE: it depends on libmedtls for decoding base64-encoded keys] ovpn-cli implements the netlink and RTNL APIs and can thus be integrated in any script for more automated testing. Along with the tool, a bunch of s

[PATCH net-next v20 23/25] ovpn: notify userspace when a peer is deleted

2025-02-26 Thread Antonio Quartulli
Whenever a peer is deleted, send a notification to userspace so that it can react accordingly. This is most important when a peer is deleted due to ping timeout, because it all happens in kernelspace and thus userspace has no direct way to learn about it. Signed-off-by: Antonio Quartulli --- dr

[PATCH net-next v20 22/25] ovpn: kill key and notify userspace in case of IV exhaustion

2025-02-26 Thread Antonio Quartulli
IV wrap-around is cryptographically dangerous for a number of ciphers, therefore kill the key and inform userspace (via netlink) should the IV space go exhausted. Userspace has two ways of deciding when the key has to be renewed before exhausting the IV space: 1) time based approach: after X se

[PATCH net-next v20 19/25] ovpn: add support for peer floating

2025-02-26 Thread Antonio Quartulli
A peer connected via UDP may change its IP address without reconnecting (float). Add support for detecting and updating the new peer IP/port in case of floating. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 8 ++ drivers/net/ovpn/peer.c | 243

[PATCH net-next v20 15/25] ovpn: implement multi-peer support

2025-02-26 Thread Antonio Quartulli
With this change an ovpn instance will be able to stay connected to multiple remote endpoints. This functionality is strictly required when running ovpn on an OpenVPN server. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/main.c | 68 - drivers/net/ovpn/ovpnpriv.h |

[PATCH net-next v20 14/25] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg

2025-02-26 Thread Antonio Quartulli
Userspace may want to pass the MSG_NOSIGNAL flag to tcp_sendmsg() in order to avoid generating a SIGPIPE. To pass this flag down the TCP stack a new skb sending API accepting a flags argument is introduced. Cc: Eric Dumazet Cc: Paolo Abeni Signed-off-by: Antonio Quartulli --- drivers/net/ovpn

[PATCH net-next v20 18/25] ovpn: add support for updating local UDP endpoint

2025-02-26 Thread Antonio Quartulli
In case of UDP links, the local endpoint used to communicate with a given peer may change without a connection restart. Add support for learning the new address in case of change. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/peer.c | 45 + dr

[PATCH net-next v20 17/25] ovpn: implement keepalive mechanism

2025-02-26 Thread Antonio Quartulli
OpenVPN supports configuring a periodic keepalive packet. message to allow the remote endpoint detect link failures. This change implements the keepalive sending and timer expiring logic. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 74 drivers/net/ovpn/i

[PATCH net-next v20 16/25] ovpn: implement peer lookup logic

2025-02-26 Thread Antonio Quartulli
In a multi-peer scenario there are a number of situations when a specific peer needs to be looked up. We may want to lookup a peer by: 1. its ID 2. its VPN destination IP 3. its transport IP/port couple For each of the above, there is a specific routing table referencing all peers for fast look u

[PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-02-26 Thread Antonio Quartulli
With this change ovpn is allowed to communicate to peers also via TCP. Parsing of incoming messages is implemented through the strparser API. Note that ovpn redefines sk_prot and sk_socket->ops for the TCP socket used to communicate with the peer. For this reason it needs to access inet6_stream_op

[PATCH net-next v20 11/25] ovpn: store tunnel and transport statistics

2025-02-26 Thread Antonio Quartulli
Byte/packet counters for in-tunnel and transport streams are now initialized and updated as needed. To be exported via netlink. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/Makefile | 1 + drivers/net/ovpn/io.c | 12 +++- drivers/net/ovpn/peer.c | 2 ++ drivers/net/ovpn

[PATCH net-next v20 10/25] ovpn: implement packet processing

2025-02-26 Thread Antonio Quartulli
This change implements encryption/decryption and encapsulation/decapsulation of OpenVPN packets. Support for generic crypto state is added along with a wrapper for the AEAD crypto kernel API. Signed-off-by: Antonio Quartulli --- drivers/net/Kconfig| 4 + drivers/net/ovpn/Makefile

[PATCH net-next v20 13/25] skb: implement skb_send_sock_locked_with_flags()

2025-02-26 Thread Antonio Quartulli
When sending an skb over a socket using skb_send_sock_locked(), it is currently not possible to specify any flag to be set in msghdr->msg_flags. However, we may want to pass flags the user may have specified, like MSG_NOSIGNAL. Extend __skb_send_sock() with a new argument 'flags' and add a new in

[PATCH net-next v20 07/25] ovpn: introduce the ovpn_socket object

2025-02-26 Thread Antonio Quartulli
This specific structure is used in the ovpn kernel module to wrap and carry around a standard kernel socket. ovpn takes ownership of passed sockets and therefore an ovpn specific objects is attached to them for status tracking purposes. Initially only UDP support is introduced. TCP will come in a

[PATCH net-next v20 09/25] ovpn: implement basic RX path (UDP)

2025-02-26 Thread Antonio Quartulli
Packets received over the socket are forwarded to the user device. Implementation is UDP only. TCP will be added by a later patch. Note: no decryption/decapsulation exists yet, packets are forwarded as they arrive without much processing. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/i

[PATCH net-next v20 08/25] ovpn: implement basic TX path (UDP)

2025-02-26 Thread Antonio Quartulli
Packets sent over the ovpn interface are processed and transmitted to the connected peer, if any. Implementation is UDP only. TCP will be added by a later patch. Note: no crypto/encapsulation exists yet. Packets are just captured and sent. Signed-off-by: Antonio Quartulli --- drivers/net/Kconf

[PATCH net-next v20 05/25] ovpn: keep carrier always on for MP interfaces

2025-02-26 Thread Antonio Quartulli
An ovpn interface configured in MP mode will keep carrier always on and let the user decide when to bring it administratively up and down. This way a MP node (i.e. a server) will keep its interface always up and running, even when no peer is connected. Signed-off-by: Antonio Quartulli --- drive

[PATCH net-next v20 06/25] ovpn: introduce the ovpn_peer object

2025-02-26 Thread Antonio Quartulli
An ovpn_peer object holds the whole status of a remote peer (regardless whether it is a server or a client). This includes status for crypto, tx/rx buffers, napi, etc. Only support for one peer is introduced (P2P mode). Multi peer support is introduced with a later patch. Along with the ovpn_pee

[PATCH net-next v20 04/25] ovpn: add basic interface creation/destruction/management routines

2025-02-26 Thread Antonio Quartulli
Add basic infrastructure for handling ovpn interfaces. Tested-by: Donald Hunter Signed-off-by: Antonio Quartulli --- Documentation/netlink/specs/rt_link.yaml | 16 + drivers/net/ovpn/Makefile| 1 + drivers/net/ovpn/io.c| 22 ++ drivers/net/ovpn/io

[PATCH net-next v20 02/25] net: introduce OpenVPN Data Channel Offload (ovpn)

2025-02-26 Thread Antonio Quartulli
OpenVPN is a userspace software existing since around 2005 that allows users to create secure tunnels. So far OpenVPN has implemented all operations in userspace, which implies several back and forth between kernel and user land in order to process packets (encapsulate/decapsulate, encrypt/decrypt

[PATCH net-next v20 01/25] mailmap: remove unwanted entry for Antonio Quartulli

2025-02-26 Thread Antonio Quartulli
anto...@openvpn.net is still used for sending patches under the OpenVPN Inc. umbrella, therefore this address should not be re-mapped. Cc: Andrew Morton Signed-off-by: Antonio Quartulli --- .mailmap | 1 - 1 file changed, 1 deletion(-) diff --git a/.mailmap b/.mailmap index a897c16d3baef92aa6

[PATCH net-next v20 00/25] Introducing OpenVPN Data Channel Offload

2025-02-26 Thread Antonio Quartulli
After some time of struggle trying to fix all hidden bugs that Sabrina has found...here is v20! Notable changes since v19: * copyright years updated to 2025 * rtnl_link_ops.newlink adapted to new signature * removed admindown del-peer-reason attribute from netlink API (it should have gone away i

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-26 Thread Alistair Popple
On Tue, Feb 25, 2025 at 12:04:35PM +0100, Danilo Krummrich wrote: > On Tue, Feb 25, 2025 at 04:50:05PM +1100, Alistair Popple wrote: > > Kind of, but given the current state of build_assert's and the impossiblity > > of > > debugging them should we avoid adding them until they can be fixed? > > I

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Zvi Effron
On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov wrote: > > On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > > > > Hi, > > > > On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: > > > On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: > > >> Hi Toke, > > >> > > >> On 2/6/2025 11:05 PM, Toke Høiland-J

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-26 Thread Michael S. Tsirkin
On Wed, Feb 26, 2025 at 03:27:42PM -0500, Joe Damato wrote: > On Wed, Feb 26, 2025 at 01:08:49PM -0500, Joe Damato wrote: > > On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote: > > > On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > > > > On Tue, Feb 25, 2025 at 10:05 AM Joe Da

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-26 Thread Michael S. Tsirkin
On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote: > On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > > On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > > > > > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping > > > can be accessed by user apps, ta

Re: [PATCH] selftests/dma: Fix bad array reference.

2025-02-26 Thread Shuah Khan
On 2/25/25 18:31, liuye wrote: Friendly ping. 在 2025/2/6 10:12, Liu Ye 写道: dir[directions] should be directions[dir] to correctly index the directions array. Signed-off-by: Liu Ye --- tools/testing/selftests/dma/dma_map_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCHv2 1/2] vhost: return task creation error instead of NULL

2025-02-26 Thread Keith Busch
From: Keith Busch Lets callers distinguish why the vhost task creation failed. No one currently cares why it failed, so no runtime change from this patch, but that will not be the case for long. Signed-off-by: Keith Busch --- arch/x86/kvm/mmu/mmu.c | 2 +- drivers/vhost/vhost.c | 2 +- kernel

[PATCHv2 2/2] kvm: retry nx_huge_page_recovery_thread creation

2025-02-26 Thread Keith Busch
From: Sean Christopherson A VMM may send a signal to its threads while they've entered KVM_RUN. If that thread happens to be trying to make the huge page recovery vhost task, it will fail with -ERESTARTNOINTR. We need to retry if that happens, so make call_once complete only if what it called was

[PATCHv2 0/2] kvm/x86: vhost task creation failure handling

2025-02-26 Thread Keith Busch
From: Keith Busch The suggestion from Sean appears to be successful, so sending out a new version for consideration. Background: The crosvm VMM might send signals to its threads that have entered KVM_RUN. The signal specifically is SIGRTRMIN from here: https://github.com/google/crosvm/blob/m

Re: [PATCH v2 2/2] Revert "selftests: kselftest: Fix build failure with NOLIBC"

2025-02-26 Thread Shuah Khan
On 2/9/25 13:27, Thomas Weißschuh wrote: This reverts commit 16767502aa990cca2cb7d1372b31d328c4c85b40. Nolibc gained support for uname(2) and sscanf(3) which are the dependencies of ksft_min_kernel_version(). So re-enable support for ksft_min_kernel_version() under nolibc. Signed-off-by: Thoma

Re: [PATCH v2] selftests/vDSO: fix GNU hash table entry size for s390x

2025-02-26 Thread Shuah Khan
On 2/26/25 12:37, Vasily Gorbik wrote: On Tue, Feb 18, 2025 at 12:52:31AM +0100, Vasily Gorbik wrote: On Mon, Feb 17, 2025 at 02:04:18PM +0100, Thomas Weißschuh wrote: Commit 14be4e6f3522 ("selftests: vDSO: fix ELF hash table entry size for s390x") changed the type of the ELF hash table entries

Re: [PATCH v2 00/16] selftests: vDSO: parse_vdso: Make compatible with nolibc

2025-02-26 Thread Shuah Khan
On 2/26/25 04:44, Thomas Weißschuh wrote: For testing the functionality of the vDSO, it is necessary to build userspace programs for multiple different architectures. It is additional work to acquire matching userspace cross-compilers with full C libraries and then building root images out of tho

Re: [PATCH v3 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-26 Thread Boqun Feng
On Wed, Feb 26, 2025 at 09:48:52PM +0100, Uladzislau Rezki wrote: > Hello, Boqun. > > > Hi Ulad, > > > > On Tue, Feb 25, 2025 at 12:00:20PM +0100, Uladzislau Rezki (Sony) wrote: > > > Switch for using of get_state_synchronize_rcu_full() and > > > poll_state_synchronize_rcu_full() pair for debug a

[PATCH v9 8/8] selftests/mm: add tests for folio_split(), buddy allocator like split

2025-02-26 Thread Zi Yan
It splits page cache folios to orders from 0 to 8 at different in-folio offset. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: John Hubbard Cc: Kefeng Wang Cc: Kirill A. Shuemov Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Ryan Roberts Cc: Yang Shi Cc: Yu Zhao

[PATCH v9 7/8] mm/truncate: use buddy allocator like folio split for truncate operation

2025-02-26 Thread Zi Yan
Instead of splitting the large folio uniformly during truncation, try to use buddy allocator like split at the start of truncation range to minimize the number of resulting folios if it is supported. try_folio_split() is introduced to use folio_split() if supported and fall back to uniform split ot

[PATCH v9 6/8] mm/huge_memory: add folio_split() to debugfs testing interface

2025-02-26 Thread Zi Yan
This allows to test folio_split() by specifying an additional in folio page offset parameter to split_huge_page debugfs interface. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: John Hubbard Cc: Kefeng Wang Cc: Kirill A. Shuemov Cc: Matthew Wilcox Cc: Miao

[PATCH v9 4/8] mm/huge_memory: add buddy allocator like (non-uniform) folio_split()

2025-02-26 Thread Zi Yan
folio_split() splits a large folio in the same way as buddy allocator splits a large free page for allocation. The purpose is to minimize the number of folios after the split. For example, if user wants to free the 3rd subpage in a order-9 folio, folio_split() will split the order-9 folio as: O-

[PATCH v9 5/8] mm/huge_memory: remove the old, unused __split_huge_page()

2025-02-26 Thread Zi Yan
Now split_huge_page_to_list_to_order() uses the new backend split code in __folio_split_without_mapping(), the old __split_huge_page() and __split_huge_page_tail() can be removed. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc: Hugh Dickins Cc: John Hubbard Cc: Kefeng Wang Cc

[PATCH v9 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-02-26 Thread Zi Yan
This is a preparation patch, both added functions are not used yet. The added __split_unmapped_folio() is able to split a folio with its mapping removed in two manners: 1) uniform split (the existing way), and 2) buddy allocator like split. The added __split_folio_to_order() can split a folio int

[PATCH v9 3/8] mm/huge_memory: move folio split common code to __folio_split()

2025-02-26 Thread Zi Yan
This is a preparation patch for folio_split(). In the upcoming patch folio_split() will share folio unmapping and remapping code with split_huge_page_to_list_to_order(), so move the code to a common function __folio_split() first. Signed-off-by: Zi Yan Cc: Baolin Wang Cc: David Hildenbrand Cc:

[PATCH v9 1/8] xarray: add xas_try_split() to split a multi-index entry

2025-02-26 Thread Zi Yan
A preparation patch for non-uniform folio split, which always split a folio into half iteratively, and minimal xarray entry split. Currently, xas_split_alloc() and xas_split() always split all slots from a multi-index entry. They cost the same number of xa_node as the to-be-split slots. For exam

[PATCH v9 0/8] Buddy allocator like (or non-uniform) folio split

2025-02-26 Thread Zi Yan
Hi all, This patchset adds a new buddy allocator like (or non-uniform) large folio split from a order-n folio to order-m with m < n. It reduces 1. the total number of after-split folios from 2^(n-m) to n-m+1; 2. the amount of memory needed for multi-index xarray split from 2^(n/6-m/6) to n/6-

Re: [PATCH v8 1/8] xarray: add xas_try_split() to split a multi-index entry

2025-02-26 Thread Zi Yan
On 26 Feb 2025, at 10:07, Baolin Wang wrote: > On 2025/2/26 23:00, Zi Yan wrote: >> On 26 Feb 2025, at 2:11, Baolin Wang wrote: >> >>> Hi Zi, >>> >>> On 2025/2/19 07:50, Zi Yan wrote: A preparation patch for non-uniform folio split, which always split a folio into half iteratively, and m

Re: [PATCH v3 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-26 Thread Uladzislau Rezki
Hello, Boqun. > Hi Ulad, > > On Tue, Feb 25, 2025 at 12:00:20PM +0100, Uladzislau Rezki (Sony) wrote: > > Switch for using of get_state_synchronize_rcu_full() and > > poll_state_synchronize_rcu_full() pair for debug a normal > > synchronize_rcu() call. > > > > Just using "not" full APIs to ident

[PATCH 2/4] KVM: riscv: selftests: Do not start the counter in the overflow handler

2025-02-26 Thread Atish Patra
There is no need to start the counter in the overflow handler as we intend to trigger precise number of LCOFI interrupts through these tests. The overflow irq handler has already stopped the counter. As a result, the stop call from the test function may return already supported error which is fine

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-26 Thread Joe Damato
On Wed, Feb 26, 2025 at 01:08:49PM -0500, Joe Damato wrote: > On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote: > > On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > > > On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > > > > > > > Use netif_queue_set_napi to map NAPIs t

[PATCH 4/4] KVM: riscv: selftests: Allow number of interrupts to be configurable

2025-02-26 Thread Atish Patra
It is helpful to vary the number of the LCOFI interrupts generated by the overflow test. Allow additional argument for overflow test to accommodate that. It can be easily cross-validated with /proc/interrupts output in the host. Signed-off-by: Atish Patra --- tools/testing/selftests/kvm/riscv/sb

[PATCH 3/4] KVM: riscv: selftests: Change command line option

2025-02-26 Thread Atish Patra
The PMU test commandline option takes an argument to disable a certain test. The initial assumption behind this was a common use case is just to run all the test most of the time. However, running a single test seems more useful instead. Especially, the overflow test has been helpful to validate PM

[PATCH 0/4] RISC-V KVM PMU fix and selftest improvement

2025-02-26 Thread Atish Patra
This series adds a fix for KVM PMU code and improves the pmu selftest by allowing generating precise number of interrupts. It also provided another additional option to the overflow test that allows user to generate custom number of LCOFI interrupts. Signed-off-by: Atish Patra --- Atish Patra (4)

[PATCH 1/4] RISC-V: KVM: Disable the kernel perf counter during configure

2025-02-26 Thread Atish Patra
The perf event should be marked disabled during the creation as it is not ready to be scheduled until there is SBI PMU start call or config matching is called with auto start. Otherwise, event add/start gets called during perf_event_create_kernel_counter function. It will be enabled and scheduled t

Re: [RFC 2/2] kvm: retry nx_huge_page_recovery_thread creation

2025-02-26 Thread Keith Busch
On Wed, Feb 26, 2025 at 12:13:42PM -0800, Sean Christopherson wrote: > I much prefer my (misguided in the original context[*]) approach of marking > the > call_once() COMPLETED if and only if it succeeds. I have a new appreciation for this approach given our recent discoveries. I was mistaken in

Re: [RFC 2/2] kvm: retry nx_huge_page_recovery_thread creation

2025-02-26 Thread Sean Christopherson
On Tue, Feb 25, 2025, Keith Busch wrote: > From: Keith Busch > > A VMM may send a signal to its threads while they've entered KVM_RUN. If > that thread happens to be trying to make the huge page recovery vhost > task, then it fails with -ERESTARTNOINTR. We need to retry if that > happens, so we c

[PATCH v2 0/3] selftests/net: deflake GRO tests and fix return value and output

2025-02-26 Thread Kevin Krakauer
The GRO selftests can flake and have some confusing behavior. These changes make the output and return value of GRO behave as expected, then deflake the tests. v2: - Split into multiple commits. - Reduced napi_defer_hard_irqs to 1. - Reduced gro_flush_timeout to 100us. - Fixed comment that wasn't

Re: [PATCH v2] selftests/vDSO: fix GNU hash table entry size for s390x

2025-02-26 Thread Vasily Gorbik
On Tue, Feb 18, 2025 at 12:52:31AM +0100, Vasily Gorbik wrote: > On Mon, Feb 17, 2025 at 02:04:18PM +0100, Thomas Weißschuh wrote: > > Commit 14be4e6f3522 ("selftests: vDSO: fix ELF hash table entry size for > > s390x") > > changed the type of the ELF hash table entries to 64bit on s390x. > > Howe

Re: [PATCH bpf-next v3 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-26 Thread Marcus Wichelmann
Am 26.02.25 um 20:00 schrieb Stanislav Fomichev: On 02/26, Marcus Wichelmann wrote: Am 24.02.25 um 18:14 schrieb Stanislav Fomichev: On 02/24, Marcus Wichelmann wrote: [...] +void test_xdp_context_tuntap(void) tap0 is already used by lwt tests, so there is a chance this new test will clash

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-26 Thread Davidlohr Bueso
On Wed, 26 Feb 2025, Alexei Starovoitov wrote: On Wed, Feb 26, 2025 at 9:01???AM Davidlohr Bueso wrote: On Fri, 14 Feb 2025, Vlastimil Babka wrote: >From: Sebastian Andrzej Siewior > >In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect >critical section, but it doesn't preven

[PATCH v2 3/3] selftests/net: deflake GRO tests

2025-02-26 Thread Kevin Krakauer
GRO tests are timing dependent and can easily flake. This is partially mitigated in gro.sh by giving each subtest 3 chances to pass. However, this still flakes on some machines. Reduce the flakiness by: - Bumping retries to 6. - Setting napi_defer_hard_irqs to 1 to reduce the chance that GRO is

[PATCH v2 2/3] selftests/net: only print passing message in GRO tests when tests pass

2025-02-26 Thread Kevin Krakauer
gro.c:main no longer erroneously claims a test passes when running as a sender. Tested: Ran `gro.sh -t large` to verify the sender no longer prints a status. Signed-off-by: Kevin Krakauer --- tools/testing/selftests/net/gro.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff -

[PATCH v2 1/3] selftests/net: have `gro.sh -t` return a correct exit code

2025-02-26 Thread Kevin Krakauer
Modify gro.sh to return a useful exit code when the -t flag is used. It formerly returned 0 no matter what. Tested: Ran `gro.sh -t large` and verified that test failures return 1. Signed-off-by: Kevin Krakauer --- tools/testing/selftests/net/gro.sh | 3 ++- 1 file changed, 2 insertions(+), 1 del

Re: [PATCH net v2] selftests: drv-net: Check if combined-count exists

2025-02-26 Thread David Wei
On 2025-02-26 10:19, Joe Damato wrote: > Some drivers, like tg3, do not set combined-count: > > $ ethtool -l enp4s0f1 > Channel parameters for enp4s0f1: > Pre-set maximums: > RX: 4 > TX: 4 > Other:n/a > Combined: n/a > Current hardware settings: > RX:

Re: [PATCH v2 7/7] iommu: Turn iova_cookie to dma-iommu private pointer

2025-02-26 Thread Nicolin Chen
On Wed, Feb 26, 2025 at 01:36:10PM -0400, Jason Gunthorpe wrote: > On Tue, Feb 25, 2025 at 06:25:27PM -0800, Nicolin Chen wrote: > > On Fri, Feb 21, 2025 at 10:39:59AM -0400, Jason Gunthorpe wrote: > > > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > > > index 99dd72998cb7f7..082274e8

Re: [PATCH v2 7/7] iommu: Turn iova_cookie to dma-iommu private pointer

2025-02-26 Thread Jason Gunthorpe
On Wed, Feb 26, 2025 at 10:57:00AM -0800, Nicolin Chen wrote: > OK, I see. But we are also changing the behavior for the > !CONFIG_IOMMU_DMA configuration, in which case all other iommu > functions seem to return -ENODEV. And I assume we would need a > justification for such a change? > > Perhaps,

Re: [PATCH bpf-next v3 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-26 Thread Stanislav Fomichev
On 02/26, Marcus Wichelmann wrote: > Am 24.02.25 um 18:14 schrieb Stanislav Fomichev: > > On 02/24, Marcus Wichelmann wrote: > > > Add a selftest that creates a tap device, attaches XDP and TC programs, > > > writes a packet with a test payload into the tap device and checks the > > > test result.

Re: [PATCH v3 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-26 Thread Boqun Feng
Hi Ulad, On Tue, Feb 25, 2025 at 12:00:20PM +0100, Uladzislau Rezki (Sony) wrote: > Switch for using of get_state_synchronize_rcu_full() and > poll_state_synchronize_rcu_full() pair for debug a normal > synchronize_rcu() call. > > Just using "not" full APIs to identify if a grace period > is pass

Re: [RFC PATCH 14/39] KVM: guest_memfd: hugetlb: initialization and cleanup

2025-02-26 Thread Ackerley Tng
Ackerley Tng writes: > Peter Xu writes: > >> On Tue, Sep 10, 2024 at 11:43:45PM +, Ackerley Tng wrote: >>> +/** >>> + * Removes folios in range [@lstart, @lend) from page cache of inode, >>> updates >>> + * inode metadata and hugetlb reservations. >>> + */ >>> +static void kvm_gmem_hugetlb_

Re: [PATCH bpf-next v3 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-26 Thread Marcus Wichelmann
Am 24.02.25 um 18:14 schrieb Stanislav Fomichev: On 02/24, Marcus Wichelmann wrote: Add a selftest that creates a tap device, attaches XDP and TC programs, writes a packet with a test payload into the tap device and checks the test result. This test ensures that the XDP metadata support in the t

Re: [PATCH sched_ext/for-6.15] selftests/sched_ext: Add NUMA-aware scheduler test

2025-02-26 Thread Tejun Heo
On Wed, Feb 26, 2025 at 07:50:57AM +0100, Andrea Righi wrote: > Add a selftest to validate the behavior of the NUMA-aware scheduler > functionalities, including idle CPU selection within nodes, per-node > DSQs and CPU to node mapping. > > Signed-off-by: Andrea Righi Applied to sched_ext/for-6.15

[PATCH net v2] selftests: drv-net: Check if combined-count exists

2025-02-26 Thread Joe Damato
Some drivers, like tg3, do not set combined-count: $ ethtool -l enp4s0f1 Channel parameters for enp4s0f1: Pre-set maximums: RX: 4 TX: 4 Other: n/a Combined: n/a Current hardware settings: RX: 4 TX: 1 Other: n/a Combined:

Re: [PATCH v3 1/3] rcutorture: Allow a negative value for nfakewriters

2025-02-26 Thread Uladzislau Rezki
On Wed, Feb 26, 2025 at 10:04:35AM -0800, Paul E. McKenney wrote: > On Wed, Feb 26, 2025 at 12:49:41PM -0500, Joel Fernandes wrote: > > > > > > On 2/26/2025 9:29 AM, Uladzislau Rezki wrote: > > > On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote: > > >> On Tue, Feb 25, 2025 at 12:00:

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-26 Thread Joe Damato
On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote: > On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > > On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > > > > > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping > > > can be accessed by user apps, ta

Re: [PATCH v3 1/3] rcutorture: Allow a negative value for nfakewriters

2025-02-26 Thread Paul E. McKenney
On Wed, Feb 26, 2025 at 12:49:41PM -0500, Joel Fernandes wrote: > > > On 2/26/2025 9:29 AM, Uladzislau Rezki wrote: > > On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote: > >> On Tue, Feb 25, 2025 at 12:00:18PM +0100, Uladzislau Rezki (Sony) wrote: > >>> Currently "nfakewriters" para

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-26 Thread Joe Damato
On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > > > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping > > can be accessed by user apps, taking care to hold RTNL as needed. > > I may miss something but I wond

Re: [PATCH v3 1/3] rcutorture: Allow a negative value for nfakewriters

2025-02-26 Thread Joel Fernandes
On 2/26/2025 9:29 AM, Uladzislau Rezki wrote: > On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote: >> On Tue, Feb 25, 2025 at 12:00:18PM +0100, Uladzislau Rezki (Sony) wrote: >>> Currently "nfakewriters" parameter can be set to any value but >>> there is no possibility to adjust it

Re: [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 6:45 PM, Konrad Dybcio wrote: > On 26.02.2025 6:40 PM, Konrad Dybcio wrote: >> On 26.02.2025 3:10 PM, Luca Weiss wrote: >>> Add a node for the "Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo >>> redriver" found on this device. >>> >>> Signed-off-by: Luca Weiss >>> --- >> >> Reviewed

Re: [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 6:40 PM, Konrad Dybcio wrote: > On 26.02.2025 3:10 PM, Luca Weiss wrote: >> Add a node for the "Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo >> redriver" found on this device. >> >> Signed-off-by: Luca Weiss >> --- > > Reviewed-by: Konrad Dybcio Actually, please also rename the

Re: [PATCH 0/3] Fairphone 5 DisplayPort over USB-C support

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 3:10 PM, Luca Weiss wrote: > This series adds all the necessary bits to enable DisplayPort-out over > USB-C on Fairphone 5. > > There's currently a dt validation error with this, not quite sure how to > resolve this: > > arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dtb: typec-mu

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-26 Thread Indu Bhagat
On 2/26/25 2:23 AM, Puranjay Mohan wrote: Indu Bhagat writes: On 2/25/25 3:54 PM, Weinan Liu wrote: On Tue, Feb 25, 2025 at 11:38 AM Indu Bhagat wrote: On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote: I already have a WIP patch to add sframe support to the kernel module. However, it is

Re: [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add OCP96011 audio switch

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 3:10 PM, Luca Weiss wrote: > Add a node for the OCP96011 on the board which is used to handle USB-C > analog audio switch and handles the SBU mux for DisplayPort-over-USB-C. > > Signed-off-by: Luca Weiss > --- Reviewed-by: Konrad Dybcio Konrad

Re: [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 3:10 PM, Luca Weiss wrote: > Add a node for the "Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo > redriver" found on this device. > > Signed-off-by: Luca Weiss > --- Reviewed-by: Konrad Dybcio Konrad

Re: [PATCH bpf-next v3 4/6] selftests/bpf: refactor xdp_context_functional test and bpf program

2025-02-26 Thread Marcus Wichelmann
Am 25.02.25 um 19:23 schrieb Willem de Bruijn: Marcus Wichelmann wrote: Am 24.02.25 um 16:29 schrieb Marcus Wichelmann: [...] + /* By default, Linux sends IPv6 multicast listener reports which +* interfere with this test. Set the IFF_NOARP flag to ensure +* silence on the

Re: [PATCH v2] dt-bindings: remoteproc: qcom,sm6115-pas: Use recommended MBN firmware format in DTS example

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 3:51 PM, Krzysztof Kozlowski wrote: > All Qualcomm firmwares uploaded to linux-firmware are in MBN format, > instead of split MDT. No functional changes, just correct the DTS > example so people will not rely on unaccepted files. > > Signed-off-by: Krzysztof Kozlowski > --- Review

  1   2   >