[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

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

2024-06-17 Thread Naina Mehta
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 --- arch/arm64/boot/dts/qcom/sdx75.dtsi | 17 + 1 file changed, 13 insertions(+), 4 deletions(-)

[PATCH v2 2/5] remoteproc: qcom: pas: Add SDX75 remoteproc support

2024-06-17 Thread Naina Mehta
Add MPSS Peripheral Authentication Service support for SDX75 platform. Signed-off-by: Naina Mehta --- drivers/remoteproc/qcom_q6v5_pas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 8458bcfe9e19..833e2f9c2c5e

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

2024-06-17 Thread Naina Mehta
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(+) diff --git a/arch/arm64/boot/dts/qcom/sdx75-idp.dts b/arch/arm64/boot/dts/qcom/sdx75-idp.dts index fde16308c7e2..f1bbe7ab01ab

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

2024-06-17 Thread Naina Mehta
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(+) diff --git a/arch/arm64/boot/dts/qcom/sdx75.dtsi b/arch/arm64/boot/dts/qcom/sdx75.dtsi index

[PATCH v2 0/5] Add MPSS remoteproc support for SDX75

2024-06-17 Thread Naina Mehta
Add modem support to SDX75 using the PAS remoteproc driver. Also, add qlink_logging memory region and split MPSS DSM region into 2 separate regions. These patches were co-authored by Rohit Agarwal while at Qualcomm. Changes in v2: - Added missing binding for SDX75 to allOf constraints. -

Re: [PATCH v2] media: dt-bindings: qcom,sc7280-venus: Allow one IOMMU entry

2024-06-17 Thread Luca Weiss
On Mon Jun 3, 2024 at 8:39 AM CEST, Luca Weiss wrote: > On Fri Apr 12, 2024 at 4:19 PM CEST, Luca Weiss wrote: > > Some SC7280-based boards crash when providing the "secure_non_pixel" > > context bank, so allow only one iommu in the bindings also. > > Hi all, > > This patch is still pending and

Re: [syzbot] [net?] [virt?] upstream test error: KMSAN: uninit-value in receive_buf

2024-06-17 Thread Tetsuo Handa
Bisection reached commit f9dac92ba908 ("virtio_ring: enable premapped mode whatever use_dma_api"). On 2024/05/26 1:12, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:56fb6f92854f Merge tag 'drm-next-2024-05-25' of https://gi.. > git tree: upstream >

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

2024-06-17 Thread Alexander Graf
Hey Steve, On 13.06.24 19:12, Steven Rostedt wrote: On Thu, 13 Jun 2024 18:54:12 +0200 Alexander Graf wrote: Do you have a "real" pstore on these systems that you could store non-volatile variables in, such as persistent UEFI variables? If so, you could create an actually persistent mapping

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

2024-06-16 Thread Andy Chiu
Sorry for the noise, On Mon, Jun 17, 2024 at 10:38 AM 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 >

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

2024-06-16 Thread Parav Pandit
> 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 Cindy Lu wrote: > > >> Add new UAPI to support the mac address from vdpa

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

2024-06-16 Thread Andy Chiu
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 > > stop_machine() and enable kernel preemption. This requires us to align > > functions

Re: [PATCH 2/8] tracing: do not trace kernel_text_address()

2024-06-16 Thread Andy Chiu
On Thu, Jun 13, 2024 at 9:32 PM Steven Rostedt wrote: > > On Thu, 13 Jun 2024 15:11:07 +0800 > Andy Chiu wrote: > > > kernel_text_address() and __kernel_text_address() are called in > > arch_stack_walk() of riscv. This results in excess amount of un-related > > traces when the kernel is compiled

Re: [PATCH] vringh: add MODULE_DESCRIPTION()

2024-06-16 Thread Jason Wang
On Fri, May 17, 2024 at 9:57 AM 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 Acked-by: Jason Wang Thanks >

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

2024-06-16 Thread Jason Wang
On Sat, Jun 15, 2024 at 6:05 AM 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. > > Signed-off-by:

Re: [PATCH net-next V2] virtio-net: synchronize operstate with admin state on up/down

2024-06-16 Thread Jason Wang
On Thu, Jun 6, 2024 at 8:22 AM Jason Wang wrote: > > On Fri, May 31, 2024 at 8:18 AM Jason Wang wrote: > > > > On Thu, May 30, 2024 at 9:09 PM Michael S. Tsirkin wrote: > > > > > > On Thu, May 30, 2024 at 06:29:51PM +0800, Jason Wang wrote: > > > > On Thu, May 30, 2024 at 2:10 PM Michael S.

[PATCH v11 18/18] fgraph: Skip recording calltime/rettime if it is not nneeded

2024-06-16 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Skip recording calltime and rettime if the fgraph_ops does not need it. This is a kind of performance optimization for fprobe. Since the fprobe user does not use these entries, recording timestamp in fgraph is just a overhead (e.g. eBPF, ftrace). So introduce the

[PATCH v11 17/18] Documentation: probes: Update fprobe on function-graph tracer

2024-06-16 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Update fprobe documentation for the new fprobe on function-graph tracer. This includes some bahvior changes and pt_regs to ftrace_regs interface change. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v2: - Update @fregs parameter explanation. ---

[PATCH v11 16/18] selftests/ftrace: Add a test case for repeating register/unregister fprobe

2024-06-16 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) This test case repeats define and undefine the fprobe dynamic event to ensure that the fprobe does not cause any issue with such operations. Signed-off-by: Masami Hiramatsu (Google) --- .../test.d/dynevent/add_remove_fprobe_repeat.tc| 19

[PATCH v11 15/18] selftests: ftrace: Remove obsolate maxactive syntax check

2024-06-16 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Since the fprobe event does not support maxactive anymore, stop testing the maxactive syntax error checking. Signed-off-by: Masami Hiramatsu (Google) --- .../ftrace/test.d/dynevent/fprobe_syntax_errors.tc |4 +--- 1 file changed, 1 insertion(+), 3

[PATCH v11 14/18] tracing/fprobe: Remove nr_maxactive from fprobe

2024-06-16 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Remove depercated fprobe::nr_maxactive. This involves fprobe events to rejects the maxactive number. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v2: - Newly added. --- include/linux/fprobe.h |2 -- kernel/trace/trace_fprobe.c | 44

[PATCH v11 13/18] fprobe: Rewrite fprobe on function-graph tracer

2024-06-16 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Rewrite fprobe implementation on function-graph tracer. Major API changes are: - 'nr_maxactive' field is deprecated. - This depends on CONFIG_DYNAMIC_FTRACE_WITH_ARGS or !CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS, and CONFIG_HAVE_FUNCTION_GRAPH_FREGS. So

[PATCH v11 12/18] ftrace: Add CONFIG_HAVE_FTRACE_GRAPH_FUNC

2024-06-16 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add CONFIG_HAVE_FTRACE_GRAPH_FUNC kconfig in addition to ftrace_graph_func macro check. This is for the other feature (e.g. FPROBE) which requires to access ftrace_regs from fgraph_ops::entryfunc() can avoid compiling if the fgraph can not pass the valid

[PATCH v11 11/18] bpf: Enable kprobe_multi feature if CONFIG_FPROBE is enabled

2024-06-16 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Enable kprobe_multi feature if CONFIG_FPROBE is enabled. The pt_regs is converted from ftrace_regs by ftrace_partial_regs(), thus some registers may always returns 0. But it should be enough for function entry (access arguments) and exit (access return value).

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

2024-06-16 Thread Jason Wang
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 Cindy Lu wrote: > >> Add new UAPI to support the mac address from vdpa tool > >> Function vdpa_nl_cmd_dev_config_set_doit() will get the > >>

<    3   4   5   6   7   8   9   10   11   12   >