Re: [PATCH v4 1/1] selftests/mm/uffd: Refactor non-composite global vars into struct

2025-06-15 Thread Ujwal Kundur
> And I hit this: > > # - > # running ./uffd-unit-tests > # - > # Testing UFFDIO_API (with syscall)... done > # Testing UFFDIO_API (with /dev/userfaultfd)... done > # Testing register-ioctls on anon... ERROR: munmap (errno=22, > @uffd-common.c:277) >

[PATCH v12 1/1] vhost: Reintroduces support of kthread API and adds mode selection

2025-06-15 Thread Cindy Lu
This patch reintroduces kthread mode for vhost workers and provides configuration to select between kthread and task worker. - Add 'fork_owner' parameter to vhost_dev to let users select kthread or task mode. Default mode is task mode(VHOST_FORK_OWNER_TASK). - Reintroduce kthread mode support:

[PATCH v12 0/1] vhost: Add support of kthread API

2025-06-15 Thread Cindy Lu
In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), the vhost now uses vhost_task and operates as a child of the owner thread. This aligns with containerization principles. However, this change has caused confusion for some legacy userspace applications. Therefore, we

[PATCH 0/1] selftests/memfd: skip hugetlbfs test if not supported

2025-06-15 Thread Po-Hsu Lin
Check hugetlbfs support before starting tests in run_hugetlbfs_test.sh. Otherwise on a system that does not support hugetlbfs the free huge pages availability check will fail with: ./run_hugetlbfs_test.sh: line 47: [: -lt: unary operator expected ./run_hugetlbfs_test.sh: line 60: 12577 Aborted

[PATCH 1/1] selftests/memfd: skip hugetlbfs test if not supported

2025-06-15 Thread Po-Hsu Lin
Check hugetlbfs support before starting tests in run_hugetlbfs_test.sh. Otherwise on a system that does not support hugetlbfs the free huge pages availability check will fail with: ./run_hugetlbfs_test.sh: line 47: [: -lt: unary operator expected ./run_hugetlbfs_test.sh: line 60: 12577 Aborted

[PATCH rc 0/4] Fix iommufd selftest FAIL and warnings with v6.16

2025-06-15 Thread Nicolin Chen
A few selftest harness changes being merged to v6.16, which exposed some bugs and vulnerabilities in the iommufd selftest code. Fix them properly. Note that the patch fixing the build warnings at mfd is not ideal, as it has possibly hit some corner case in the gcc: https://lore.kernel.org/all/aei8

[RESEND PATCH] selftests/pidfd: align stack to fix SP alignment exception

2025-06-15 Thread Shuai Xue
The pidfd_test fails on the ARM64 platform with the following error: Bail out! pidfd_poll check for premature notification on child thread exec test: Failed When exception-trace is enabled, the kernel logs the details: #echo 1 > /proc/sys/debug/exception-trace #dmesg | tail -n 20

[PATCH rc 4/4] iommufd/selftest: Fix build warnings due to uninitialized mfd

2025-06-15 Thread Nicolin Chen
Commit 869c788909b9 ("selftests: harness: Stop using setjmp()/longjmp()") changed the harness structure. For some unknown reason, two build warnings occur to the iommufd selftest: iommufd.c: In function ‘wrapper_iommufd_mock_domain_all_aligns’: iommufd.c:1807:17: warning: ‘mfd’ may be used uniniti

[PATCH rc 1/4] iommufd/selftest: Fix iommufd_dirty_tracking with large hugepage sizes

2025-06-15 Thread Nicolin Chen
The hugepage test cases of iommufd_dirty_tracking have the 64MB and 128MB coverages. Both of them are smaller than the default hugepage size 512MB, when CONFIG_PAGE_SIZE_64KB=y. However, these test cases have a variant of using huge pages, which would mmap(MAP_HUGETLB) using these smaller sizes tha

[PATCH rc 2/4] iommufd/selftest: Add missing close(mfd) in memfd_mmap()

2025-06-15 Thread Nicolin Chen
Do not forget to close mfd in the error paths, since none of the callers would close it when ASSERT_NE(MAP_FAILED, buf) fails. Fixes: 0bcceb1f51c7 ("iommufd: Selftest coverage for IOMMU_IOAS_MAP_FILE") Cc: sta...@vger.kernel.org Signed-off-by: Nicolin Chen --- tools/testing/selftests/iommu/iommu

[PATCH rc 3/4] iommufd/selftest: Add asserts testing global mfd

2025-06-15 Thread Nicolin Chen
The mfd and mfd_buffer will be used in the tests directly without an extra check. Test them in setup_sizes() to ensure they are safe to use. Fixes: 0bcceb1f51c7 ("iommufd: Selftest coverage for IOMMU_IOAS_MAP_FILE") Cc: sta...@vger.kernel.org Signed-off-by: Nicolin Chen --- tools/testing/selftes

Re: [PATCH v4 0/7] Add managed SOFT RESERVE resource handling

2025-06-15 Thread Zhijian Li (Fujitsu)
On 05/06/2025 02:59, Koralahalli Channabasappa, Smita wrote: >> >> >> To the CXL community, >> >> The scenarios mentioned here essentially cover what a correct firmware may  >> provide. However, >> I would like to discuss one more scenario that I can simulate with a  >> modified QEMU: >> The E820

[PATCH net-next v4] page_pool: import Jesper's page_pool benchmark

2025-06-15 Thread Mina Almasry
From: Jesper Dangaard Brouer We frequently consult with Jesper's out-of-tree page_pool benchmark to evaluate page_pool changes. Import the benchmark into the upstream linux kernel tree so that (a) we're all running the same version, (b) pave the way for shared improvements, and (c) maybe one day

[PATCH v2 2/4] dt-bindings: arm: qcom: Add MSM8976 BQ Aquaris X5 Plus

2025-06-15 Thread André Apitzsch via B4 Relay
From: André Apitzsch BQ Aquaris X5 Plus (Longcheer L9360) is a smartphone based on MSM8976 SoC. Signed-off-by: André Apitzsch --- Documentation/devicetree/bindings/arm/qcom.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Document

[PATCH v2 3/4] arm64: dts: qcom: msm8976: Add sdc2 GPIOs

2025-06-15 Thread André Apitzsch via B4 Relay
From: André Apitzsch Downstream vendor code for reference: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blob/LA.BR.1.3.7.c26/arch/arm/boot/dts/qcom/msm8976-pinctrl.dtsi#L223-263 Signed-off-by: André Apitzsch --- arch/arm64/boot/dts/qcom/msm8976.dtsi | 36 +++

[PATCH v2 0/4] arm64: dts: qcom: msm8976-longcheer-l9360: Add initial device tree

2025-06-15 Thread André Apitzsch via B4 Relay
This dts adds support for BQ Aquaris X5 Plus (Longcheer L9360) released in 2016. Add a device tree with initial support for: - GPIO keys - NFC - SDHCI - Status LED - Touchscreen Signed-off-by: André Apitzsch --- Changes in v2: - Add Fixes and R-b tag - Move sdc2 GPIO definitions into msm8976.dt

[PATCH v2 4/4] arm64: dts: qcom: msm8976-longcheer-l9360: Add initial device tree

2025-06-15 Thread André Apitzsch via B4 Relay
From: André Apitzsch This dts adds support for BQ Aquaris X5 Plus (Longcheer L9360) released in 2016. Add a device tree with initial support for: - GPIO keys - NFC - SDHCI - Status LED - Touchscreen Signed-off-by: André Apitzsch --- arch/arm64/boot/dts/qcom/Makefile | 1 +

[PATCH v2 1/4] arm64: dts: qcom: msm8976: Make blsp_dma controlled-remotely

2025-06-15 Thread André Apitzsch via B4 Relay
From: André Apitzsch The blsp_dma controller is shared between the different subsystems, which is why it is already initialized by the firmware. We should not reinitialize it from Linux to avoid potential other users of the DMA engine to misbehave. In mainline this can be described using the "qc

[PATCH net-next v2 3/3] selftests: devmem: add ipv4 support to chunks test

2025-06-15 Thread Mina Almasry
Add ipv4 support to the recently added chunks tests, which was added as ipv6 only. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/devmem.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools/

[PATCH net-next v2 2/3] selftests: devmem: remove unused variable

2025-06-15 Thread Mina Almasry
Trivial fix to unused variable. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/ncdevmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/drivers/net/hw/ncdevmem.c index 02e4d3d7ded2..cc9b40d9

[PATCH net-next v2 1/3] netmem: fix netmem comments

2025-06-15 Thread Mina Almasry
Trivial fix to a couple of outdated netmem comments. No code changes, just more accurately describing current code. Signed-off-by: Mina Almasry --- v2: https://lore.kernel.org/netdev/20250613042804.3259045-2-almasrym...@google.com/ - Adjust comment for clearing lsb as (Jakub) --- include/net/

Virtio-IOMMU interrupt remapping design

2025-06-15 Thread Demi Marie Obenour
Virtio-IOMMU interrupt remapping turned out to be much harder than I realized. The main problem is that interrupt remapping is set up very early in boot. In fact, Linux calls the interrupt remapping probe function from the APIC initialization code: x86_64_probe_apic -> enable_IR_x2apic -> irq_rem

[PATCH] vhost: Fix typos in comments and clarity on alignof usage

2025-06-15 Thread Alok Tiwari
This patch fixes multiple typos and improves comment clarity across vhost.c. - Correct spelling errors: "thead" -> "thread", "RUNNUNG" -> "RUNNING" and "available". - Improve comment by replacing informal comment ("Supersize me!") with a clear description. - Use __alignof__ correctly on derefer

Re: [PATCH bpf 2/7] bpf/x86: prevent trampoline attachment when args location on stack is uncertain

2025-06-15 Thread Alexei Starovoitov
On Sun, Jun 15, 2025 at 7:00 AM Alexis Lothoré wrote: > > On Sat Jun 14, 2025 at 12:35 AM CEST, Alexei Starovoitov wrote: > > On Fri, Jun 13, 2025 at 1:59 AM Alexis Lothoré > > wrote: > >> > >> On Fri Jun 13, 2025 at 10:32 AM CEST, Peter Zijlstra wrote: > >> > On Fri, Jun 13, 2025 at 10:26:37AM +

[PATCH net 2/2] virtio-net: xsk: rx: move the xdp->data adjustment to buf_to_xdp()

2025-06-15 Thread Bui Quang Minh
This commit does not do any functional changes. It moves xdp->data adjustment for buffer other than first buffer to buf_to_xdp() helper so that the xdp_buff adjustment does not scatter over different functions. Signed-off-by: Bui Quang Minh --- drivers/net/virtio_net.c | 16 ++-- 1 f

[PATCH net 1/2] virtio-net: xsk: rx: fix the frame's length check

2025-06-15 Thread Bui Quang Minh
When calling buf_to_xdp, the len argument is the frame data's length without virtio header's length (vi->hdr_len). We check that len with xsk_pool_get_rx_frame_size() + vi->hdr_len to ensure the provided len does not larger than the allocated chunk size. The additional vi->hdr_len is beca

[PATCH net 0/2] virtio-net: xsk: rx: fix the frame's length check

2025-06-15 Thread Bui Quang Minh
Hi everyone, This series contains 2 patches for the zerocopy XDP receive path in virtio net - Patch 1: there is a difference between first buffer and the following buffers in this receive path. While the first buffer contains virtio header, the following ones do not. So the length of the remaining

Re: [PATCH v11 0/3] vhost: Add support of kthread API

2025-06-15 Thread Cindy Lu
On Thu, Jun 12, 2025 at 2:20 PM Michael S. Tsirkin wrote: > > On Mon, Jun 09, 2025 at 03:33:06PM +0800, Cindy Lu wrote: > > In this series, a new UAPI is implemented to allow > > userspace applications to configure their thread mode. > > > > Changelog v2: > > 1. Change the module_param's name to

Re: [PATCH v11 3/3] vhost: Add configuration controls for vhost worker's mode

2025-06-15 Thread Cindy Lu
On Thu, Jun 12, 2025 at 2:31 PM Michael S. Tsirkin wrote: > > On Mon, Jun 09, 2025 at 03:33:09PM +0800, Cindy Lu wrote: > > This patch introduces functionality to control the vhost worker mode: > > > > - Add two new IOCTLs: > > * VHOST_SET_FORK_FROM_OWNER: Allows userspace to select between > >

Re: [PATCH bpf 2/7] bpf/x86: prevent trampoline attachment when args location on stack is uncertain

2025-06-15 Thread Alexis Lothoré
On Sat Jun 14, 2025 at 12:35 AM CEST, Alexei Starovoitov wrote: > On Fri, Jun 13, 2025 at 1:59 AM Alexis Lothoré > wrote: >> >> On Fri Jun 13, 2025 at 10:32 AM CEST, Peter Zijlstra wrote: >> > On Fri, Jun 13, 2025 at 10:26:37AM +0200, Alexis Lothoré wrote: [...] >> If I need to respin, I'll rewr

Re: [PATCH][v2] virtio_fs: Remove redundant spinlock in virtio_fs_request_complete()

2025-06-15 Thread Stefan Hajnoczi
On Sun, Jun 15, 2025 at 9:21 AM lirongqing wrote: > > From: Li RongQing > > Since clear_bit is an atomic operation, the spinlock is redundant and > can be removed, reducing lock contention is good for performance. > > Signed-off-by: Li RongQing > --- > Diff with v1: remove unused variable "fpq"

Re: [PATCH] virtio_fs: Remove redundant spinlock in virtio_fs_request_complete()

2025-06-15 Thread Stefan Hajnoczi
On Fri, Jun 13, 2025 at 1:51 AM lirongqing wrote: > > From: Li RongQing > > Since clear_bit is an atomic operation, the spinlock is redundant and > can be removed, reducing lock contention is good for performance. > > Signed-off-by: Li RongQing > --- > fs/fuse/virtio_fs.c | 2 -- > 1 file chang

[PATCH][v2] virtio_fs: Remove redundant spinlock in virtio_fs_request_complete()

2025-06-15 Thread lirongqing
From: Li RongQing Since clear_bit is an atomic operation, the spinlock is redundant and can be removed, reducing lock contention is good for performance. Signed-off-by: Li RongQing --- Diff with v1: remove unused variable "fpq" fs/fuse/virtio_fs.c | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH v2] selftests: nettest: Fix typo in log and error messages for clarity

2025-06-15 Thread Alok Tiwari
This patch corrects several logging and error message in nettest.c: - Corrects function name in log messages "setsockopt" -> "getsockopt". - Closes missing parentheses in "setsockopt(IPV6_FREEBIND)". - Replaces misleading error text ("Invalid port") with the correct description ("Invalid prefix l