Re: [PATCH v2 2/4] perf,uprobes: fix user stack traces in the presence of pending uretprobes

2024-06-17 Thread Andrii Nakryiko
On Tue, Jun 4, 2024 at 10:16 AM Andrii Nakryiko wrote: > > On Tue, Jun 4, 2024 at 7:13 AM Masami Hiramatsu wrote: > > > > On Tue, 21 May 2024 18:38:43 -0700 > > Andrii Nakryiko wrote: > > > > > When kernel has pending uretprobes installed, it hijacks original user > > > function return address

[PATCH v2 3/3] ARM: dts: qcom: msm8926-motorola-peregrine: Add framebuffer supplies

2024-06-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add regulators used by the framebuffer of Motorola Moto G 4G (2013). Signed-off-by: André Apitzsch --- .../dts/qcom/qcom-msm8926-motorola-peregrine.dts | 24 ++ 1 file changed, 24 insertions(+) diff --git

[PATCH v2 1/3] ARM: dts: qcom: msm8926-motorola-peregrine: Add accelerometer, magnetometer, regulator

2024-06-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add the accelerometer, magnetometer and regulator that are present on the Motorola Moto G 4G (2013) device. Signed-off-by: André Apitzsch --- .../dts/qcom/qcom-msm8926-motorola-peregrine.dts | 85 ++ 1 file changed, 85 insertions(+) diff --git

[PATCH v2 0/3] ARM: dts: qcom: msm8926-motorola-peregrine: Update device tree of Motorola Moto G 4G (2013)

2024-06-17 Thread André Apitzsch via B4 Relay
Add accelerometer, magnetometer, regulator and temperature sensor alert interrupt and update framebuffer supplies. Signed-off-by: André Apitzsch --- Changes in v2: - Split commit into three commits - Link to v1: https://lore.kernel.org/r/20240616-peregrine-v1-1-85d14ae1a...@apitzsch.eu ---

[PATCH v2 2/3] ARM: dts: qcom: msm8926-motorola-peregrine: Update temperature sensor

2024-06-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add alert interrupt for the temperature sensor of Motorola Moto G 4G (2013), although not used by the driver yet. Signed-off-by: André Apitzsch --- arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts | 12 1 file changed, 12 insertions(+) diff --git

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-17 Thread Steven Rostedt
On Mon, 17 Jun 2024 23:01:12 +0200 Alexander Graf wrote: > > This could be an added feature, but it is very architecture specific, > > and would likely need architecture specific updates. > > > It definitely would be an added feature, yes. But one that allows you to > ensure persistence a

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-17 Thread Alexander Graf
[resend because Thunderbird decided to send the previous version as HTML :(] On 17.06.24 22:40, Steven Rostedt wrote: On Mon, 17 Jun 2024 09:07:29 +0200 Alexander Graf wrote: Hey Steve, I believe we're talking about 2 different things :). Let me rephrase a bit and make a concrete example.

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-17 Thread Steven Rostedt
On Mon, 17 Jun 2024 09:07:29 +0200 Alexander Graf wrote: > Hey Steve, > > > I believe we're talking about 2 different things :). Let me rephrase a > bit and make a concrete example. > > Imagine you have passed the "reserve_mem=12M:4096:trace" kernel command > line option. The kernel now

Re: [PATCH] ARM: dts: qcom: msm8926-motorola-peregrine: Add accelerometer, magnetometer, regulator

2024-06-17 Thread Konrad Dybcio
On 6/16/24 16:15, André Apitzsch via B4 Relay wrote: From: André Apitzsch Add the accelerometer, magnetometer and regulator that are present on the Motorola Moto G 4G (2013) device. While at it, update framebuffer supplies and temperature sensor. That's a bit too much for a "while at it"

[PATCH] tools: build: use correct lib name for libtracefs feature detection

2024-06-17 Thread Daniel Wagner
Use libtracefs as package name to lookup the CFLAGS for libtracefs. This makes it possible to use the distro specific path as include path for the header file. Signed-off-by: Daniel Wagner --- Our downstream packaging stop working. After a bit of didding I found out that the libtracefs feature

[PATCH net-next v5 7/7] af_packet: use sk_skb_reason_drop to free rx packets

2024-06-17 Thread Yan Zhai
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202406011859.aacus8gv-...@intel.com/ Signed-off-by: Yan Zhai --- v2->v3: fixed uninitialized sk, added missing report tags. ---

[PATCH net-next v5 6/7] udp: use sk_skb_reason_drop to free rx packets

2024-06-17 Thread Yan Zhai
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202406011751.npvn0ssk-...@intel.com/ Signed-off-by: Yan Zhai --- v2->v3: added missing report tags --- net/ipv4/udp.c | 10

[PATCH net-next v5 5/7] tcp: use sk_skb_reason_drop to free rx packets

2024-06-17 Thread Yan Zhai
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202406011539.jhwbd7dx-...@intel.com/ Signed-off-by: Yan Zhai --- v2->v3: added missing report tags --- net/ipv4/syncookies.c | 2 +-

[PATCH net-next v5 4/7] net: raw: use sk_skb_reason_drop to free rx packets

2024-06-17 Thread Yan Zhai
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Signed-off-by: Yan Zhai --- net/ipv4/raw.c | 4 ++-- net/ipv6/raw.c | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index

[PATCH net-next v5 3/7] ping: use sk_skb_reason_drop to free rx packets

2024-06-17 Thread Yan Zhai
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Signed-off-by: Yan Zhai --- net/ipv4/ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 823306487a82..619ddc087957 100644 ---

[PATCH net-next v5 2/7] net: introduce sk_skb_reason_drop function

2024-06-17 Thread Yan Zhai
Long used destructors kfree_skb and kfree_skb_reason do not pass receiving socket to packet drop tracepoints trace_kfree_skb. This makes it hard to track packet drops of a certain netns (container) or a socket (user application). The naming of these destructors are also not consistent with most

[PATCH net-next v5 1/7] net: add rx_sk to trace_kfree_skb

2024-06-17 Thread Yan Zhai
skb does not include enough information to find out receiving sockets/services and netns/containers on packet drops. In theory skb->dev tells about netns, but it can get cleared/reused, e.g. by TCP stack for OOO packet lookup. Similarly, skb->sk often identifies a local sender, and tells nothing

[PATCH net-next v5 0/7] net: pass receive socket to drop tracepoint

2024-06-17 Thread Yan Zhai
We set up our production packet drop monitoring around the kfree_skb tracepoint. While this tracepoint is extremely valuable for diagnosing critical problems, it also has some limitation with drops on the local receive path: this tracepoint can only inspect the dropped skb itself, but such skb

[PATCH 10/15] gendwarfksyms: Expand structure types

2024-06-17 Thread Sami Tolvanen
Recursively expand DWARF structure types, e.g. structs, unions, and enums. Type strings also encode structure member layout, which allows us to determine ABI breakages if the compiler decides to reorder members or otherwise change the layout. Example output with --debug: subprogram(

[PATCH 15/15] kbuild: Use gendwarfksyms to generate Rust symbol versions

2024-06-17 Thread Sami Tolvanen
Use gendwarfksyms to generate symbol versions for exported Rust symbols, and allow CONFIG_MODVERSIONS to be enabled with CONFIG_RUST, assuming the debugging information needed by gendwarfksyms is also available. Signed-off-by: Sami Tolvanen --- Makefile | 6 ++ init/Kconfig | 2 +-

[PATCH 14/15] module: Support hashed symbol names when checking modversions

2024-06-17 Thread Sami Tolvanen
When checking modversions for symbol names longer than MODULE_NAME_LEN, look for the hashed symbol name instead. This is needed for Rust modules, which frequently use symbol names longer than the maximum length supported by struct modversion_info. Suggested-by: Matthew Maurer Signed-off-by: Sami

[PATCH 13/15] modpost: Add support for hashing long symbol names

2024-06-17 Thread Sami Tolvanen
Rust frequently has symbol names longer than MODULE_NAME_LEN, because the full namespace path is encoded into the mangled name. Instead of modpost failing when running into a long name with CONFIG_MODVERSIONS, store a hash of the name in struct modversion_info. To avoid breaking userspace tools

[PATCH 12/15] gendwarfksyms: Add inline debugging

2024-06-17 Thread Sami Tolvanen
Understanding the operation and caching of the tool can be somewhat challenging without a debugger. Add inline debugging information with the --inline-debug command, which adds highlighted tags to the --debug output with information about cache states etc. Signed-off-by: Sami Tolvanen ---

[PATCH 11/15] gendwarfksyms: Limit structure expansion

2024-06-17 Thread Sami Tolvanen
Expand each structure type only once per exported symbol. This is necessary to support self-referential structures, which would otherwise result in infinite recursion. Expanding each structure type just once is enough to catch ABI changes. For pointers to structure types, limit expansion to three

[PATCH 09/15] gendwarfksyms: Expand array_type

2024-06-17 Thread Sami Tolvanen
Add support for expanding DW_TAG_array_type, and the subrange type indicating array size. Example output with --debug: variable array_type [34] { pointer_type { const_type { base_type char byte_size(1) } } }; Signed-off-by: Sami Tolvanen ---

[PATCH 08/15] gendwarfksyms: Expand subroutine_type

2024-06-17 Thread Sami Tolvanen
Add support for expanding DW_TAG_subroutine_type and the parameters in DW_TAG_formal_parameter. Use also to expand subprograms. Example output with --debug: subprogram( formal_parameter base_type usize byte_size(8), formal_parameter base_type usize byte_size(8), ) -> base_type

[PATCH 07/15] gendwarfksyms: Add pretty-printing

2024-06-17 Thread Sami Tolvanen
Add linebreaks and indentation to --debug output. This will be particularly useful for more complex structures. Example output with --debug: variable pointer_type { base_type char byte_size(1) }; And the same with --debug --no-pretty-print: variable pointer_type {base_type char

[PATCH 06/15] gendwarfksyms: Expand type modifiers and typedefs

2024-06-17 Thread Sami Tolvanen
Add support for expanding DWARF type modifiers, such as pointers, const values etc., and typedefs. These types all have DW_AT_type attribute pointing the underlying type, and thus produce similar output. Signed-off-by: Sami Tolvanen --- tools/gendwarfksyms/gendwarfksyms.h | 3 ++

[PATCH 05/15] gendwarfksyms: Add a cache

2024-06-17 Thread Sami Tolvanen
Basic types in DWARF repeat frequently and traversing the DIEs using libdw is relatively slow. Add a simple hashtable based cache for the processed DIEs. Signed-off-by: Sami Tolvanen --- tools/gendwarfksyms/Build | 1 + tools/gendwarfksyms/cache.c | 147

[PATCH 04/15] gendwarfksyms: Expand base_type

2024-06-17 Thread Sami Tolvanen
Add support for expanding basic DWARF attributes and DW_TAG_base_type types. Example usage: $ nm -p --defined-only vmlinux.o | \ awk '/ (T|R|D) / {printf "%s %s\n",$1, $3}' | \ grep loops_per_jiffy | \ ./tools/gendwarfksyms/gendwarfksyms --debug vmlinux.o Output:

[PATCH 03/15] gendwarfksyms: Add CRC calculation

2024-06-17 Thread Sami Tolvanen
Add a basic CRC32 implementation adapted from genksyms, and produce matching output from type strings. Example usage: $ nm -p --defined-only rust/alloc.o | \ awk '/ (T|R|D) / {printf "%s %s\n",$1, $3}' | \ tools/gendwarfksyms/gendwarfksyms rust/alloc.o Output: #SYMVER

[PATCH 02/15] gendwarfksyms: Add symbol list input handling

2024-06-17 Thread Sami Tolvanen
Support passing a list of exported symbols to gendwarfksyms via stdin and filter non-exported symbols from the output. The symbol list input has the format 'symbol-address symbol-name' to allow the parser to discover exported symbols also by address. This is necessary for aliased symbols, where

[PATCH 00/15] Implement MODVERSIONS for Rust

2024-06-17 Thread Sami Tolvanen
Hi folks, This series implements CONFIG_MODVERSIONS for Rust, an important feature for distributions like Android that want to ship Rust kernel modules, and depend on modversions to help ensure module ABI compatibility. There have been earlier proposals [1][2] that would allow Rust modules to

[PATCH 01/15] tools: Add gendwarfksyms

2024-06-17 Thread Sami Tolvanen
Add a basic DWARF parser, which uses libdw to traverse the debugging information in an object file and looks for functions and variables. In follow-up patches, this will be expanded to produce symbol versions for CONFIG_MODVERSIONS from DWARF. This tool is needed mainly for Rust kernel module

Re: [PATCH v2 3/5] arm64: dts: qcom: sdx75: add missing qlink_logging reserved memory for mpss

2024-06-17 Thread Konrad Dybcio
On 6/17/24 11:34, Naina Mehta wrote: The qlink_logging memory region is also used by the modem firmware, add it to reserved memory regions. Also split MPSS DSM region into 2 separate regions. Signed-off-by: Naina Mehta --- The commit message is very misleading.. You're not adding

Re: [PATCH 4/8] riscv: ftrace: align patchable functions to 4 Byte boundary

2024-06-17 Thread Nathan Chancellor
On Mon, Jun 17, 2024 at 10:38:55AM +0800, Andy Chiu wrote: > On Fri, Jun 14, 2024 at 3:09 AM Nathan Chancellor wrote: > > > > Hi Andy, > > > > On Thu, Jun 13, 2024 at 03:11:09PM +0800, Andy Chiu wrote: > > > We are changing ftrace code patching in order to remove dependency from > > >

[PATCH vhost 19/23] vdpa/mlx5: Use suspend/resume during VQP change

2024-06-17 Thread Dragos Tatulea
Resume a VQ if it is already created when the number of VQ pairs increases. This is done in preparation for VQ pre-creation which is coming in a later patch. It is necessary because calling setup_vq() on an already created VQ will return early and will not enable the queue. For symmetry, suspend

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-17 Thread Jakub Kicinski
On Mon, 17 Jun 2024 12:20:19 -0400 Michael S. Tsirkin wrote: > > But the virtio spec doesn't allow setting the MAC... > > I'm probably just lost in the conversation but there's hypervisor side > > and there is user/VM side, each of them already has an interface to set > > the MAC. The MAC doesn't

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-17 Thread Michael S. Tsirkin
On Mon, Jun 17, 2024 at 08:20:02AM -0700, Jakub Kicinski wrote: > On Mon, 17 Jun 2024 09:47:21 -0400 Michael S. Tsirkin wrote: > > I don't know what this discussion is about, at this point. > > For better or worse, vdpa gained interfaces for provisioning > > new devices. Yes the solution space was

[PATCH vhost 14/23] vdpa/mlx5: Allow creation of blank VQs

2024-06-17 Thread Dragos Tatulea
Based on the filled flag, create VQs that are filled or blank. Blank VQs will be filled in later through VQ modify. Downstream patches will make use of this to pre-create blank VQs at vdpa device creation. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu ---

Re: [PATCH v5] remoteproc: xlnx: add attach detach support

2024-06-17 Thread Mathieu Poirier
Good day, On Mon, Jun 10, 2024 at 08:42:27AM -0700, Tanmay Shah wrote: > It is possible that remote processor is already running before > linux boot or remoteproc platform driver probe. Implement required > remoteproc framework ops to provide resource table address and > connect or disconnect

[PATCH vhost 04/23] vdpa/mlx5: Drop redundant check in teardown_virtqueues()

2024-06-17 Thread Dragos Tatulea
The check is done inside teardown_vq(). Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-17 Thread Jakub Kicinski
On Mon, 17 Jun 2024 09:47:21 -0400 Michael S. Tsirkin wrote: > I don't know what this discussion is about, at this point. > For better or worse, vdpa gained interfaces for provisioning > new devices. Yes the solution space was wide but it's been there > for years so kind of too late to try and

[PATCH vhost 23/23] vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready()

2024-06-17 Thread Dragos Tatulea
VQ indices in the range [cur_num_qps, max_vqs) represent queues that have not yet been activated. .set_vq_ready should not activate these VQs. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH vhost 22/23] vdpa/mlx5: Don't reset VQs more than necessary

2024-06-17 Thread Dragos Tatulea
The vdpa device can be reset many times in sequence without any significant state changes in between. Previously this was not a problem: VQs were torn down only on first reset. But after VQ pre-creation was introduced, each reset will delete and re-create the hardware VQs and their associated

[PATCH vhost 21/23] vdpa/mlx5: Re-create HW VQs under certain conditions

2024-06-17 Thread Dragos Tatulea
There are a few conditions under which the hardware VQs need a full teardown and setup: - VQ size changed to something else than default value. Hardware VQ size modification is not supported. - User turns off certain device features: mergeable buffers, checksum virtio 1.0 compliance. In

[PATCH vhost 20/23] vdpa/mlx5: Pre-create hardware VQs at vdpa .dev_add time

2024-06-17 Thread Dragos Tatulea
Currently, hardware VQs are created right when the vdpa device gets into DRIVER_OK state. That is easier because most of the VQ state is known by then. This patch switches to creating all VQs and their associated resources at device creation time. The motivation is to reduce the vdpa device live

[PATCH vhost 18/23] vdpa/mlx5: Forward error in suspend/resume device

2024-06-17 Thread Dragos Tatulea
Start using the suspend/resume_vq() error return codes previously added. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c

[PATCH vhost 16/23] vdpa/mlx5: Add error code for suspend/resume VQ

2024-06-17 Thread Dragos Tatulea
Instead of blindly calling suspend/resume_vqs(), make then return error codes. To keep compatibility, keep suspending or resuming VQs on error and return the last error code. The assumption here is that the error code would be the same. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu

[PATCH vhost 17/23] vdpa/mlx5: Consolidate all VQ modify to Ready to use resume_vq()

2024-06-17 Thread Dragos Tatulea
There are a few more places modifying the VQ to Ready directly. Let's consolidate them into resume_vq(). The redundant warnings for resume_vq() errors can also be dropped. There is one special case that needs to be handled for virtio-vdpa: the initialized flag must be set to true earlier in

[PATCH vhost 15/23] vdpa/mlx5: Accept Init -> Ready VQ transition in resume_vq()

2024-06-17 Thread Dragos Tatulea
Until now resume_vq() was used only for the suspend/resume scenario. This change also allows calling resume_vq() to bring it from Init to Ready state (VQ initialization). Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 24 ++--

[PATCH vhost 13/23] vdpa/mlx5: Set mkey modified flags on all VQs

2024-06-17 Thread Dragos Tatulea
Otherwise, when virtqueues are moved from INIT to READY the latest mkey will not be set appropriately. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH vhost 12/23] vdpa/mlx5: Start off rqt_size with max VQPs

2024-06-17 Thread Dragos Tatulea
Currently rqt_size is initialized during device flag configuration. That's because it is the earliest moment when device knows if MQ (multi queue) is on or off. Shift this configuration earlier to device creation time. This implies that non-MQ devices will have a larger RQT size. But the

Re: [PATCH] remoteproc: imx_rproc: Fix refcount mistake in imx_rproc_addr_init

2024-06-17 Thread Mathieu Poirier
On Wed, Jun 12, 2024 at 04:17:14PM +0300, Aleksandr Mishin wrote: > In imx_rproc_addr_init() strcmp() is performed over the node after the > of_node_put() is performed over it. > Fix this error by moving of_node_put() calls. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. >

[PATCH vhost 11/23] vdpa/mlx5: Set an initial size on the VQ

2024-06-17 Thread Dragos Tatulea
The virtqueue size is a pre-requisite for setting up any virtqueue resources. For the upcoming optimization of creating virtqueues at device add, the virtqueue size has to be configured. Store the default queue size in struct mlx5_vdpa_net to make it easy in the future to pre-configure this

[PATCH vhost 09/23] vdpa/mlx5: Add support for modifying the virtio_version VQ field

2024-06-17 Thread Dragos Tatulea
This is done in preparation for the pre-creation of hardware virtqueues at device add time. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 16 include/linux/mlx5/mlx5_ifc_vdpa.h | 1 + 2 files changed, 17 insertions(+) diff

[PATCH vhost 10/23] vdpa/mlx5: Add support for modifying the VQ features field

2024-06-17 Thread Dragos Tatulea
This is done in preparation for the pre-creation of hardware virtqueues at device add time. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 12 +++- include/linux/mlx5/mlx5_ifc_vdpa.h | 1 + 2 files changed, 12 insertions(+), 1

[PATCH vhost 08/23] vdpa/mlx5: Clear and reinitialize software VQ data on reset

2024-06-17 Thread Dragos Tatulea
The hardware VQ configuration is mirrored by data in struct mlx5_vdpa_virtqueue . Instead of clearing just a few fields at reset, fully clear the struct and initialize with the appropriate default values. As clear_vqs_ready() is used only during reset, get rid of it. Signed-off-by: Dragos

[PATCH vhost 07/23] vdpa/mlx5: Initialize and reset device with one queue pair

2024-06-17 Thread Dragos Tatulea
The virtio spec says that a vdpa device should start off with one queue pair. The driver is already compliant. This patch moves the initialization to device add and reset times. This is done in preparation for the pre-creation of hardware virtqueues at device add time. Signed-off-by: Dragos

[PATCH vhost 06/23] vdpa/mlx5: Remove duplicate suspend code

2024-06-17 Thread Dragos Tatulea
Use the dedicated suspend_vqs() function instead. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index

[PATCH vhost 05/23] vdpa/mlx5: Iterate over active VQs during suspend/resume

2024-06-17 Thread Dragos Tatulea
No need to iterate over max number of VQs. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index

[PATCH vhost 03/23] vdpa/mlx5: Drop redundant code

2024-06-17 Thread Dragos Tatulea
The second iteration in init_mvqs() is never called because the first one will iterate up to max_vqs. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c

[PATCH vhost 02/23] vdpa/mlx5: Make setup/teardown_vq_resources() symmetrical

2024-06-17 Thread Dragos Tatulea
... by changing the setup_vq_resources() parameter. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c

[PATCH vhost 01/23] vdpa/mlx5: Clarify meaning thorough function rename

2024-06-17 Thread Dragos Tatulea
setup_driver()/teardown_driver() are a bit vague. These functions are used for virtqueue resources. Same for alloc_resources()/teardown_resources(): they represent fixed resources that are meant to exist during the device lifetime. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu ---

[PATCH vhost 00/23] vdpa/mlx5: Pre-create HW VQs to reduce LM downtime

2024-06-17 Thread Dragos Tatulea
According to the measurements for vDPA Live Migration downtime [0], one large source of downtime is the creation of hardware VQs and their associated resources on the devices on the destination VM. Previous series ([1], [2]) addressed the source part of the Live Migration downtime. This series

Re: [PATCH v3 1/1] dt-bindings: remoteproc: imx_rproc: add minItems for power-domain

2024-06-17 Thread Mathieu Poirier
On Mon, Jun 10, 2024 at 11:17:21AM -0400, Frank Li wrote: > "fsl,imx8qxp-cm4" and "fsl,imx8qm-cm4" need minimum 2 power domains. Other > platform doesn't require 'power-domain'. > > Signed-off-by: Frank Li > --- > > Notes: > Change from v2 to v3 > - only imx8qxp and imx8qm need

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-17 Thread Michael S. Tsirkin
On Mon, Jun 17, 2024 at 03:02:43PM +0200, Jiri Pirko wrote: > Mon, Jun 17, 2024 at 01:48:02PM CEST, pa...@nvidia.com wrote: > > > >> From: Jiri Pirko > >> Sent: Monday, June 17, 2024 5:10 PM > >> > >> Mon, Jun 17, 2024 at 11:44:53AM CEST, pa...@nvidia.com wrote: > >> > > >> >> From: Jiri Pirko

Re: [PATCH] riscv: Fix early ftrace nop patching

2024-06-17 Thread Alexandre Ghiti
Hi Conor, Sorry for the delay here. On 13/06/2024 09:48, Conor Dooley wrote: On Thu, May 23, 2024 at 01:51:34PM +0200, Alexandre Ghiti wrote: Commit c97bf629963e ("riscv: Fix text patching when IPI are used") converted ftrace_make_nop() to use patch_insn_write() which does not emit any icache

Re: [PATCH] vringh: add MODULE_DESCRIPTION()

2024-06-17 Thread Michael S. Tsirkin
On Sat, Jun 15, 2024 at 02:50:11PM -0700, Jeff Johnson wrote: > On 5/16/2024 6:57 PM, Jeff Johnson wrote: > > Fix the allmodconfig 'make w=1' issue: > > > > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/vhost/vringh.o > > > > Signed-off-by: Jeff Johnson > > --- > >

Re: [PATCH] virtio_net: Eliminate OOO packets during switching

2024-06-17 Thread Michael S. Tsirkin
On Fri, Jun 14, 2024 at 10:04:22PM +, Abhinav Jain wrote: > Disable the network device & turn off carrier before modifying the > number of queue pairs. > Process all the in-flight packets and then turn on carrier, followed > by waking up all the queues on the network device. Did you test that

[PATCH net-next v8 05/13] mm: page_frag: avoid caller accessing 'page_frag_cache' directly

2024-06-17 Thread Yunsheng Lin
Use appropriate frag_page API instead of caller accessing 'page_frag_cache' directly. CC: Alexander Duyck Signed-off-by: Yunsheng Lin --- drivers/vhost/net.c | 2 +- include/linux/page_frag_cache.h | 10 ++ mm/page_frag_test.c | 2 +- net/core/skbuff.c

[PATCH net-next v8 04/13] mm: page_frag: add '_va' suffix to page_frag API

2024-06-17 Thread Yunsheng Lin
Currently the page_frag API is returning 'virtual address' or 'va' when allocing and expecting 'virtual address' or 'va' as input when freeing. As we are about to support new use cases that the caller need to deal with 'struct page' or need to deal with both 'va' and 'struct page'. In order to

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-17 Thread Jiri Pirko
Mon, Jun 17, 2024 at 01:48:02PM CEST, pa...@nvidia.com wrote: > >> From: Jiri Pirko >> Sent: Monday, June 17, 2024 5:10 PM >> >> Mon, Jun 17, 2024 at 11:44:53AM CEST, pa...@nvidia.com wrote: >> > >> >> From: Jiri Pirko >> >> Sent: Monday, June 17, 2024 3:09 PM >> >> >> >> Mon, Jun 17, 2024 at

[PATCH v15 14/14] selftests/sgx: Add scripts for EPC cgroup testing

2024-06-17 Thread Huang, Haitao
From: Haitao Huang With different cgroups, the script starts one or multiple concurrent SGX selftests (test_sgx), each to run the unclobbered_vdso_oversubscribed test case, which loads an enclave of EPC size equal to the EPC capacity available on the platform. The script checks results against

[PATCH v15 13/14] Docs/x86/sgx: Add description for cgroup support

2024-06-17 Thread Huang, Haitao
From: Sean Christopherson Add initial documentation of how to regulate the distribution of SGX Enclave Page Cache (EPC) memory via the Miscellaneous cgroup controller. Signed-off-by: Sean Christopherson Co-developed-by: Kristen Carlson Accardi Signed-off-by: Kristen Carlson Accardi

[PATCH v15 12/14] x86/sgx: Turn on per-cgroup EPC reclamation

2024-06-17 Thread Huang, Haitao
From: Kristen Carlson Accardi Previous patches have implemented all infrastructure needed for per-cgroup EPC page tracking and reclaiming. But all reclaimable EPC pages are still tracked in the global LRU as sgx_epc_page_lru() always returns reference to the global LRU. Change

[PATCH v15 11/14] x86/sgx: Charge mem_cgroup for per-cgroup reclamation

2024-06-17 Thread Huang, Haitao
From: Haitao Huang Enclave Page Cache(EPC) memory can be swapped out to regular system memory, and the consumed memory should be charged to a proper mem_cgroup. Currently the selection of mem_cgroup to charge is done in sgx_encl_get_mem_cgroup(). But it considers all contexts other than the

[PATCH v15 10/14] x86/sgx: Implement async reclamation for cgroup

2024-06-17 Thread Huang, Haitao
From: Kristen Carlson Accardi In cases EPC pages need be allocated during a page fault and the cgroup usage is near its limit, an asynchronous reclamation needs be triggered to avoid blocking the page fault handling. Create a workqueue, corresponding work item and function definitions for EPC

[PATCH v15 08/14] x86/sgx: Add basic EPC reclamation flow for cgroup

2024-06-17 Thread Huang, Haitao
From: Kristen Carlson Accardi Currently in the EPC page allocation, the kernel simply fails the allocation when the current EPC cgroup fails to charge due to its usage reaching limit. This is not ideal. When that happens, a better way is to reclaim EPC page(s) from the current EPC cgroup

[PATCH v15 09/14] x86/sgx: Abstract check for global reclaimable pages

2024-06-17 Thread Huang, Haitao
From: Kristen Carlson Accardi For the global reclaimer to determine if any page available for reclamation at the global level, it currently only checks for emptiness of the global LRU. That will be inadequate when pages are tracked in multiple LRUs, one per cgroup. For this purpose, create a new

[PATCH v15 07/14] x86/sgx: Abstract tracking reclaimable pages in LRU

2024-06-17 Thread Huang, Haitao
From: Kristen Carlson Accardi The SGX driver tracks reclaimable EPC pages by adding a newly allocated page into the global LRU list in sgx_mark_page_reclaimable(), and doing the opposite in sgx_unmark_page_reclaimable(). To support SGX EPC cgroup, the SGX driver will need to maintain an LRU

[PATCH v15 06/14] x86/sgx: Add sgx_epc_lru_list to encapsulate LRU list

2024-06-17 Thread Huang, Haitao
From: Sean Christopherson Introduce a data structure to wrap the existing reclaimable list and its spinlock. Each cgroup later will have one instance of this structure to track EPC pages allocated for processes associated with the same cgroup. Just like the global SGX reclaimer (ksgxd), an EPC

[PATCH v15 05/14] x86/sgx: Implement basic EPC misc cgroup functionality

2024-06-17 Thread Huang, Haitao
From: Kristen Carlson Accardi SGX Enclave Page Cache (EPC) memory allocations are separate from normal RAM allocations, and are managed solely by the SGX subsystem. The existing cgroup memory controller cannot be used to limit or account for SGX EPC memory, which is a desirable feature in some

[PATCH v15 04/14] cgroup/misc: Add SGX EPC resource type

2024-06-17 Thread Huang, Haitao
From: Kristen Carlson Accardi Add SGX EPC memory, MISC_CG_RES_SGX_EPC, to be a valid resource type for the misc controller. Signed-off-by: Kristen Carlson Accardi Co-developed-by: Haitao Huang Signed-off-by: Haitao Huang Reviewed-by: Jarkko Sakkinen Reviewed-by: Kai Huang Tested-by: Jarkko

[PATCH v15 03/14] cgroup/misc: Export APIs for SGX driver

2024-06-17 Thread Huang, Haitao
From: Kristen Carlson Accardi The SGX EPC cgroup will reclaim EPC pages when usage in a cgroup reaches its or ancestor's limit. This requires a walk from the current cgroup up to the root similar to misc_cg_try_charge(). Export misc_cg_parent() to enable this walk. The SGX driver also needs

[PATCH v15 02/14] cgroup/misc: Add per resource callbacks for CSS events

2024-06-17 Thread Huang, Haitao
From: Kristen Carlson Accardi The misc cgroup controller (subsystem) currently does not perform resource type specific action for Cgroups Subsystem State (CSS) events: the 'css_alloc' event when a cgroup is created and the 'css_free' event when a cgroup is destroyed. Define callbacks for those

[PATCH v15 01/14] x86/sgx: Replace boolean parameters with enums

2024-06-17 Thread Huang, Haitao
From: Haitao Huang Replace boolean parameters for 'reclaim' in the function sgx_alloc_epc_page() and its callers with an enum. Also opportunistically remove non-static declaration of __sgx_alloc_epc_page() and a typo Signed-off-by: Haitao Huang Suggested-by: Jarkko Sakkinen Suggested-by:

[PATCH v15 00/14] Add Cgroup support for SGX EPC memory

2024-06-17 Thread Huang, Haitao
SGX Enclave Page Cache (EPC) memory allocations are separate from normal RAM allocations, and are managed solely by the SGX subsystem. The existing cgroup memory controller cannot be used to limit or account for SGX EPC memory, which is a desirable feature in some environments, e.g., support for

Re: [PATCH v2 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: document the SDX75 PAS

2024-06-17 Thread Krzysztof Kozlowski
On 17/06/2024 11:34, Naina Mehta wrote: > Document the MPSS Peripheral Authentication Service on SDX75 platform. > > Signed-off-by: Naina Mehta > --- Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

RE: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-17 Thread Parav Pandit
> From: Jiri Pirko > Sent: Monday, June 17, 2024 5:10 PM > > Mon, Jun 17, 2024 at 11:44:53AM CEST, pa...@nvidia.com wrote: > > > >> From: Jiri Pirko > >> Sent: Monday, June 17, 2024 3:09 PM > >> > >> Mon, Jun 17, 2024 at 04:57:23AM CEST, pa...@nvidia.com wrote: > >> > > >> > > >> >> From:

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-17 Thread Jiri Pirko
Mon, Jun 17, 2024 at 11:44:53AM CEST, pa...@nvidia.com wrote: > >> From: Jiri Pirko >> Sent: Monday, June 17, 2024 3:09 PM >> >> Mon, Jun 17, 2024 at 04:57:23AM CEST, pa...@nvidia.com wrote: >> > >> > >> >> From: Jason Wang >> >> Sent: Monday, June 17, 2024 7:18 AM >> >> >> >> On Wed, Jun 12,

Re: [v4 2/3] leds: sy7802: Add support for Silergy SY7802 flash LED controller

2024-06-17 Thread Markus Elfring
>> Various source code places can be updated also according to referenced >> programming interfaces. >> https://elixir.bootlin.com/linux/v6.10-rc4/source/include/linux/cleanup.h#L8 >> >> Will corresponding collateral evolution become better supported? > > Plesae stop this. cleanup.h might be a

Re: [v4 2/3] leds: sy7802: Add support for Silergy SY7802 flash LED controller

2024-06-17 Thread Dmitry Baryshkov
On Mon, Jun 17, 2024 at 12:18:11PM GMT, Markus Elfring wrote: > >> Would you become interested to apply a statement like > >> “guard(mutex)(>mutex);”? > >> https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/mutex.h#L196 > > > > This does not look like real improvement for code this

Re: [v4 2/3] leds: sy7802: Add support for Silergy SY7802 flash LED controller

2024-06-17 Thread Markus Elfring
>> Would you become interested to apply a statement like >> “guard(mutex)(>mutex);”? >> https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/mutex.h#L196 > > This does not look like real improvement for code this trivial. Various source code places can be updated also according to

[PATCH v2 1/5] dt-bindings: remoteproc: qcom,sm8550-pas: document the SDX75 PAS

2024-06-17 Thread Naina Mehta
Document the MPSS Peripheral Authentication Service on SDX75 platform. Signed-off-by: Naina Mehta --- .../devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml| 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml

Re: [PATCH v2 4/5] arm64: dts: qcom: sdx75: Add remoteproc node

2024-06-17 Thread Dmitry Baryshkov
On Mon, Jun 17, 2024 at 03:04:27PM GMT, Naina Mehta wrote: > Add MPSS remoteproc node for SDX75 SoC. > > Signed-off-by: Naina Mehta > --- > arch/arm64/boot/dts/qcom/sdx75.dtsi | 47 + > 1 file changed, 47 insertions(+) > Reviewed-by: Dmitry Baryshkov > -- With

Re: [PATCH v2 5/5] arm64: dts: qcom: sdx75-idp: enable MPSS remoteproc node

2024-06-17 Thread Dmitry Baryshkov
On Mon, Jun 17, 2024 at 03:04:28PM GMT, Naina Mehta wrote: > Enable MPSS remoteproc node on sdx75-idp platform. > > Signed-off-by: Naina Mehta > --- > arch/arm64/boot/dts/qcom/sdx75-idp.dts | 6 ++ > 1 file changed, 6 insertions(+) > Reviewed-by: Dmitry Baryshkov -- With best wishes

Re: [PATCH v4 2/3] leds: sy7802: Add support for Silergy SY7802 flash LED controller

2024-06-17 Thread Pavel Machek
On Sun 2024-06-16 20:55:41, Markus Elfring wrote: > > The SY7802 is a current-regulated charge pump which can regulate two > > current levels for Flash and Torch modes. > > > > It is a high-current synchronous boost converter with 2-channel high > > side current sources. Each channel is able to

RE: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-17 Thread Parav Pandit
> From: Jiri Pirko > Sent: Monday, June 17, 2024 3:09 PM > > Mon, Jun 17, 2024 at 04:57:23AM CEST, pa...@nvidia.com wrote: > > > > > >> From: Jason Wang > >> Sent: Monday, June 17, 2024 7:18 AM > >> > >> On Wed, Jun 12, 2024 at 2:30 PM Jiri Pirko wrote: > >> > > >> > Wed, Jun 12, 2024 at

Re: [PATCH 1/2] vdpa: support set mac address from vdpa tool

2024-06-17 Thread Jiri Pirko
Mon, Jun 17, 2024 at 04:57:23AM CEST, pa...@nvidia.com wrote: > > >> From: Jason Wang >> Sent: Monday, June 17, 2024 7:18 AM >> >> On Wed, Jun 12, 2024 at 2:30 PM Jiri Pirko wrote: >> > >> > Wed, Jun 12, 2024 at 03:58:10AM CEST, k...@kernel.org wrote: >> > >On Tue, 11 Jun 2024 13:32:32 +0800

<    1   2   3   4   5   6   7   8   9   10   >