Re: [PATCH v4 09/14] selftests: harness: Move teardown conditional into test metadata

2025-06-11 Thread Nicolin Chen
On Wed, Jun 11, 2025 at 08:51:17PM -0300, Jason Gunthorpe wrote: > On Wed, Jun 11, 2025 at 04:43:00PM -0700, Nicolin Chen wrote: > > So, the test case sets an alignment with HUGEPAGE_SIZE=512MB while > > allocating buffer_size=64MB: > > rc = posix_memalign(&self->buffer, HUGEPAGE_SIZE, variant-

Re: [PATCH v2 1/3] mm/huge_memory: don't ignore queried cachemode in vmf_insert_pfn_pud()

2025-06-11 Thread David Hildenbrand
On 12.06.25 03:56, Alistair Popple wrote: On Wed, Jun 11, 2025 at 02:06:52PM +0200, David Hildenbrand wrote: We setup the cache mode but ... don't forward the updated pgprot to insert_pfn_pud(). Only a problem on x86-64 PAT when mapping PFNs using PUDs that require a special cachemode. Fix it

Re: [PATCH net] vsock/virtio: fix `rx_bytes` accounting for stream sockets

2025-06-11 Thread Michael S. Tsirkin
On Thu, Jun 12, 2025 at 01:32:01PM +0800, Xuewei Niu wrote: > No comments since last month. > > The patch [1], which adds SIOCINQ ioctl support for vsock, depends on this > patch. Could I get more eyes on this one? > > [1]: > https://lore.kernel.org/lkml/bbn4lvdwh42m2zvi3rdyws66y5ulew32rchtz3kxi

Re: [PATCH net] vsock/virtio: fix `rx_bytes` accounting for stream sockets

2025-06-11 Thread Xuewei Niu
> On Thu, Jun 12, 2025 at 01:32:01PM +0800, Xuewei Niu wrote: > > No comments since last month. > > > > The patch [1], which adds SIOCINQ ioctl support for vsock, depends on this > > patch. Could I get more eyes on this one? > > > > [1]: > > https://lore.kernel.org/lkml/bbn4lvdwh42m2zvi3rdyws66y

Re: [PATCH v2 1/3] mm/huge_memory: don't ignore queried cachemode in vmf_insert_pfn_pud()

2025-06-11 Thread David Hildenbrand
On 12.06.25 06:34, Dan Williams wrote: David Hildenbrand wrote: We setup the cache mode but ... don't forward the updated pgprot to insert_pfn_pud(). Only a problem on x86-64 PAT when mapping PFNs using PUDs that require a special cachemode. This is only a problem if the kernel mapped the pud

Re: [PATCH 1/2] selftests: khugepaged: fix the shmem collapse failure

2025-06-11 Thread Baolin Wang
On 2025/6/12 13:10, Dev Jain wrote: On 12/06/25 9:24 am, Baolin Wang wrote: When running the khugepaged selftest for shmem (./khugepaged all:shmem), I encountered the following test failures: " Run test: collapse_full (khugepaged:shmem) Collapse multiple fully populated PTE table Fail ..

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

2025-06-11 Thread Michael S. Tsirkin
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 > task mode (fork_owner=1) and kthread mode (fork_owner=0) > * VHOST

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

2025-06-11 Thread Michael S. Tsirkin
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 enforce_inherit_owner, and the default > value is true. > 2. Change

[PATCH 1/2] dt-bindings: remoteproc: qcom,sa8775p-pas: Correct the interrupt number

2025-06-11 Thread Lijuan Gao
Correct the interrupt number of ready and handover in the DTS example. Fixes: af5da7b0944c ("dt-bindings: remoteproc: qcom,sa8775p-pas: Document the SA8775p ADSP, CDSP and GPDSP") Signed-off-by: Lijuan Gao --- Documentation/devicetree/bindings/remoteproc/qcom,sa8775p-pas.yaml | 2 +- 1 file cha

Re: [PATCH v11 2/3] vhost: Reintroduce kthread mode support in vhost

2025-06-11 Thread Jason Wang
On Mon, Jun 9, 2025 at 3:34 PM Cindy Lu wrote: > > This patch reintroduces kthread mode support in vhost, > It also introduces struct vhost_worker_ops to abstract > worker create/stop/wakeup operations. > > * Bring back the original vhost_worker() implementation, > and renamed to vhost_run_work_

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

2025-06-11 Thread Jason Wang
On Mon, Jun 9, 2025 at 3:34 PM 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 > task mode (fork_owner=1) and kthread mode (fork_owner=0) > * VHOST_GET_FORK

Re: [PATCH v11 1/3] vhost: Add a new parameter in vhost_dev to allow user select kthread

2025-06-11 Thread Jason Wang
On Mon, Jun 9, 2025 at 3:34 PM Cindy Lu wrote: > > The vhost now uses vhost_task and workers as a child of the owner thread. > While this aligns with containerization principles, it confuses some > legacy userspace applications, therefore, we are reintroducing kthread > API support. > > Introduce

Re: [PATCH 2/2] selftests: mm: add shmem collpase as a default test item

2025-06-11 Thread Baolin Wang
On 2025/6/12 12:20, Bird, Tim wrote: collpase in the subject line should be collapse Good catch. Will fix the typo. Thanks. -Original Message- From: Baolin Wang Subject: [PATCH 2/2] selftests: mm: add shmem collpase as a default test item Currently, we only test anonymous memory

Re: [PATCH net] vsock/virtio: fix `rx_bytes` accounting for stream sockets

2025-06-11 Thread Xuewei Niu
No comments since last month. The patch [1], which adds SIOCINQ ioctl support for vsock, depends on this patch. Could I get more eyes on this one? [1]: https://lore.kernel.org/lkml/bbn4lvdwh42m2zvi3rdyws66y5ulew32rchtz3kxirqlllkr63@7toa4tcepax3/#t Thanks, Xuewei

Re: [PATCH 1/2] selftests: khugepaged: fix the shmem collapse failure

2025-06-11 Thread Dev Jain
On 12/06/25 9:24 am, Baolin Wang wrote: When running the khugepaged selftest for shmem (./khugepaged all:shmem), I encountered the following test failures: " Run test: collapse_full (khugepaged:shmem) Collapse multiple fully populated PTE table Fail ... Run test: collapse_single_pte_entry (

Re: [PATCH 2/2] selftests: mm: add shmem collpase as a default test item

2025-06-11 Thread Dev Jain
On 12/06/25 9:24 am, Baolin Wang wrote: Currently, we only test anonymous memory collapse by default. We should also add shmem collapse as a default test item to catch issues that could break the test cases. Signed-off-by: Baolin Wang --- tools/testing/selftests/mm/run_vmtests.sh | 4

Re: [PATCH v2 3/3] mm/huge_memory: don't mark refcounted folios special in vmf_insert_folio_pud()

2025-06-11 Thread Dan Williams
David Hildenbrand wrote: > Marking PUDs that map a "normal" refcounted folios as special is > against our rules documented for vm_normal_page(). > > Fortunately, there are not that many pud_special() check that can be > mislead and are right now rather harmless: e.g., none so far > bases decisions

RE: [PATCH 2/2] selftests: mm: add shmem collpase as a default test item

2025-06-11 Thread Bird, Tim
collpase in the subject line should be collapse -- Tim > -Original Message- > From: Baolin Wang > Subject: [PATCH 2/2] selftests: mm: add shmem collpase as a default test item > > Currently, we only test anonymous memory collapse by default. We should also > add shmem collapse as a def

Re: [PATCH v2 2/3] mm/huge_memory: don't mark refcounted folios special in vmf_insert_folio_pmd()

2025-06-11 Thread Dan Williams
David Hildenbrand wrote: > Marking PMDs that map a "normal" refcounted folios as special is > against our rules documented for vm_normal_page(). > > Fortunately, there are not that many pmd_special() check that can be > mislead, and most vm_normal_page_pmd()/vm_normal_folio_pmd() users that > woul

Re: [PATCH v2 1/3] mm/huge_memory: don't ignore queried cachemode in vmf_insert_pfn_pud()

2025-06-11 Thread Dan Williams
David Hildenbrand wrote: > We setup the cache mode but ... don't forward the updated pgprot to > insert_pfn_pud(). > > Only a problem on x86-64 PAT when mapping PFNs using PUDs that > require a special cachemode. This is only a problem if the kernel mapped the pud in advance of userspace mapping

Re: [PATCH v2 0/3] mm/huge_memory: vmf_insert_folio_*() and vmf_insert_pfn_pud() fixes

2025-06-11 Thread Dan Williams
Alistair Popple wrote: > On Wed, Jun 11, 2025 at 02:06:51PM +0200, David Hildenbrand wrote: > > This is v2 of > > "[PATCH v1 0/2] mm/huge_memory: don't mark refcounted pages special > > in vmf_insert_folio_*()" > > Now with one additional fix, based on mm/mm-unstable. > > > > While workin

Re: (subset) [PATCH v2 0/4] Add video clock controller for SM6350

2025-06-11 Thread Bjorn Andersson
On Mon, 24 Mar 2025 09:41:00 +0100, Luca Weiss wrote: > The driver for the SM6350 videocc has been lying around in some branches > of my git tree for a long time, let's upstream it. It doesn't get any > better by letting it age! > > Applied, thanks! [4/4] arm64: dts: qcom: sm6350: Add video c

Re: [PATCH v2 0/4] Add support for Sony Xperia Z Ultra (togari)

2025-06-11 Thread Bjorn Andersson
On Tue, 10 Jun 2025 20:34:51 +0200, Luca Weiss wrote: > Do some tweaks to the common file for the devices in the 'rhine' family > of Sony devices, and add a dts for togari. > > Applied, thanks! [1/4] ARM: dts: qcom: msm8974-sony-xperia-rhine: Enable USB charging commit: 702639bc50515c97

Re: [PATCH v2 0/3] Add devicetree aliases for mmc on multiple MSM8974 devices

2025-06-11 Thread Bjorn Andersson
On Tue, 10 Jun 2025 19:03:48 +0200, Luca Weiss wrote: > Add an alias for the internal storage so it always becomes mmcblk0 and > - where applicable - SD card becomes mmcblk1. > > This avoids issues with internal storage becoming mmcblk1 unexpectedly > and aligns this board with other boards that

[PATCH 2/2] selftests: mm: add shmem collpase as a default test item

2025-06-11 Thread Baolin Wang
Currently, we only test anonymous memory collapse by default. We should also add shmem collapse as a default test item to catch issues that could break the test cases. Signed-off-by: Baolin Wang --- tools/testing/selftests/mm/run_vmtests.sh | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH 1/2] selftests: khugepaged: fix the shmem collapse failure

2025-06-11 Thread Baolin Wang
When running the khugepaged selftest for shmem (./khugepaged all:shmem), I encountered the following test failures: " Run test: collapse_full (khugepaged:shmem) Collapse multiple fully populated PTE table Fail ... Run test: collapse_single_pte_entry (khugepaged:shmem) Collapse PTE table with si

Re: [PATCH 1/2] vhost-scsi: Fix typos and formatting in comments and logs

2025-06-11 Thread michael . christie
On 6/11/25 9:39 AM, Alok Tiwari wrote: > This patch corrects several minor typos and formatting issues. > Changes include: > > Fixing misspellings like in comments > - "explict" -> "explicit" > - "infight" -> "inflight", > - "with generate" -> "will generate" > > formatting in logs > - Correcting

[PATCH V4 2/2] KVM: selftests: Change MDSCR_EL1 register holding variables as uint64_t

2025-06-11 Thread Anshuman Khandual
Change MDSCR_EL1 register holding local variables as uint64_t that reflects its true register width as well. Cc: Marc Zyngier Cc: Oliver Upton Cc: Joey Gouly Cc: k...@vger.kernel.org Cc: kvm...@lists.linux.dev Cc: linux-kernel@vger.kernel.org Cc: linux-kselft...@vger.kernel.org Cc: linux-arm-ke

[PATCH 0/2] Correct the ready and handover interrupt number for sa8775p remoteproc

2025-06-11 Thread Lijuan Gao
changed, 6 insertions(+), 6 deletions(-) --- base-commit: b27cc623e01be9de1580eaa913508b237a7a9673 change-id: 20250611-correct_interrupt_for_remoteproc-9cc1af90abf7 Best regards, -- Lijuan Gao

Re: [PATCH 2/2] rcu: Fix lockup when RCU reader used while IRQ exiting

2025-06-11 Thread Xiongfeng Wang
+cc (Qi, my colleague who helps testing the modification) On 2025/6/10 20:23, Frederic Weisbecker wrote: > Le Mon, Jun 09, 2025 at 02:01:24PM -0400, Joel Fernandes a écrit : >> During rcu_read_unlock_special(), if this happens during irq_exit(), we ...skipped... We have tested the below modifica

[PATCH 2/2] arm64: dts: qcom: sa8775p: Correct the interrupt for remoteproc

2025-06-11 Thread Lijuan Gao
Fix the incorrect IRQ numbers for ready and handover on sa8775p. The correct values are as follows: Fatal interrupt - 0 Ready interrupt - 1 Handover interrupt - 2 Stop acknowledge interrupt - 3 Fixes: df54dcb34ff2e ("arm64: dts: qcom: sa8775p: add ADSP, CDSP and GPDSP nodes") Signed-off-by: Liju

Re: [PATCH net-next v3 1/4] udp_tunnel: remove rtnl_lock dependency

2025-06-11 Thread Stanislav Fomichev
On 06/11, Jakub Kicinski wrote: > On Tue, 10 Jun 2025 10:15:19 -0700 Stanislav Fomichev wrote: > > Drivers that are using ops lock and don't depend on RTNL lock > > still need to manage it because udp_tunnel's RTNL dependency. > > Introduce new udp_tunnel_nic_lock and use it instead of > > rtnl_loc

Re: [PATCH v2 2/3] mm/huge_memory: don't mark refcounted folios special in vmf_insert_folio_pmd()

2025-06-11 Thread Alistair Popple
On Wed, Jun 11, 2025 at 02:06:53PM +0200, David Hildenbrand wrote: > Marking PMDs that map a "normal" refcounted folios as special is > against our rules documented for vm_normal_page(). > > Fortunately, there are not that many pmd_special() check that can be > mislead, and most vm_normal_page_pmd

Re: [PATCH v2 0/3] mm/huge_memory: vmf_insert_folio_*() and vmf_insert_pfn_pud() fixes

2025-06-11 Thread Alistair Popple
On Wed, Jun 11, 2025 at 02:06:51PM +0200, David Hildenbrand wrote: > This is v2 of > "[PATCH v1 0/2] mm/huge_memory: don't mark refcounted pages special >in vmf_insert_folio_*()" > Now with one additional fix, based on mm/mm-unstable. > > While working on improving vm_normal_page() a

[PATCH net-next, v3] selftest: Add selftest for multicast address notifications

2025-06-11 Thread Yuyang Huang
This commit adds a new kernel selftest to verify RTNLGRP_IPV4_MCADDR and RTNLGRP_IPV6_MCADDR notifications. The test works by adding and removing a dummy interface and then confirming that the system correctly receives join and removal notifications for the 224.0.0.1 and ff02::1 multicast addresses

[PATCH net-next, v2] selftest: Add selftest for multicast address notifications

2025-06-11 Thread Yuyang Huang
This commit adds a new kernel selftest to verify RTNLGRP_IPV4_MCADDR and RTNLGRP_IPV6_MCADDR notifications. The test works by adding and removing a dummy interface and then confirming that the system correctly receives join and removal notifications for the 224.0.0.1 and ff02::1 multicast addresses

Re: [PATCH v2 1/3] mm/huge_memory: don't ignore queried cachemode in vmf_insert_pfn_pud()

2025-06-11 Thread Alistair Popple
On Wed, Jun 11, 2025 at 02:06:52PM +0200, David Hildenbrand wrote: > We setup the cache mode but ... don't forward the updated pgprot to > insert_pfn_pud(). > > Only a problem on x86-64 PAT when mapping PFNs using PUDs that > require a special cachemode. > > Fix it by using the proper pgprot wher

Re: [PATCH net-next v3 1/4] udp_tunnel: remove rtnl_lock dependency

2025-06-11 Thread Jakub Kicinski
On Tue, 10 Jun 2025 10:15:19 -0700 Stanislav Fomichev wrote: > Drivers that are using ops lock and don't depend on RTNL lock > still need to manage it because udp_tunnel's RTNL dependency. > Introduce new udp_tunnel_nic_lock and use it instead of > rtnl_lock. Drop non-UDP_TUNNEL_NIC_INFO_MAY_SLEEP

Re: [RFC 5/6] vduse: reset group asid in reset

2025-06-11 Thread Jason Wang
On Fri, Jun 6, 2025 at 7:50 PM Eugenio Pérez wrote: > > Is the expected behavior with vdpa_sim and mlx. > > Signed-off-by: Eugenio Pérez > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 6 ++ > 1 file changed, 6 insertions(+) > Should we squash this into patch 3? Thanks

Re: [RFC 3/6] vduse: add vq group asid support

2025-06-11 Thread Jason Wang
On Fri, Jun 6, 2025 at 7:50 PM Eugenio Pérez wrote: > > Make one IOTLB domain per address space, and allow the driver to assign > each ASID to a vq group. Each address space via an dedicated identifier > (ASID). > > During vDPA device allocation, the VDUSE device needs to report the > number of a

Re: [PATCH v4 09/14] selftests: harness: Move teardown conditional into test metadata

2025-06-11 Thread Jason Gunthorpe
On Wed, Jun 11, 2025 at 04:43:00PM -0700, Nicolin Chen wrote: > So, the test case sets an alignment with HUGEPAGE_SIZE=512MB while > allocating buffer_size=64MB: > rc = posix_memalign(&self->buffer, HUGEPAGE_SIZE, variant->buffer_size); > vrc = mmap(self->buffer, variant->buffer_size, P

Re: [PATCH v4 09/14] selftests: harness: Move teardown conditional into test metadata

2025-06-11 Thread Nicolin Chen
On Wed, Jun 11, 2025 at 02:48:16PM -0700, Nicolin Chen wrote: > On Wed, Jun 11, 2025 at 10:19:56AM -0700, Nicolin Chen wrote: > > On Wed, Jun 11, 2025 at 10:04:35AM +0200, Thomas Weißschuh wrote: > > > On Wed, Jun 11, 2025 at 12:05:25AM -0700, Nicolin Chen wrote: > > > > 2) parent doesn't seem to w

Re: [PATCH v2 59/62] livepatch/klp-build: Introduce klp-build script for generating livepatch modules

2025-06-11 Thread Josh Poimboeuf
On Wed, Jun 11, 2025 at 05:44:23PM -0400, Joe Lawrence wrote: > On 5/9/25 4:17 PM, Josh Poimboeuf wrote: > > +revert_patches() { > > + local extra_args=("$@") > > + local patches=("${APPLIED_PATCHES[@]}") > > + > > + for (( i=${#patches[@]}-1 ; i>=0 ; i-- )) ; do > > + revert_patch

Re: [PATCH v2 0/3] mm/huge_memory: vmf_insert_folio_*() and vmf_insert_pfn_pud() fixes

2025-06-11 Thread Andrew Morton
On Wed, 11 Jun 2025 14:06:51 +0200 David Hildenbrand wrote: > While working on improving vm_normal_page() and friends, I stumbled > over this issues: refcounted "normal" pages must not be marked > using pmd_special() / pud_special(). Why is this? > > ... > > I spent too much time trying to get

[PATCH bpf-next v3 2/2] selftests/bpf: Add test for bpftool access to read-only protected maps

2025-06-11 Thread Slava Imameev
Add selftest cases that validate bpftool's expected behavior when accessing maps protected from modification via security_bpf_map. The test includes a BPF program attached to security_bpf_map with two maps: - A protected map that only allows read-only access - An unprotected map that allows full a

[PATCH bpf-next v3 1/2] bpftool: Use appropriate permissions for map access

2025-06-11 Thread Slava Imameev
Modify several functions in tools/bpf/bpftool/common.c to allow specification of requested access for file descriptors, such as read-only access. Update bpftool to request only read access for maps when write access is not required. This fixes errors when reading from maps that are protected from

Re: [PATCH bpf-next v2 1/2] bpftool: Use appropriate permissions for map access

2025-06-11 Thread Slava Imameev
> > Modify several functions in tools/bpf/bpftool/common.c to allow > > specification of requested access for file descriptors, such as > > read-only access. > > > > Update bpftool to request only read access for maps when write > > access is not required. This fixes errors when reading from maps >

Re: [PATCH v2 2/2] Documentation/kernel-parameters: Update rcu_normal_wake_from_gp doc

2025-06-11 Thread Joel Fernandes
On 6/11/2025 1:56 PM, Uladzislau Rezki (Sony) wrote: > Update the documentation about rcu_normal_wake_from_gp parameter. > > Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Joel Fernandes Thanks. > --- > Documentation/admin-guide/kernel-parameters.txt | 3 ++- > 1 file changed, 2 ins

Re: [PATCH v2 1/2] rcu: Enable rcu_normal_wake_from_gp on small systems

2025-06-11 Thread Joel Fernandes
On 6/11/2025 1:56 PM, Uladzislau Rezki (Sony) wrote: > Automatically enable the rcu_normal_wake_from_gp parameter on > systems with a small number of CPUs. The activation threshold > is set to 16 CPUs. > > This helps to reduce a latency of normal synchronize_rcu() API > by waking up GP-waiters

Re: [PATCH v4 09/14] selftests: harness: Move teardown conditional into test metadata

2025-06-11 Thread Nicolin Chen
On Wed, Jun 11, 2025 at 10:19:56AM -0700, Nicolin Chen wrote: > On Wed, Jun 11, 2025 at 10:04:35AM +0200, Thomas Weißschuh wrote: > > On Wed, Jun 11, 2025 at 12:05:25AM -0700, Nicolin Chen wrote: > > > 2) parent doesn't seem to wait for the setup() to complete.. > > > > setup() is called in the ch

Re: [PATCH bpf-next v2 2/2] selftests/bpf: Add test for bpftool access to read-only protected maps

2025-06-11 Thread Slava Imameev
> > + make -C tools/bpf/bpftool -s -j"$ncpus" OUTPUT="$output_dir"/ >/dev/null > > + echo ... finished building bpftool > > + cd "$pwd" > > +} > > > Given that you're reusing the BPF selftests infra, you shouldn't have to > rebuild bpftool as part of the test. It's already built from the > Ma

Re: [PATCH v2 59/62] livepatch/klp-build: Introduce klp-build script for generating livepatch modules

2025-06-11 Thread Joe Lawrence
On 5/9/25 4:17 PM, Josh Poimboeuf wrote: > +revert_patches() { > + local extra_args=("$@") > + local patches=("${APPLIED_PATCHES[@]}") > + > + for (( i=${#patches[@]}-1 ; i>=0 ; i-- )) ; do > + revert_patch "${patches[$i]}" "${extra_args[@]}" > + done > + > + APPLIED

Re: [PATCH net-next, v2] selftest: Add selftest for multicast address notifications

2025-06-11 Thread Jakub Kicinski
On Tue, 10 Jun 2025 18:40:45 +0900 Yuyang Huang wrote: > This commit adds a new kernel selftest to verify RTNLGRP_IPV4_MCADDR > and RTNLGRP_IPV6_MCADDR notifications. The test works by adding and > removing a dummy interface and then confirming that the system > correctly receives join and removal

[RFC PATCH v2 10/10] KVM: selftests: Add irqfd/interrupts test for TDX with migration

2025-06-11 Thread Ryan Afranji
From: Ackerley Tng Adds a selftest to verify interrupts sent to a TDX VM before migration are successfully handled by the migrated VM. Co-developed-by: Ryan Afranji Signed-off-by: Ryan Afranji Signed-off-by: Ackerley Tng --- tools/testing/selftests/kvm/Makefile.kvm | 1 + .../testing/

[RFC PATCH v2 09/10] KVM: selftests: Add TDX support for ucalls

2025-06-11 Thread Ryan Afranji
From: Ackerley Tng ucalls for non-Coco VMs work by having the guest write to the rdi register, then perform an io instruction to exit to the host. The host then reads rdi using kvm_get_regs(). CPU registers can't be read using kvm_get_regs() for TDX, so TDX guests use MMIO to pass the struct uca

[RFC PATCH v2 08/10] KVM: selftests: TDX: Add tests for TDX in-place migration

2025-06-11 Thread Ryan Afranji
From: Sagi Shahar Adds selftests for TDX in-place migration. Signed-off-by: Ryan Afranji Signed-off-by: Sagi Shahar --- tools/testing/selftests/kvm/Makefile.kvm | 1 + .../testing/selftests/kvm/include/kvm_util.h | 20 + .../selftests/kvm/include/x86/tdx/tdx_util.h | 1 + tools/te

[RFC PATCH v2 07/10] KVM: selftests: Refactor userspace_mem_region creation out of vm_mem_add

2025-06-11 Thread Ryan Afranji
Refactor the creation and committing of userspace_mem_region to their own functions so that they can reused by future TDX migration functions. Signed-off-by: Ryan Afranji --- tools/testing/selftests/kvm/lib/kvm_util.c | 147 + 1 file changed, 89 insertions(+), 58 deletions(-)

[RFC PATCH v2 06/10] KVM: TDX: Add core logic for TDX intra-host migration

2025-06-11 Thread Ryan Afranji
From: Sagi Shahar Adds the core logic for transferring state between source and destination TDs during intra-host migration. Signed-off-by: Sagi Shahar Co-developed-by: Ryan Afranji Signed-off-by: Ryan Afranji --- arch/x86/kvm/vmx/tdx.c | 193 - 1 file

[RFC PATCH v2 05/10] KVM: TDX: Allow vCPUs to be created for migration

2025-06-11 Thread Ryan Afranji
During migration, vCPUs need to be created for an uninitialized VM. This commit moves the TDX vCPU setup that requires an initialized VM out of tdx_vcpu_create() and into tdx_td_vcpu_init(). Signed-off-by: Ryan Afranji --- arch/x86/kvm/vmx/tdx.c | 21 +++-- 1 file changed, 11 in

[RFC PATCH v2 04/10] KVM: TDX: Implement moving mirror pages between 2 TDs

2025-06-11 Thread Ryan Afranji
From: Sagi Shahar Added functionality for moving the mirror EPT table from one TD to a new one. This function moves the root of the mirror EPT table and overwrites the root of the destination. Signed-off-by: Sagi Shahar Signed-off-by: Ryan Afranji --- arch/x86/kvm/mmu.h | 2 ++ arch

[RFC PATCH v2 03/10] KVM: TDX: Add base implementation for tdx_vm_move_enc_context_from

2025-06-11 Thread Ryan Afranji
From: Sagi Shahar This should mostly match the logic in sev_vm_move_enc_context_from. Signed-off-by: Sagi Shahar Signed-off-by: Ryan Afranji --- arch/x86/kvm/vmx/main.c| 12 +++- arch/x86/kvm/vmx/tdx.c | 24 arch/x86/kvm/vmx/x86_ops.h | 1 + 3 files c

[RFC PATCH v2 02/10] KVM: x86: Adjust locking order in move_enc_context_from

2025-06-11 Thread Ryan Afranji
Previously, the order for acquiring the locks required for the migration function move_enc_context_from() was: 1) memslot lock 2) vCPU lock. This can trigger a deadlock warning because a vCPU IOCTL modifying memslots will acquire the locks in reverse order: 1) vCPU lock 2) memslot lock. This patch

[RFC PATCH v2 01/10] KVM: Split tdp_mmu_pages to mirror and direct counters

2025-06-11 Thread Ryan Afranji
From: Sagi Shahar tdp_mmu_pages counts all the active pages used by the mmu. When we transfer the state during intra-host migration we need to transfer the mirror pages but not the direct ones. The direct pages are going to be re-faulted as needed on the destination, but that approach doesn't wor

[RFC PATCH v2 00/10] Add TDX intra-host migration support

2025-06-11 Thread Ryan Afranji
Hello, This is RFC v2 for the TDX intra-host migration patch series. It addresses comments in RFC v1 [1] and is rebased onto the latest kvm/next (v6.16-rc1). This patchset was built on top of the latest TDX selftests [2] and gmem linking [3] RFC patch series. Here is the series stitched together

Re: [PATCH bpf-next v2 1/2] bpftool: Use appropriate permissions for map access

2025-06-11 Thread Slava Imameev
> > Modify several functions in tools/bpf/bpftool/common.c to allow > > specification of requested access for file descriptors, such as > > read-only access. > > > > Update bpftool to request only read access for maps when write > > access is not required. This fixes errors when reading from maps

Re: [PATCH RFC net-next v2 2/3] vsock/test: Introduce get_transports()

2025-06-11 Thread Michal Luczaj
tics. >> >> ERROR: Macros with complex values should be enclosed in parentheses >> #114: FILE: tools/testing/vsock/util.h:20: >> +#define _(name, symbol) \ >> +TRANSPORT_##name = BIT(__COUNTER__ - TRANSPORT_COUNTER_BASE), >> >> WARNING: Argument 'symbol' is not used in function-like macro >> #114: FILE: tools/testing/vsock/util.h:20: >> +#define _(name, symbol) \ >> +TRANSPORT_##name = BIT(__COUNTER__ - TRANSPORT_COUNTER_BASE), >> >> WARNING: Argument 'name' is not used in function-like macro >> #122: FILE: tools/testing/vsock/util.h:28: >> +#define _(name, symbol) "d " symbol "_transport", >> >> Is it ok to ignore this? FWIW, I see the same ERRORs due to similarly used >> preprocessor directives in fs/bcachefs/alloc_background_format.h, and the >> same WARNINGs about unused macro arguments in arch/x86/include/asm/asm.h >> (e.g. __ASM_SEL). > > It's just test, so I think it's fine to ignore, but please exaplain it > in the commit description with also references to other ERRORs/WARNINGs > like you did here. Let's see what net maintainers think. Sure, I've added a note. I've also switched the magic macro name '_' to 'x', this seems to be more common. https://lore.kernel.org/netdev/20250611-vsock-test-inc-cov-v3-0-5834060d9...@rbox.co/ Thanks, Michal

[PATCH net-next v3 3/3] vsock/test: Cover more CIDs in transport_uaf test

2025-06-11 Thread Michal Luczaj
Increase the coverage of test for UAF due to socket unbinding, and losing transport in general. It's a follow up to commit 301a62dfb0d0 ("vsock/test: Add test for UAF due to socket unbinding") and discussion in [1]. The idea remains the same: take an unconnected stream socket with a transport assi

[PATCH net-next v3 0/3] vsock/test: Improve transport_uaf test

2025-06-11 Thread Michal Luczaj
Increase the coverage of a test implemented in commit 301a62dfb0d0 ("vsock/test: Add test for UAF due to socket unbinding"). Take this opportunity to factor out some utility code, drop a redundant sync between client and server, and introduce a /proc/kallsyms harvesting logic for auto-detecting reg

[PATCH net-next v3 2/3] vsock/test: Introduce get_transports()

2025-06-11 Thread Michal Luczaj
Return a bitmap of registered vsock transports. As guesstimated by grepping /proc/kallsyms (CONFIG_KALLSYMS=y) for known symbols of type `struct vsock_transport`, or `struct virtio_transport` in case the vsock_transport is embedded within. Note that the way `enum transport` and `transport_ksyms[]`

Re: [PATCH] selftests/bpf: fix signedness bug in redir_partial()

2025-06-11 Thread Alexei Starovoitov
On Sun, Jun 8, 2025 at 7:38 AM wangfushuai wrote: > > When xsend() returns -1 (error), the check 'n < sizeof(buf)' incorrectly > treats it as success due to unsigned promotion. Explicitly check for -1 > first. > > Fixes: a4b7193d8efd ("selftests/bpf: Add sockmap test for redirecting partial > skb

Re: [PATCH net-next v10] selftests/vsock: add initial vmtest.sh for vsock

2025-06-11 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 09 Jun 2025 09:39:24 -0700 you wrote: > This commit introduces a new vmtest.sh runner for vsock. > > It uses virtme-ng/qemu to run tests in a VM. The tests validate G2H, > H2G, and loopback. The testing tools

Re: [PATCH v2 59/62] livepatch/klp-build: Introduce klp-build script for generating livepatch modules

2025-06-11 Thread Josh Poimboeuf
On Wed, Jun 11, 2025 at 02:44:35PM -0400, Joe Lawrence wrote: > > +get_patch_files() { > > + local patch="$1" > > + > > + grep0 -E '^(--- |\+\+\+ )' "$patch" \ > > + | gawk '{print $2}' \ > > If we split the rest of this line on the tab

[PATCH net-next v3 1/3] vsock/test: Introduce vsock_bind_try() helper

2025-06-11 Thread Michal Luczaj
Create a socket and bind() it. If binding failed, gracefully return an error code while preserving `errno`. Base vsock_bind() on top of it. Suggested-by: Stefano Garzarella Reviewed-by: Stefano Garzarella Signed-off-by: Michal Luczaj --- tools/testing/vsock/util.c | 24 +--

Re: selftests/filesystem: clang warning null passed to a callee that requires a non-null argument [-Wnonnull]

2025-06-11 Thread Nathan Chancellor
On Wed, Jun 11, 2025 at 07:47:39PM +0300, Dan Carpenter wrote: > This seems like a Clang bug, right? The test for _Nullable is reversed > or something? My copy of unistd.h has /* Execute program relative to a directory file descriptor. */ extern int execveat (int __fd, const char *__path, c

Re: [PATCH 1/2] vhost-scsi: Fix typos and formatting in comments and logs

2025-06-11 Thread Stefan Hajnoczi
On Wed, Jun 11, 2025 at 07:39:21AM -0700, Alok Tiwari wrote: > This patch corrects several minor typos and formatting issues. > Changes include: > > Fixing misspellings like in comments > - "explict" -> "explicit" > - "infight" -> "inflight", > - "with generate" -> "will generate" > > formatting

Re: [PATCH 2/2] vhost-scsi: Improve error handling in vhost_scsi_make_nexus and tpg

2025-06-11 Thread Stefan Hajnoczi
On Wed, Jun 11, 2025 at 07:39:22AM -0700, Alok Tiwari wrote: > Use PTR_ERR to return the actual error code when vhost_scsi_make_nexus > fails to create a session, instead of returning -ENOMEM. > This ensures more accurate error propagation. > > Replace NULL with ERR_PTR(ret) in vhost_scsi_make_tpg

[PATCH v2 2/2] Documentation/kernel-parameters: Update rcu_normal_wake_from_gp doc

2025-06-11 Thread Uladzislau Rezki (Sony)
Update the documentation about rcu_normal_wake_from_gp parameter. Signed-off-by: Uladzislau Rezki (Sony) --- Documentation/admin-guide/kernel-parameters.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admi

Re: [PATCH v3 1/2] libbpf: add support for printing BTF character arrays as strings

2025-06-11 Thread Blake Jones
Hi Jiri, On Wed, Jun 11, 2025 at 3:34 AM Jiri Olsa wrote: > could this be used in bpftool map dump? ;-) I checked, but it looks like > bpftool map dump is using something else to dump data.. I admit I haven't > spent much on time that I actually started this work by looking at bpftool's dumper,

Re: selftests/filesystem: clang warning null passed to a callee that requires a non-null argument [-Wnonnull]

2025-06-11 Thread Dan Carpenter
On Wed, Jun 11, 2025 at 10:50:52AM -0700, Nathan Chancellor wrote: > On Wed, Jun 11, 2025 at 07:47:39PM +0300, Dan Carpenter wrote: > > This seems like a Clang bug, right? The test for _Nullable is reversed > > or something? > > My copy of unistd.h has > > /* Execute program relative to a dire

Re: [PATCH v2 59/62] livepatch/klp-build: Introduce klp-build script for generating livepatch modules

2025-06-11 Thread Joe Lawrence
On 6/11/25 3:08 PM, Josh Poimboeuf wrote: > On Wed, Jun 11, 2025 at 02:44:35PM -0400, Joe Lawrence wrote: >>> +get_patch_files() { >>> + local patch="$1" >>> + >>> + grep0 -E '^(--- |\+\+\+ )' "$patch" \ >>> + | gawk '{print $2}' \ >> If

[PATCH v2] selftests: cachestat: Refactor test to remove duplication

2025-06-11 Thread Suresh K C
From: Suresh K C Refactored the mmap and shmem test logic into a common function to reduce code duplication and improve maintainability Changes in v2: Refactored mmap and shmem tests into a common function Renamed test function to run_cachestat_test() Removed test for /proc/cpuinfo a

[PATCH v2 1/2] rcu: Enable rcu_normal_wake_from_gp on small systems

2025-06-11 Thread Uladzislau Rezki (Sony)
Automatically enable the rcu_normal_wake_from_gp parameter on systems with a small number of CPUs. The activation threshold is set to 16 CPUs. This helps to reduce a latency of normal synchronize_rcu() API by waking up GP-waiters earlier and decoupling synchronize_rcu() callers from regular callba

Re: [PATCH v2 59/62] livepatch/klp-build: Introduce klp-build script for generating livepatch modules

2025-06-11 Thread Joe Lawrence
On 5/9/25 4:17 PM, Josh Poimboeuf wrote: > Add a klp-build script which automates the generation of a livepatch > module from a source .patch file by performing the following steps: > > - Builds an original kernel with -function-sections and > -fdata-sections, plus objtool function checksumm

Re: [PATCH 2/2] rcu: Fix lockup when RCU reader used while IRQ exiting

2025-06-11 Thread Boqun Feng
On Wed, Jun 11, 2025 at 09:16:05AM -0700, Paul E. McKenney wrote: > On Wed, Jun 11, 2025 at 09:05:06AM -0700, Boqun Feng wrote: > > On Mon, Jun 09, 2025 at 02:01:24PM -0400, Joel Fernandes wrote: > > > During rcu_read_unlock_special(), if this happens during irq_exit(), we > > > can lockup if an IP

Re: [PATCH v3] KVM: SEV: Disable SEV-SNP support on initialization failure

2025-06-11 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: selftests/filesystem: clang warning null passed to a callee that requires a non-null argument [-Wnonnull]

2025-06-11 Thread Dan Carpenter
This seems like a Clang bug, right? The test for _Nullable is reversed or something? regards, dan carpenter On Thu, Jun 05, 2025 at 05:41:01PM +0530, Naresh Kamboju wrote: > Regressions found on arm, arm64 and x86_64 building warnings with clang-20 > and clang-nightly started from Linux next-202

Re: [PATCH v4 09/14] selftests: harness: Move teardown conditional into test metadata

2025-06-11 Thread Nicolin Chen
On Wed, Jun 11, 2025 at 10:04:35AM +0200, Thomas Weißschuh wrote: > On Wed, Jun 11, 2025 at 12:05:25AM -0700, Nicolin Chen wrote: > > On Tue, Jun 10, 2025 at 08:46:57PM -0300, Jason Gunthorpe wrote: > > > On Tue, Jun 10, 2025 at 11:48:44AM -0700, Nicolin Chen wrote: > > > > On Tue, Jun 10, 2025 at

Warnings in allmodconfig builds in samples/vfs/test-list-all-mounts.c?

2025-06-11 Thread Paul E. McKenney
Hello, Christian! Imagine my surprise to learn that "make allmodconfig" builds of the kernel also build userspace components, including samples/vfs/test-list-all-mounts.c. ;-) On CentOS, "make allmodconfig" gives a zero exit code, but gets the following warnings: In file included from samples/

Re: [PATCH 1/2] context_tracking: Provide helper to determine if we're in IRQ

2025-06-11 Thread Frederic Weisbecker
Le Mon, Jun 09, 2025 at 02:01:23PM -0400, Joel Fernandes a écrit : > context_tracking keeps track of whether we're handling IRQ well after > the preempt masks give take it off their books. We need this > functionality in a follow-up patch to fix a bug. Provide a helper API > for the same. > > Sign

Re: [PATCH v3] dt-bindings: pmem: Convert binding to YAML

2025-06-11 Thread Drew Fustini
On Wed, Jun 11, 2025 at 09:33:17AM -0500, Ira Weiny wrote: > Drew Fustini wrote: > > On Mon, Jun 09, 2025 at 08:32:41AM -0500, Rob Herring wrote: > > > On Fri, Jun 06, 2025 at 11:11:17AM -0700, Drew Fustini wrote: > > > > Convert the PMEM device tree binding from text to YAML. This will allow > > >

Re: [PATCH 2/2] rcu: Fix lockup when RCU reader used while IRQ exiting

2025-06-11 Thread Boqun Feng
On Mon, Jun 09, 2025 at 02:01:24PM -0400, Joel Fernandes wrote: > During rcu_read_unlock_special(), if this happens during irq_exit(), we > can lockup if an IPI is issued. This is because the IPI itself triggers > the irq_exit() path causing a recursive lock up. > > This is precisely what Xiongfen

Re: [PATCH 2/2] rcu: Fix lockup when RCU reader used while IRQ exiting

2025-06-11 Thread Paul E. McKenney
On Wed, Jun 11, 2025 at 09:05:06AM -0700, Boqun Feng wrote: > On Mon, Jun 09, 2025 at 02:01:24PM -0400, Joel Fernandes wrote: > > During rcu_read_unlock_special(), if this happens during irq_exit(), we > > can lockup if an IPI is issued. This is because the IPI itself triggers > > the irq_exit() pa

Re: [PATCH 1/3] rcu: Return early if callback is not specified

2025-06-11 Thread Uladzislau Rezki
On Tue, Jun 10, 2025 at 03:33:32PM -0400, Joel Fernandes wrote: > > > On 6/10/2025 1:34 PM, Uladzislau Rezki (Sony) wrote: > > Currently the call_rcu() API does not check whether a callback > > pointer is NULL. If NULL is passed, rcu_core() will try to invoke > > it, resulting in NULL pointer der

Re: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-11 Thread Bjorn Andersson
On Wed, Jun 04, 2025 at 03:19:52AM +, Peng Fan wrote: > > Subject: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to > > pre-booted remote cores > > > > From: Hiago De Franco > > > > When the remote core is started before Linux boots (e.g., by the > > bootloader), the driver current

Re: [PATCH v4 1/3] pmdomain: core: introduce dev_pm_genpd_is_on

2025-06-11 Thread Bjorn Andersson
On Mon, Jun 02, 2025 at 10:19:03AM -0300, Hiago De Franco wrote: > From: Hiago De Franco > > This helper function returns the current power status of a given generic > power domain. > Please correct me if I'm wrong, but this returns the momentary status of the device's associated genpd, and as

Re: [PATCH v4 6/7] mm/maps: read proc/pid/maps under per-vma lock

2025-06-11 Thread Suren Baghdasaryan
On Wed, Jun 11, 2025 at 3:25 AM Lorenzo Stoakes wrote: > > Thanks for your patient replies :) > > OK to save us both time in such a hge back-and-forth - I agree broadly > with your comments below and I think we are aligned on everything now. > > I will try to get you a list of merge scenarios

Re: [PATCH bpf-next v2 0/2] bpf,ktls: Fix data corruption caused by using bpf_msg_pop_data() in ktls

2025-06-11 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (net) by Daniel Borkmann : On Mon, 9 Jun 2025 10:08:51 +0800 you wrote: > Cong reported an issue where running 'test_sockmap' in the current > bpf-next tree results in an error [1]. > > The specific test case that triggered the error is a combi

Re: [PATCH net-next v3] vsock/test: Add test for null ptr deref when transport changes

2025-06-11 Thread Stefano Garzarella
On Wed, Jun 11, 2025 at 04:07:25PM +0200, Luigi Leonardi wrote: Add a new test to ensure that when the transport changes a null pointer dereference does not occur. The bug was reported upstream [1] and fixed with commit 2cb7c756f605 ("vsock/virtio: discard packets if the transport changes"). KAS

[PATCH 2/2] vhost-scsi: Improve error handling in vhost_scsi_make_nexus and tpg

2025-06-11 Thread Alok Tiwari
Use PTR_ERR to return the actual error code when vhost_scsi_make_nexus fails to create a session, instead of returning -ENOMEM. This ensures more accurate error propagation. Replace NULL with ERR_PTR(ret) in vhost_scsi_make_tpg to follow kernel conventions for pointer-returning functions, allowing

[PATCH 1/2] vhost-scsi: Fix typos and formatting in comments and logs

2025-06-11 Thread Alok Tiwari
This patch corrects several minor typos and formatting issues. Changes include: Fixing misspellings like in comments - "explict" -> "explicit" - "infight" -> "inflight", - "with generate" -> "will generate" formatting in logs - Correcting log formatting specifier from "%dd" to "%d" - Adding a mis

  1   2   >