Re: [PATCH v7 6/6] rust: add parameter support to the `module!` macro

2025-02-25 Thread Andreas Hindborg
"Daniel Almeida" writes: > Hi Andreas, thanks for working on this, I can see that this patch took a lot > of effort. Thanks! It's not all me though, it's based on old code from the pre-merge days. [...] >> index 0..0047126c917f4 >> --- /dev/null >> +++ b/rust/kernel/module_param.rs

Re: [PATCH v7 5/6] rust: str: add radix prefixed integer parsing functions

2025-02-25 Thread Andreas Hindborg
"Miguel Ojeda" writes: > On Mon, Feb 24, 2025 at 11:30 PM Janne Grunau wrote: >> >> The errors go away after exchanging i128 with i64 (while breaking the >> parsing for large values). > > I don't think we can use 128-bit integers unconditionally for all > architectures (we could eventually get i

Re: [PATCH RFC v2 06/10] slab: sheaf prefilling for guaranteed allocations

2025-02-25 Thread Harry Yoo
On Fri, Feb 14, 2025 at 05:27:42PM +0100, Vlastimil Babka wrote: > Add functions for efficient guaranteed allocations e.g. in a critical > section that cannot sleep, when the exact number of allocations is not > known beforehand, but an upper limit can be calculated. > > kmem_cache_prefill_sheaf()

Re: [PATCH v3 2/4] kernel: refactor lookup_or_create_module_kobject()

2025-02-25 Thread Petr Pavlu
On 2/21/25 11:42, Rasmus Villemoes wrote: > On Thu, Feb 13 2025, Petr Pavlu wrote: > >> On 2/11/25 22:48, Shyam Saini wrote: >>> In the unlikely event of the allocation failing, it is better to let >>> the machine boot with a not fully populated sysfs than to kill it with >>> this BUG_ON(). All c

[PATCH v2 1/2] dt-bindings: input/touchscreen: imagis: add compatible for ist3038h

2025-02-25 Thread Andras Sebok
IST3038H is a touchscreen IC which seems mostly compatible with IST3038C except that it reports a different chip ID value. Signed-off-by: Andras Sebok Link: https://lore.kernel.org/r/20250224090354.102903-4-sebokandris2...@gmail.com Signed-off-by: Dmitry Torokhov --- This is the fixed version

[PATCH v2 2/2] Input: imagis - add support for imagis IST3038H

2025-02-25 Thread Andras Sebok
Add support for imagis IST3038H, which seems mostly compatible with IST3038C except that it reports a different chip ID value. Tested on samsung,j5y17lte. Signed-off-by: Andras Sebok Link: https://lore.kernel.org/r/20250224090354.102903-2-sebokandris2...@gmail.com Signed-off-by: Dmitry Torokhov

Re: [PATCH RFC v2 07/10] slab: determine barn status racily outside of lock

2025-02-25 Thread Harry Yoo
On Fri, Feb 14, 2025 at 05:27:43PM +0100, Vlastimil Babka wrote: > The possibility of many barn operations is determined by the current > number of full or empty sheaves. Taking the barn->lock just to find out > that e.g. there are no empty sheaves results in unnecessary overhead and > lock content

Re: [PATCH v2 2/2] selftests: sched: skip cs_prctl_test for systems with core scheduling disabled

2025-02-25 Thread Sinadin Shan
On 25-02-2025 04:32 am, Chris Hyser wrote: From: Sinadin Shan Sent: Monday, February 24, 2025 7:10 AM To: Shrikanth Hegde; sh...@kernel.org Cc: linux-kselft...@vger.kernel.org; linux-kernel@vger.kernel.org; Chris Hyser Subject: Re: [PATCH v2 2/2] selftests: sched: skip cs_prctl_test for syste

[PATCHv2 net 2/3] bonding: fix xfrm offload feature setup on active-backup mode

2025-02-25 Thread Hangbin Liu
The active-backup bonding mode supports XFRM ESP offload. However, when a bond is added using command like `ip link add bond0 type bond mode 1 miimon 100`, the `ethtool -k` command shows that the XFRM ESP offload is disabled. This occurs because, in bond_newlink(), we change bond link first and reg

[PATCH] virtio: console: Make resizing compliant with virtio spec

2025-02-25 Thread Maximilian Immanuel Brandtner
According to the virtio spec[0] the virtio console resize struct defines cols before rows. In the kernel implementation it is the other way around resulting in the two properties being switched. While QEMU doesn't currently support resizing consoles, TinyEMU does[1](and they implement resizing acco

[PATCHv2 net 0/3] bond: fix xfrm offload issues

2025-02-25 Thread Hangbin Liu
The first patch fixes the incorrect locks using in bond driver. The second patch fixes the xfrm offload feature during setup active-backup mode. The third patch add a ipsec offload testing. v2: move the mutex lock to a work queue (Cosmin Ratiu) Hangbin Liu (3): bonding: move mutex lock to a wor

[PATCHv2 net 1/3] bonding: move mutex lock to a work queue for XFRM GC tasks

2025-02-25 Thread Hangbin Liu
The fixed commit placed mutex_lock() inside spin_lock_bh(), which triggers a warning like: BUG: sleeping function called from invalid context at... Fix this by moving the mutex_lock() operation to a work queue. Fixes: 2aeeef906d5a ("bonding: change ipsec_lock from spin lock to mutex") Reported-b

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

2025-02-25 Thread Uladzislau Rezki
On Mon, Feb 24, 2025 at 11:06:01AM -0800, Paul E. McKenney wrote: > On Mon, Feb 24, 2025 at 02:36:59PM +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. > > >

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

2025-02-25 Thread Uladzislau Rezki
On Mon, Feb 24, 2025 at 10:41:03AM -0800, Paul E. McKenney wrote: > On Mon, Feb 24, 2025 at 02:36:57PM +0100, Uladzislau Rezki (Sony) wrote: > > Currently "nfakewriters" parameter can be set to any value but > > there is no possibility to adjust it automatically based on how > > many CPUs a system

[PATCH v3 2/3] rcu: Update TREE05.boot to test normal synchronize_rcu()

2025-02-25 Thread Uladzislau Rezki (Sony)
Add extra parameters for rcutorture module. One is the "nfakewriters" which is set -1. There will be created number of test-kthreads which correspond to number of CPUs in a test system. Those threads randomly invoke synchronize_rcu() call. Apart of that "rcu_normal" is set to 1, because it is spec

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

2025-02-25 Thread Uladzislau Rezki (Sony)
Currently "nfakewriters" parameter can be set to any value but there is no possibility to adjust it automatically based on how many CPUs a system has where a test is run on. To address this, if the "nfakewriters" is set to negative it will be adjusted to num_online_cpus() during torture initializa

[PATCHv2 net 3/3] selftests: bonding: add ipsec offload test

2025-02-25 Thread Hangbin Liu
This introduces a test for IPSec offload over bonding, utilizing netdevsim for the testing process, as veth interfaces do not support IPSec offload. The test will ensure that the IPSec offload functionality remains operational even after a failover event occurs in the bonding configuration. Signed

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Vlastimil Babka
On 2/24/25 12:44, Uladzislau Rezki wrote: > On Fri, Feb 21, 2025 at 06:28:49PM +0100, Vlastimil Babka wrote: >> On 2/21/25 17:30, Keith Busch wrote: >> > On Wed, Aug 07, 2024 at 12:31:19PM +0200, Vlastimil Babka wrote: >> >> We would like to replace call_rcu() users with kfree_rcu() where the >> >>

Re: [PATCH RFC 0/4] mm: KUnit tests for the page allocator

2025-02-25 Thread David Hildenbrand
On 24.02.25 15:47, Brendan Jackman wrote: The page allocator does a lot of stuff that is not visible to the user in any deterministic way. But this stuff is still important and it would be nice to test that behaviour. KUnit is a tool for unit-testing kernel-internal APIs. This is an attempt to a

[PATCH v3 0/8] imx8mp: Add support to Run/Stall DSP via reset API

2025-02-25 Thread Daniel Baluta
This patch series adds support to control the Run/Stall DSP bits found on i.MX8MP via the reset controller API instead of using the syscon API. Patches 1,4-7 - should be merged first via Rest Controller Tree. Patch 8 - should be merged via Remoteproc tree. Patch 2,3 - should be last merged via Sha

[PATCH v3 2/8] dt-bindings: dsp: fsl,dsp: Add resets property

2025-02-25 Thread Daniel Baluta
Assert and deassert functionality of the DSP found on i.MX8MP is realized by combining control bits from two modules: Audio Block Control and Debug Access Port. Audio block control bits are used to for Run/Stall the DSP core while the DAP bits are used for software reset the core. The original pl

[PATCH v3 3/8] arm64: dts: imx8mp: Use resets property

2025-02-25 Thread Daniel Baluta
Add resets property to dsp node in order to be able to control the dsp run/stall bit from audio block control. Signed-off-by: Daniel Baluta Reviewed-by: Frank Li --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx

[PATCH v3 6/8] reset: imx8mp-audiomix: Introduce active_low configuration option

2025-02-25 Thread Daniel Baluta
For EARC and EARC PHY the reset happens when clearing the reset bits. Refactor assert/deassert function in order to take into account the active_low configuration option. Signed-off-by: Daniel Baluta Reviewed-by: Philipp Zabel Reviewed-by: Peng Fan Reviewed-by: Frank Li --- drivers/reset/rese

[PATCH v3 7/8] reset: imx8mp-audiomix: Add support for DSP run/stall

2025-02-25 Thread Daniel Baluta
We can Run/Stall the DSP via audio block control bits found in audiomix. Implement this functionality using the reset controller and use assert for Stall and deassert for Run. Signed-off-by: Daniel Baluta Reviewed-by: Frank Li --- drivers/reset/reset-imx8mp-audiomix.c | 8 1 file chang

[PATCH v3 8/8] imx_dsp_rproc: Use reset controller API to control the DSP

2025-02-25 Thread Daniel Baluta
DSP on i.MX8MP doesn't have a direct reset line so according to hardware design team in order to handle assert/deassert/reset functionality we need to use a combination of control bits from two modules. Audio block control module for Run/Stall control of the DSP and DAP module in order to do softwa

[PATCH v3 1/8] dt-bindings: reset: audiomix: Add reset ids for EARC and DSP

2025-02-25 Thread Daniel Baluta
Add reset ids used for EARC and DSP on i.MX8MP platform. Signed-off-by: Daniel Baluta Acked-by: Rob Herring (Arm) Reviewed-by: Frank Li --- include/dt-bindings/reset/imx8mp-reset-audiomix.h | 13 + 1 file changed, 13 insertions(+) create mode 100644 include/dt-bindings/reset/imx8m

[PATCH v3 4/8] reset: imx8mp-audiomix: Add prefix for internal macro

2025-02-25 Thread Daniel Baluta
This adds IMX8MP_AUDIOMIX_ prefix to internal macros in order to show that specific macros are related to audiomix. Signed-off-by: Daniel Baluta Reviewed-by: Philipp Zabel Reviewed-by: Frank Li Reviewed-by: Peng Fan --- drivers/reset/reset-imx8mp-audiomix.c | 14 +++--- 1 file changed

[PATCH v3 5/8] reset: imx8mp-audiomix: Prepare the code for more reset bits

2025-02-25 Thread Daniel Baluta
Current code supports EARC PHY Software Reset and EARC Software Reset but it is not easily extensible to more reset bits. So, refactor the code in order to easily allow more reset bits in the future. Signed-off-by: Daniel Baluta Reviewed-by: Frank Li --- drivers/reset/reset-imx8mp-audiomix.c |

Re: [PATCH v7 0/6] rust: extend `module!` macro with integer parameter support

2025-02-25 Thread Petr Pavlu
On 2/24/25 12:27, Andreas Hindborg wrote: > Hi Petr, > > "Andreas Hindborg" writes: > >> This series extends the `module!` macro with support module parameters. It >> also adds some string to integer parsing functions and updates `BStr` with >> a method to strip a string prefix. >> >> This serie

[PATCH v4 5/6] misc: pci_endpoint_test: Remove global 'irq_type' and 'no_msi'

2025-02-25 Thread Kunihiko Hayashi
The global variable "irq_type" preserves the current value of ioctl(GET_IRQTYPE). However, all tests that use interrupts first call ioctl(SET_IRQTYPE) to set test->irq_type, then write the value of test->irq_type into the register pointed by test_reg_bar, and request the interrupt to the endpoint.

[PATCH v4 0/6] Fix some issues related to an interrupt type in pci_endpoint_test

2025-02-25 Thread Kunihiko Hayashi
This series solves some issues about global "irq_type" that is used for indicating the current type for users. In addition, avoid an unexpected warning that occur due to interrupts remaining after displaying an error caused by devm_request_irq(). Patch 1 includes adding GET_IRQTYPE test (check fo

[PATCH v4 4/6] misc: pci_endpoint_test: Fix irq_type to convey the correct type

2025-02-25 Thread Kunihiko Hayashi
There are two variables that indicate the interrupt type to be used in the next test execution, "irq_type" as global and test->irq_type. The global is referenced from pci_endpoint_test_get_irq() to preserve the current type for ioctl(PCITEST_GET_IRQTYPE). The type set in this function isn't refle

[PATCH v4 6/6] misc: pci_endpoint_test: Do not use managed irq functions

2025-02-25 Thread Kunihiko Hayashi
The pci_endpoint_test_request_irq() and pci_endpoint_test_release_irq() are called repeatedly by the users through pci_endpoint_test_set_irq(). So using the managed version of IRQ functions within these functions has no effect. Suggested-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasiva

[PATCH v4 2/6] misc: pci_endpoint_test: Avoid issue of interrupts remaining after request_irq error

2025-02-25 Thread Kunihiko Hayashi
After devm_request_irq() fails with error in pci_endpoint_test_request_irq(), pci_endpoint_test_free_irq_vectors() is called assuming that all IRQs have been released. However some requested IRQs remain unreleased, so there are still /proc/irq/* entries remaining and this results in WARN() with th

[PATCH v4 1/6] selftests: pci_endpoint: Add GET_IRQTYPE checks to each interrupt test

2025-02-25 Thread Kunihiko Hayashi
Add GET_IRQTYPE API checks to each interrupt test. And change pci_ep_ioctl() to get the appropriate return value from ioctl(). Suggested-by: Manivannan Sadhasivam Signed-off-by: Kunihiko Hayashi --- .../selftests/pci_endpoint/pci_endpoint_test.c| 11 ++- 1 file changed, 10 inser

Re: [PATCH v6 0/6] vhost: Add support of kthread API

2025-02-25 Thread Cindy Lu
On Tue, Feb 25, 2025 at 5:43 AM Michael S. Tsirkin wrote: > > On Sun, Feb 23, 2025 at 11:36:15PM +0800, Cindy Lu wrote: > > 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 cont

Re: [PATCH v6 4/6] vhost: introduce worker ops to support multiple thread models

2025-02-25 Thread Cindy Lu
On Mon, Feb 24, 2025 at 9:45 AM Jason Wang wrote: > > On Sun, Feb 23, 2025 at 11:41 PM Cindy Lu wrote: > > > > This commit restores the previously removed functions kthread_wakeup and > > kthread_stop, and introduces a new ops structure to handle worker wakeup, > > stop, and creation. The functio

Re: [PATCH v6 3/6] vhost: Add the cgroup related function

2025-02-25 Thread Cindy Lu
On Mon, Feb 24, 2025 at 9:40 AM Jason Wang wrote: > > On Sun, Feb 23, 2025 at 11:41 PM Cindy Lu wrote: > > > > Add back the previously removed cgroup function to support the kthread > > The biggest change for this part is in vhost_attach_cgroups() and > > vhost_attach_task_to_cgroups(). > > > > R

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

2025-02-25 Thread Nicolin Chen
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..082274e8ba6a3d 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -1534,12 +1534,16 @@ void iommu_debugfs_setup(void); > static

Re: [PATCH net-next] selftests/net: ensure mptcp is enabled in netns

2025-02-25 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 24 Feb 2025 09:40:13 + you wrote: > Some distributions may not enable MPTCP by default. All other MPTCP tests > source mptcp_lib.sh to ensure MPTCP is enabled before testing. However, > the ip_local_port_r

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

2025-02-25 Thread Alexei Starovoitov
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ørgensen wrote: > > Hou Tao writes: > > > >> +cc Cody Haas > >> > >> Sorry for the resend. I sent the reply in the HTML format. > >> > >> On 2/4/2025 4:28 PM, Hou Tao wrote: > >>> Currently, the upd

Re: [PATCH v2 2/2] livepatch: Replace tasklist_lock with RCU

2025-02-25 Thread Yafang Shao
On Wed, Feb 26, 2025 at 2:33 AM Josh Poimboeuf wrote: > > On Sun, Feb 23, 2025 at 02:20:46PM +0800, Yafang Shao wrote: > > +++ b/kernel/livepatch/patch.c > > @@ -95,7 +95,12 @@ static void notrace klp_ftrace_handler(unsigned long ip, > > > > patch_state = current->patch_state; > > >

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

2025-02-25 Thread Weinan Liu
On Tue, Feb 25, 2025 at 10:13 AM Josh Poimboeuf wrote: > > On Tue, Feb 25, 2025 at 01:02:24AM +, Weinan Liu 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 not yet working. I had tr

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

2025-02-25 Thread Weinan Liu
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 not yet working. I had trouble unwinding frames for the > >> kernel module using the current a

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

2025-02-25 Thread Joe Damato
On Tue, Feb 25, 2025 at 03:11:24PM -0800, David Wei wrote: > On 2025-02-25 10:14, Joe Damato wrote: [...] > > diff --git a/tools/testing/selftests/drivers/net/queues.py > > b/tools/testing/selftests/drivers/net/queues.py > > index 38303da957ee..baa8845d9f64 100755 > > --- a/tools/testing/selftests

Re: [PATCH 3/3] rcu/exp: Remove needless CPU up quiescent state report

2025-02-25 Thread Paul E. McKenney
On Fri, Feb 21, 2025 at 04:52:39PM +0100, Frederic Weisbecker wrote: > Le Wed, Feb 19, 2025 at 06:58:36AM -0800, Paul E. McKenney a écrit : > > On Sat, Feb 15, 2025 at 11:23:45PM +0100, Frederic Weisbecker wrote: > > > > Before. There was also some buggy debug code in play. Also, to get the > > >

[PATCH 1/9] selftests/x86: Consolidate redundant signal helper functions

2025-02-25 Thread Chang S. Bae
The x86 selftests frequently register and clean up signal handlers, but the sethandler() and clearhandler() functions have been redundantly copied across multiple .c files. Move these functions to helpers.h to enable reuse across tests, eliminating around 250 lines of duplicate code. Converge the

[PATCH 0/9] selftests/x86/xstate: Introduce common code for testing extended states

2025-02-25 Thread Chang S. Bae
Hi all, This series proposes a rework of xstate-related tests to improve maintainability and expand test coverage. == Motivation: Addressing Missing and New XSTATE Tests == With the introduction of AMX, a new test suite [1] was created to verify dynamic state handling by the kernel as observed f

[PATCH 2/9] selftests/x86/xstate: Refactor XSAVE helpers for general use

2025-02-25 Thread Chang S. Bae
The AMX test introduced several XSAVE-related helper functions, but so far, it has been the only user of them. These helpers can be generalized for broader test of multiple xstate features. Move most XSAVE-related code into xsave.h, making it shareable. The restructuring includes: * Establishing

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

2025-02-25 Thread liuye
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(-) > > diff --git a/tools/test

[PATCH 0/3] selftests/damon: three fixes for false results

2025-02-25 Thread SeongJae Park
Fix three DAMON selftest bugs that causes two and one false positive failures and success. SeongJae Park (3): selftests/damon/damos_quota: make real expectation of quota exceeds selftests/damon/damon_nr_regions: set ops update for merge results check to 100ms selftests/damon/damon_nr_reg

[PATCH 3/3] selftests/damon/damon_nr_regions: sort collected regiosn before checking with min/max boundaries

2025-02-25 Thread SeongJae Park
damon_nr_regions.py starts DAMON, periodically collect number of regions in snapshots, and see if it is in the requested range. The check code assumes the numbers are sorted on the collection list, but there is no such guarantee. Hence this can result in false positive test success. Sort the list

[PATCH 2/3] selftests/damon/damon_nr_regions: set ops update for merge results check to 100ms

2025-02-25 Thread SeongJae Park
damon_nr_regions.py updates max_nr_regions to a number smaller than expected number of real regions and confirms DAMON respect the harsh limit. To give time for DAMON to make changes for the regions, 3 aggregation intervals (300 milliseconds) are given. The internal mechanism works with not only

[PATCH 1/3] selftests/damon/damos_quota: make real expectation of quota exceeds

2025-02-25 Thread SeongJae Park
damos_quota.py assumes the quota will always exceeded. But whether quota will be exceeded or not depend on the monitoring results. Actually the monitored workload has chaning access pattern and hence sometimes the quota may not really be exceeded. As a result, false positive test failures happen.

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

2025-02-25 Thread Hou Tao
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ørgensen wrote: >>> Hou Tao writes: >>> +cc Cody Haas Sorry for the resend. I sent the reply in the HTML format. On

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

2025-02-25 Thread Jason Wang
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 wonder whether letting the caller hold the lock is better. More below. > >

Re: [PATCH net-next v4 2/4] virtio-net: Refactor napi_disable paths

2025-02-25 Thread Jason Wang
On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > Create virtnet_napi_disable helper and refactor virtnet_napi_tx_disable > to take a struct send_queue. > > Signed-off-by: Joe Damato > --- Acked-by: Jason Wang Thanks

Re: [PATCH net-next v4 1/4] virtio-net: Refactor napi_enable paths

2025-02-25 Thread Jason Wang
On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > Refactor virtnet_napi_enable and virtnet_napi_tx_enable to take a struct > receive_queue. Create a helper, virtnet_napi_do_enable, which contains > the logic to enable a NAPI. > > Signed-off-by: Joe Damato Acked-by: Jason Wang Thanks

Re: [PATCH bpf-next v3 1/6] net: tun: enable XDP metadata support

2025-02-25 Thread Jason Wang
On Mon, Feb 24, 2025 at 11:29 PM Marcus Wichelmann wrote: > > Enable the support for the bpf_xdp_adjust_meta helper function for XDP > buffers initialized by the tun driver. This allows to reserve a metadata > area that is useful to pass any information from one XDP program to > another one, for e

Re: [PATCH bpf-next v3 2/6] net: tun: enable transfer of XDP metadata to skb

2025-02-25 Thread Jason Wang
On Mon, Feb 24, 2025 at 11:29 PM Marcus Wichelmann wrote: > > When the XDP metadata area was used, it is expected that the same > metadata can also be accessed from TC, as can be read in the description > of the bpf_xdp_adjust_meta helper function. In the tun driver, this was > not yet implemented

Re: [PATCH v6 5/6] vhost: Add new UAPI to support change to task mode

2025-02-25 Thread Cindy Lu
On Tue, Feb 25, 2025 at 5:46 AM Michael S. Tsirkin wrote: > > better subject: > > vhost: uapi to control task mode (owner vs kthread) > > > On Sun, Feb 23, 2025 at 11:36:20PM +0800, Cindy Lu wrote: > > Add a new UAPI to enable setting the vhost device to task mode. > > better: > > Add a new UAPI t

Re: [PATCH bpf-next v3 3/6] selftests/bpf: move open_tuntap to network helpers

2025-02-25 Thread Jason Wang
On Mon, Feb 24, 2025 at 11:29 PM Marcus Wichelmann wrote: > > To test the XDP metadata functionality of the tun driver, it's necessary > to create a new tap device first. A helper function for this already > exists in lwt_helpers.h. Move it to the common network helpers header, > so it can be reus

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

2025-02-25 Thread Alexei Starovoitov
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ørgensen wrote: > >>> Hou Tao writes: > >>> > +cc Cody Haas > >

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

2025-02-25 Thread Andrea Righi
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 --- tools/testing/selftests/sched_ext/Makefile | 1 + tools/testing/selftests/sched_ext/numa.bpf.

[PATCH v10 3/3] selftests/rseq: Add test for mm_cid compaction

2025-02-25 Thread Gabriele Monaco
A task in the kernel (task_mm_cid_work) runs somewhat periodically to compact the mm_cid for each process. Add a test to validate that it runs correctly and timely. The test spawns 1 thread pinned to each CPU, then each thread, including the main one, runs in short bursts for some time. During thi

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

2025-02-25 Thread Baolin Wang
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 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

Re: [PATCH v6 5/6] vhost: Add new UAPI to support change to task mode

2025-02-25 Thread Cindy Lu
On Tue, Feb 25, 2025 at 7:31 PM Stefano Garzarella wrote: > > On Sun, Feb 23, 2025 at 11:36:20PM +0800, Cindy Lu wrote: > >Add a new UAPI to enable setting the vhost device to task mode. > >The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > >to configure the mode if necessary. > >Thi

[PATCH 6/9] selftests/x86/xstate: Introduce signal ABI test

2025-02-25 Thread Chang S. Bae
With the refactored test cases, another xstate exposure to userspace is through signal delivery. While amx.c includes signal-related scenarios, its primary focus is on xstate permission management, which is largely specific to dynamic states. The remaining gap is testing xstate preservation and re

[PATCH 5/9] selftests/x86/xstate: Refactor ptrace ABI test

2025-02-25 Thread Chang S. Bae
Following the refactor of the context switching test, the ptrace test is another component reusable for other xstate features. As part of this restructuring, add a missing check to validate the user_xstateregs->xstate_fx_sw field in the ABI. Also, replace err() and fatal_error() with ksft_exit_fai

[PATCH 4/9] selftests/x86/xstate: Refactor context switching test

2025-02-25 Thread Chang S. Bae
The existing context switching and ptrace tests in amx.c are not specific to dynamic states, making them reusable for general xstate testing. As a first step, move the context switching test to xstate.c. Refactor the test code to allow specifying which xstate component being tested. To decouple t

[PATCH 8/9] selftests/x86/xstate: Clarify supported xstates

2025-02-25 Thread Chang S. Bae
The established xstate test code is designed to be generic, but certain xstates require special handling and cannot be tested without additional adjustments. Clarify which xstates are currently supported, and enforce testing only for them. Signed-off-by: Chang S. Bae --- tools/testing/selftests

[PATCH 3/9] selftests/x86/xstate: Enumerate and name xstate components

2025-02-25 Thread Chang S. Bae
After moving essential helpers from amx.c, the code remains neutral regarding which xstate components it handles. However, explicitly listing known components helps users identify which features are ready for testing. Enumerate xstate components to facilitate identification. Extend struct xstate_i

Re: [PATCH 2/3] rcu/exp: Remove confusing needless full barrier on task unblock

2025-02-25 Thread Joel Fernandes
On Fri, Feb 14, 2025 at 12:25:58AM +0100, Frederic Weisbecker wrote: > A full memory barrier in the RCU-PREEMPT task unblock path advertizes > to order the context switch (or rather the accesses prior to > rcu_read_unlock()) with the expedited grace period fastpath. > > However the grace period ca

[PATCH 7/9] selftests/x86/xstate: Consolidate test invocations into a single entry

2025-02-25 Thread Chang S. Bae
Currently, each of the three xstate tests runs as a separate invocation, requiring the xstate number to be passed and state information to be reconstructed repeatedly. This approach arose from their individual and isolated development, but now it makes sense to unify them. Introduce a wrapper func

[PATCH 9/9] selftests/x86/avx: Add AVX test

2025-02-25 Thread Chang S. Bae
Add xstate testing specifically for those vector register states, validating kernel's context switching and ensuring ABI compliance. Use the established xstate testing framework. Signed-off-by: Chang S. Bae --- Alternatively, this invocation could be placed directly in xstate.c::main(). However,

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

2025-02-25 Thread David Wei
On 2025-02-25 10:14, 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 2/3] rcu/exp: Remove confusing needless full barrier on task unblock

2025-02-25 Thread Paul E. McKenney
On Tue, Feb 25, 2025 at 04:59:08PM -0500, Joel Fernandes wrote: > On Fri, Feb 14, 2025 at 12:25:58AM +0100, Frederic Weisbecker wrote: > > A full memory barrier in the RCU-PREEMPT task unblock path advertizes > > to order the context switch (or rather the accesses prior to > > rcu_read_unlock()) wi

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

2025-02-25 Thread Indu Bhagat
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 not yet working. I had trouble unwinding frames for the kernel mo

[RFC 0/2] kvm/x86: more huge page recovery fallout

2025-02-25 Thread Keith Busch
From: Keith Busch Another corner case on the KVM vhost task! 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/main/src/crosvm/sys/linux/vcpu.rs#L651 If this happens to occur when

[RFC 2/2] kvm: retry nx_huge_page_recovery_thread creation

2025-02-25 Thread Keith Busch
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 can't use call_once anymore. Replace it with a simple

[RFC 1/2] vhost: return error instead of NULL on create

2025-02-25 Thread Keith Busch
From: Keith Busch Let callers distinguish why the vhost create failed. Signed-off-by: Keith Busch --- arch/x86/kvm/mmu/mmu.c | 2 +- drivers/vhost/vhost.c | 2 +- kernel/vhost_task.c| 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Vlastimil Babka
On 2/25/25 18:41, Uladzislau Rezki wrote: > > but i had to adapt slightly the Vlastimil's test: Great, works for me too, thanks!

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

2025-02-25 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 v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Uladzislau Rezki
On Tue, Feb 25, 2025 at 06:41:19PM +0100, Uladzislau Rezki wrote: > On Tue, Feb 25, 2025 at 10:05:37AM -0700, Keith Busch wrote: > > On Tue, Feb 25, 2025 at 09:03:38AM -0700, Keith Busch wrote: > > > On Tue, Feb 25, 2025 at 10:57:38AM +0100, Vlastimil Babka wrote: > > > > I tried to create a kunit

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

2025-02-25 Thread 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 interface. > > +*/ > > + SYS(close, "ip

Re: [PATCH bpf-next v3 3/6] selftests/bpf: move open_tuntap to network helpers

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > To test the XDP metadata functionality of the tun driver, it's necessary > to create a new tap device first. A helper function for this already > exists in lwt_helpers.h. Move it to the common network helpers header, > so it can be reused in other tests. > > Signed-off-b

Re: [PATCH bpf-next v3 0/6] XDP metadata support for tun driver

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > Am 25.02.25 um 15:55 schrieb Willem de Bruijn: > > Marcus Wichelmann wrote: > >> [...] > >> > >> Signed-off-by: Marcus Wichelmann > >> Acked-by: Jason Wang > >> Reviewed-by: Willem de Bruijn > > > > Please don't add tags, unless a person has explicitly added them. > >

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Uladzislau Rezki
On Tue, Feb 25, 2025 at 07:11:05PM +0100, Vlastimil Babka wrote: > On 2/25/25 18:41, Uladzislau Rezki wrote: > > > > but i had to adapt slightly the Vlastimil's test: > > Great, works for me too, thanks! > Sounds good :) -- Uladzislau Rezki

Re: [PATCH bpf-next v3 6/6] selftests/bpf: fix file descriptor assertion in open_tuntap helper

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > The open_tuntap helper function uses open() to get a file descriptor for > /dev/net/tun. > > The open(2) manpage writes this about its return value: > > On success, open(), openat(), and creat() return the new file > descriptor (a nonnegative integer). On error, -1

[PATCH printk] Flush console log from kernel_power_off()

2025-02-25 Thread Paul E. McKenney
Kernels built with CONFIG_PREEMPT_RT=y can lose significant console output and shutdown time, which hides shutdown-time RCU issues from rcutorture. Therefore, make pr_flush() public and invoke it after then last print in kernel_power_off(). [ paulmck: Apply John Ogness feedback. ] [ paulmck: Appy

Re: [PATCH bpf-next v3 2/6] net: tun: enable transfer of XDP metadata to skb

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > When the XDP metadata area was used, it is expected that the same > metadata can also be accessed from TC, as can be read in the description > of the bpf_xdp_adjust_meta helper function. In the tun driver, this was > not yet implemented. > > To make this work, the skb th

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

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > The existing XDP metadata test works by creating a veth pair and > attaching XDP & TC programs that drop the packet when the condition of > the test isn't fulfilled. The test then pings through the veth pair and > succeeds when the ping comes through. > > While this test

Re: [PATCH v2 2/2] livepatch: Replace tasklist_lock with RCU

2025-02-25 Thread Josh Poimboeuf
On Sun, Feb 23, 2025 at 02:20:46PM +0800, Yafang Shao wrote: > +++ b/kernel/livepatch/patch.c > @@ -95,7 +95,12 @@ static void notrace klp_ftrace_handler(unsigned long ip, > > patch_state = current->patch_state; > > - WARN_ON_ONCE(patch_state == KLP_TRANSITION_IDLE); >

Re: [PATCH RFC v2 00/10] SLUB percpu sheaves

2025-02-25 Thread Suren Baghdasaryan
On Mon, Feb 24, 2025 at 1:12 PM Suren Baghdasaryan wrote: > > On Mon, Feb 24, 2025 at 12:53 PM Vlastimil Babka wrote: > > > > On 2/24/25 02:36, Suren Baghdasaryan wrote: > > > On Sat, Feb 22, 2025 at 8:44 PM Suren Baghdasaryan > > > wrote: > > >> > > >> Don't know about this particular part but

Re: [RFC PATCH 26/39] KVM: guest_memfd: Track faultability within a struct kvm_gmem_private

2025-02-25 Thread Peter Xu
On Tue, Sep 10, 2024 at 11:43:57PM +, Ackerley Tng wrote: > @@ -1079,12 +1152,20 @@ static struct inode > *kvm_gmem_inode_make_secure_inode(const char *name, > if (err) > goto out; > > + err = -ENOMEM; > + private = kzalloc(sizeof(*private), GFP_KERNEL); > + i

Re: [PATCH v5 2/4] virtio_rtc: Add PTP clocks

2025-02-25 Thread Simon Horman
On Tue, Feb 25, 2025 at 12:28:24PM +0100, Peter Hilber wrote: > On Mon, Feb 24, 2025 at 05:56:18PM +, Simon Horman wrote: > > On Wed, Feb 19, 2025 at 08:32:57PM +0100, Peter Hilber wrote: > > > > ... > > > > > +/** > > > + * viortc_ptp_gettimex64() - PTP clock gettimex64 op > > > + * > > > >

Re: [PATCH] virtio: break and reset virtio devices on device_shutdown()

2025-02-25 Thread Eric Auger
Hi Michael, On 2/24/25 8:31 PM, Michael S. Tsirkin wrote: > On Mon, Feb 24, 2025 at 08:49:09AM +0100, Eric Auger wrote: >> Hi Michael, >> >> On 2/21/25 12:42 AM, Michael S. Tsirkin wrote: >>> Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory >>> accesses during the hang. >>> >>

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Vlastimil Babka
On 2/25/25 14:39, Uladzislau Rezki wrote: > On Tue, Feb 25, 2025 at 10:57:38AM +0100, Vlastimil Babka wrote: >> On 2/24/25 12:44, Uladzislau Rezki wrote: >> > On Fri, Feb 21, 2025 at 06:28:49PM +0100, Vlastimil Babka wrote: >> >> On 2/21/25 17:30, Keith Busch wrote: >> >> > [ cut here

Re: [PATCHv2 net 1/3] bonding: move mutex lock to a work queue for XFRM GC tasks

2025-02-25 Thread Nikolay Aleksandrov
On 2/25/25 11:40, Hangbin Liu wrote: > The fixed commit placed mutex_lock() inside spin_lock_bh(), which triggers > a warning like: > > BUG: sleeping function called from invalid context at... > > Fix this by moving the mutex_lock() operation to a work queue. > > Fixes: 2aeeef906d5a ("bonding: c

Re: [PATCH] vduse: add virtio_fs to allowed dev id

2025-02-25 Thread Eugenio Perez Martin
On Mon, Feb 24, 2025 at 10:51 PM Michael S. Tsirkin wrote: > > On Tue, Jan 21, 2025 at 11:33:46AM +0100, Eugenio Pérez wrote: > > A VDUSE device that implements virtiofs device works fine just by > > adding the device id to the whitelist. > > > > Signed-off-by: Eugenio Pérez > > > OK, but the com

  1   2   >