Re: [PATCH]][next] KVM: selftests: Fix spelling mistake "UFFDIO_CONINUE" -> "UFFDIO_CONTINUE"

2025-02-28 Thread Sean Christopherson
On Thu, 27 Feb 2025 22:08:19 +, Colin Ian King wrote: > There is a spelling mistake in a PER_PAGE_DEBUG debug message. Fix it. Applied to kvm-x86 selftests, thanks! [1/1] KVM: selftests: Fix spelling mistake "UFFDIO_CONINUE" -> "UFFDIO_CONTINUE" https://github.com/kvm-x86/linux/commit/7

Re: [PATCH v3 01/10] selftests/mm: Report errno when things fail in gup_longterm

2025-02-28 Thread Dev Jain
On 28/02/25 10:24 pm, Brendan Jackman wrote: Just reporting failure doesn't tell you what went wrong. This can fail in different ways so report errno to help the reader get started debugging. Signed-off-by: Brendan Jackman Reviewed-by: Dev Jain

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

2025-02-28 Thread Marcus Wichelmann
Am 28.02.25 um 06:43 schrieb Lei Yang: > Hi Marcus > > Since your patches are about the virtual network, I'd like to test it, > but it conflicts (Please review the attachment to review more details) > when I apply it to the master branch. > My test based on this commit: > commit 1e15510b71c99c6e49

Re: [PATCH bpf-next v1 3/3] selftests/bpf: Fixes for test_maps test

2025-02-28 Thread Hou Tao
Hi, On 2/27/2025 10:26 PM, Jiayuan Chen wrote: > BPF CI has failed 3 times in the last 24 hours. Add retry for ENOMEM. > It's similar to the optimization plan: > commit 2f553b032cad ("selftsets/bpf: Retry map update for non-preallocated > per-cpu map") > > Failed CI: > https://github.com/kernel-p

Re: [PATCH bpf-next v1 2/3] selftests/bpf: Add socketpair to create_pair to support unix socket

2025-02-28 Thread Jiayuan Chen
On Thu, Feb 27, 2025 at 02:21:41PM -0800, John Fastabend wrote: > On 2025-02-27 11:52:04, Cong Wang wrote: > > On Wed, Feb 26, 2025 at 09:22:41PM +0800, Jiayuan Chen wrote: > > > Current wrapper function create_pair() is used to create a pair of > > > connected links and returns two fds, but it doe

Re: [PATCH V5 1/4] x86/paravirt: Move halt paravirt calls under CONFIG_PARAVIRT

2025-02-28 Thread Konrad Rzeszutek Wilk
On Thu, Feb 20, 2025 at 09:16:25PM +, Vishal Annapurve wrote: > From: "Kirill A. Shutemov" > > CONFIG_PARAVIRT_XXL is mainly defined/used by XEN PV guests. For > other VM guest types, features supported under CONFIG_PARAVIRT > are self sufficient. CONFIG_PARAVIRT mainly provides support for >

Re: [PATCH v15 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-02-28 Thread Frank Li
On Thu, Feb 20, 2025 at 09:42:57PM +0100, Thomas Gleixner wrote: > On Thu, Feb 20 2025 at 15:01, Frank Li wrote: > > On Tue, Feb 11, 2025 at 02:21:53PM -0500, Frank Li wrote: > > > > Thomas Gleixner and Marc Zyngier: > > > > Do you have any comments about irq/msi part? > > I'm not having object

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

2025-02-28 Thread Paul E. McKenney
On Fri, Feb 28, 2025 at 08:12:51PM +0100, Uladzislau Rezki wrote: > Hello, Paul! > > > > > > > > > > > > > Except that I got this from overnight testing of rcu/dev on the > > > > > > shared > > > > > > RCU tree: > > > > > > > > > > > > WARNING: CPU: 5 PID: 14 at kernel/rcu/tree.c:1636 > > > >

Re: [PATCH 0/3] Fixes for IPA v4.7

2025-02-28 Thread Jakub Kicinski
On Thu, 27 Feb 2025 11:33:39 +0100 Luca Weiss wrote: > couldn't be tested much back then due to missing features in tqftpserv > which caused the modem to not enable correctly. > > Especially the last commit is important since it makes mobile data > actually functional on SoCs with IPA v4.7 like SM

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

2025-02-28 Thread Martin KaFai Lau
On 2/27/25 6:23 AM, 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,

Re: [PATCH v3 05/10] selftests/mm: Print some details when uffd-stress gets bad params

2025-02-28 Thread Dev Jain
On 28/02/25 10:24 pm, Brendan Jackman wrote: So this can be debugged more easily. Signed-off-by: Brendan Jackman Reviewed-by: Dev Jain

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

2025-02-28 Thread Paul E. McKenney
On Fri, Feb 28, 2025 at 11:59:55AM -0800, Paul E. McKenney wrote: > On Fri, Feb 28, 2025 at 08:12:51PM +0100, Uladzislau Rezki wrote: > > Hello, Paul! > > > > > > > > > > > > > > > > Except that I got this from overnight testing of rcu/dev on the > > > > > > > shared > > > > > > > RCU tree: > >

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

2025-02-28 Thread Jakub Kicinski
On Thu, 27 Feb 2025 18:50:13 + Joe Damato wrote: > @@ -2870,9 +2883,15 @@ static void refill_work(struct work_struct *work) > for (i = 0; i < vi->curr_queue_pairs; i++) { > struct receive_queue *rq = &vi->rq[i]; > > + rtnl_lock(); > virtnet_napi_d

Re: [PATCH bpf-next 01/10] selftests/bpf: test_tunnel: Add generic_attach* helpers

2025-02-28 Thread Bastien Curutchet
Hi Stanislav, On 2/27/25 11:08 PM, Stanislav Fomichev wrote: On 02/27, Bastien Curutchet (eBPF Foundation) wrote: A fair amount of code duplication is present among tests to attach BPF programs. Create generic_attach* helpers that attach BPF programs to a given interface. Use ASSERT_OK_FD() in

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

2025-02-28 Thread Jason Wang
On Fri, Feb 28, 2025 at 2:50 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. Note that the netif_queue_set_napi > currently requires RTNL, so care must be taken to ensure RTNL is held on > paths where this API might be

Re: [PATCH bpf-next 04/10] selftests/bpf: test_tunnel: Move ip6gre tunnel test to test_progs

2025-02-28 Thread Bastien Curutchet
Hi Stanislav On 2/27/25 11:18 PM, Stanislav Fomichev wrote: On 02/27, Bastien Curutchet (eBPF Foundation) wrote: ip6gre tunnels are tested in the test_tunnel.sh but not in the test_progs framework. Add a new test in test_progs to test ip6gre tunnels. It uses the same network topology and the s

Re: [PATCH v8 2/7] rust: str: implement `Index` for `BStr`

2025-02-28 Thread Alice Ryhl
On Thu, Feb 27, 2025 at 3:39 PM Andreas Hindborg wrote: > > The `Index` implementation on `BStr` was lost when we switched `BStr` from > a type alias of `[u8]` to a newtype. Add back `Index` by implementing > `Index` for `BStr` when `Index` would be implemented for `[u8]`. > > Reviewed-by: Daniel

[RFC PATCH 05/31] Add is_sev_enabled() helpers

2025-02-28 Thread Neeraj Upadhyay
From: Peter Gonda Add helper functions for guest code to check the status of SEV and SEV-ES. Cc: Paolo Bonzini Cc: Claudio Imbrenda Cc: Sean Christopherson Cc: Carlos Bilbao Cc: Tom Lendacky Cc: Michael Roth Signed-off-by: Peter Gonda Signed-off-by: Neeraj Upadhyay --- tools/testing/sel

[RFC PATCH 03/31] Add vm_vaddr_alloc_pages_shared()

2025-02-28 Thread Neeraj Upadhyay
From: Peter Gonda Add a shared page allocation. To be used for SEV-ES GHCBs. Cc: Vishal Annapurve Cc: Ackerley Tng Cc: Paolo Bonzini Cc: Claudio Imbrenda Cc: Sean Christopherson Cc: Carlos Bilbao Cc: Tom Lendacky Cc: Michael Roth Cc: k...@vger.kernel.org Cc: linux-kselft...@vger.kernel.o

[RFC PATCH 06/31] Add ability for SEV-ES guests to use ucalls via GHCB

2025-02-28 Thread Neeraj Upadhyay
From: Peter Gonda Modifies ucall handling for SEV-ES VMs. Instead of using an out instruction and storing the ucall pointer in RDI, SEV-ES guests use a outsb VMGEXIT to move the ucall pointer as the data. Allows for SEV-ES to use ucalls instead of relying the SEV-ES MSR based termination protocol

[RFC PATCH 09/31] KVM: selftests: Add support for #VC in x86 exception handlers

2025-02-28 Thread Neeraj Upadhyay
VC exception has an associated error code. Update the IDT handler for it. Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/lib/x86/handlers.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/lib/x86/handlers.S b/tools/testing/selft

[RFC PATCH 00/31] AMD: Add Secure AVIC KVM selftests

2025-02-28 Thread Neeraj Upadhyay
This series adds KVM selftests for Secure AVIC. The Secure AVIC KVM support patch series is at: https://lore.kernel.org/kvm/20250228085115.105648-1-neeraj.upadh...@amd.com/T/#u Git tree is available at: https://github.com/AMDESE/linux-kvm/tree/savic-host-latest This series depends on SNP

[RFC PATCH 01/31] Add GHCB with setters and getters

2025-02-28 Thread Neeraj Upadhyay
From: Peter Gonda Move the GHCB definitions from svm.h to the tools/ copy. This allows the SEV-ES selftest to use GHCBs which are required for non-trival VMs to paravirtualize NonAutomaticExits (NAEs) when SEV-ES is enabled. GHCB getters/setters have a warning with address-of-packed-member, so re

[RFC PATCH 08/31] KVM: selftests: Make GHCB entry page size aligned

2025-02-28 Thread Neeraj Upadhyay
Make GHCB entry page size aligned. Without this change GHCB GPA registration gets incorrectly interpreted in host as a GHCB MSR protocol request. Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/lib/x86/sev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools

[RFC PATCH 11/31] KVM: selftests: Skip vm_is_gpa_protected() call for APIC MMIO base

2025-02-28 Thread Neeraj Upadhyay
Skip vm_is_gpa_protected() call for APIC MMIO address in __virt_pg_map(). Without this change, the virt_pg_map() fails with below error for APIC MMIO address. No vm physical memory at 0xfee0 Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/lib/x86/processor.c | 6 ++ 1

[RFC PATCH 12/31] KVM: selftests: Add instruction decoding support

2025-02-28 Thread Neeraj Upadhyay
Add instruction deconding support for MMIO instruction decoding in SEV-ES VC handler path. For ease of review, file insn-eval.c is a snapshot of the file from arch/x86/lib/. It will be updated in subsequent commits with the modifications to just support minimal instruction deconding. Signed-off-by

[RFC PATCH 13/31] KVM: selftests: Add instruction decoding support

2025-02-28 Thread Neeraj Upadhyay
Update insn-eval.c to prototype instruction decoding for MMIO VC exception exit. Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/Makefile.kvm | 12 + .../selftests/kvm/include/x86/ex_regs.h | 21 ++ .../selftests/kvm/include/x86/insn-eval.h | 48 .../selftes

[RFC PATCH 20/31] KVM: selftests: Add unaccelerated APIC msrs #VC handling

2025-02-28 Thread Neeraj Upadhyay
Add #VC exception handling support for unaccelerated msrs reads/writes for Secure AVIC guests. Signed-off-by: Neeraj Upadhyay --- .../testing/selftests/kvm/include/x86/apic.h | 1 + .../testing/selftests/kvm/include/x86/savic.h | 1 + tools/testing/selftests/kvm/lib/x86/savic.c | 145

[RFC PATCH 19/31] KVM: selftests: Add Secure AVIC lib

2025-02-28 Thread Neeraj Upadhyay
Add Secure AVIC lib which provides apis to enable Secure AVIC for a vCPU. In addition, add guest APIC backing page initialization support and helper functions to access APIC regs from guest APIC backing page and from hv. Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/Makefile.kvm

[RFC PATCH 18/31] KVM: selftests: Add SEV VM support in xapic_ipi_test

2025-02-28 Thread Neeraj Upadhyay
Add support to test SEV VMs - SEV, SEV-ES, SEV-SNP in both xapic and x2apic modes. Convert the stats page to a shared page so that it is accesible from host. Signed-off-by: Neeraj Upadhyay --- .../testing/selftests/kvm/include/kvm_util.h | 1 + tools/testing/selftests/kvm/lib/kvm_util.c| 1

[RFC PATCH 14/31] KVM: selftests: Add MMIO VC exception handling for SEV-ES guests

2025-02-28 Thread Neeraj Upadhyay
Add MMIO VC exception handling support to allow xapic mmio access for SEV-ES guests. In addition, add a PV interface for xapic MMIO guest accesses from outside of VC exception handler context. Signed-off-by: Neeraj Upadhyay --- .../selftests/kvm/include/x86/ex_regs.h | 2 +- tools/testin

[RFC PATCH 15/31] KVM: selftests: Add instruction decoding for movabs instructions

2025-02-28 Thread Neeraj Upadhyay
Certain xapic MMIO reads and writes get compiled into movabs instruction which uses rax as the register containing data and 8-byte address encoded as part of the instruction. Add support to decode these instructions. Signed-off-by: Neeraj Upadhyay --- .../testing/selftests/kvm/lib/x86/insn-eval.

[RFC PATCH 16/31] KVM: selftests: Add SEV guests support in xapic_state_test

2025-02-28 Thread Neeraj Upadhyay
Now with xapic/x2apic acceses being supported for SEV-ES and SNP guests, add support for testing these VMs in xapic_state_test. Signed-off-by: Neeraj Upadhyay --- .../selftests/kvm/x86/xapic_state_test.c | 117 -- 1 file changed, 109 insertions(+), 8 deletions(-) diff --git

[RFC PATCH 17/31] KVM: selftests: Add x2apic mode testing in xapic_ipi_test

2025-02-28 Thread Neeraj Upadhyay
Add support for testing x2apic mode in xapic_ipi_test. This allows extending the test in future to support VMs which only work in x2apic mode such as Secure AVIC enabled VMs. Signed-off-by: Neeraj Upadhyay --- .../selftests/kvm/x86/xapic_ipi_test.c| 65 +++ 1 file changed

[RFC PATCH 21/31] KVM: selftests: Add IPI handling support for Secure AVIC

2025-02-28 Thread Neeraj Upadhyay
Add support for handling INCOMPLET_IPI #VC exception handling for Secure AVIC guests. This allows sending cross-vCPU IPI, using all destination shorthands (broadcast, fixed) and destination modes (logical/physical) between Secure AVIC enabled vCPUs. In addition, cross-vCPU NMI using APIC_ICR writes

[RFC PATCH 10/31] KVM: selftests: Add MSR VC handling support for SEV-ES VMs

2025-02-28 Thread Neeraj Upadhyay
Add #VC exception handling on rdmsr/wrmsr accesses for SEV-ES guests. In addition, add PV interface for direct msr read/write from SEV-ES guests without going through #VC exception path. Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/include/x86/sev.h | 2 + tools/testing/selfte

[RFC PATCH 02/31] Add arch specific additional guest pages

2025-02-28 Thread Neeraj Upadhyay
From: Peter Gonda SEV-ES guests need additional pages allocated for their GHCBs. Add arch specific function definition with __weak to allow for overriding for X86 specific SEV-ES functionality. Cc: Vishal Annapurve Cc: Ackerley Tng Cc: Paolo Bonzini Cc: Claudio Imbrenda Cc: Sean Christophers

Re: [PATCHv3 net 1/3] bonding: move IPsec deletion to bond_ipsec_free_sa

2025-02-28 Thread Nikolay Aleksandrov
On 2/28/25 12:31, Cosmin Ratiu wrote: > On Fri, 2025-02-28 at 02:20 +, Hangbin Liu wrote: >> On Thu, Feb 27, 2025 at 03:31:01PM +0200, Nikolay Aleksandrov wrote: > One more thing - note I'm not an xfrm expert by far but it > seems to me here you have > to also call  xdo_dev_state_fr

Re: [PATCHv3 net 1/3] bonding: move IPsec deletion to bond_ipsec_free_sa

2025-02-28 Thread Nikolay Aleksandrov
On 2/28/25 13:07, Nikolay Aleksandrov wrote: > On 2/28/25 12:31, Cosmin Ratiu wrote: >> On Fri, 2025-02-28 at 02:20 +, Hangbin Liu wrote: >>> On Thu, Feb 27, 2025 at 03:31:01PM +0200, Nikolay Aleksandrov wrote: >> One more thing - note I'm not an xfrm expert by far but it >> seems to me

[RFC PATCH 24/31] KVM: selftests: Add Secure AVIC mode to xapic_ipi_test

2025-02-28 Thread Neeraj Upadhyay
Test cross-vCPU IPI for Secure AVIC guests using xapic_ipi_test. Add new "SAVIC" apic mode to the test for this. Signed-off-by: Neeraj Upadhyay --- tools/arch/x86/include/asm/msr-index.h| 4 +- .../selftests/kvm/include/x86/processor.h | 1 + .../selftests/kvm/x86/xapic_ipi_test.c

[RFC PATCH 26/31] KVM: selftests: Add test to verify APIC MSR accesses for SAVIC guest

2025-02-28 Thread Neeraj Upadhyay
Extend SAVIC test to verify APIC MSR accesses in SAVIC enabled mode. Verify the behavior of reads and writes using rdmsr/wrmsr for various APIC registers. In addition, test whether wrmsr based writes are propagated to guest backing page. Signed-off-by: Neeraj Upadhyay --- .../testing/selftests/k

Re: [PATCH net-next] virtio-net: tweak for better TX performance in NAPI mode

2025-02-28 Thread Lei Yang
I tested this patch with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Mon, Feb 24, 2025 at 4:20 PM wrote: > > Hello: > > This patch was applied to netdev/net-next.git (main) > by David S. Miller : > > On Tue, 18 Feb 2025 10:39:08 +0800 you wrote: > > There are seve

[RFC PATCH 28/31] KVM: selftests: Add IOAPIC tests for Secure AVIC

2025-02-28 Thread Neeraj Upadhyay
Extend Secure AVIC tests to test edge and level ioapic based interrupt flow. In addition, test RTC_GSI IOAPIC line which has special casing in KVM. Add new interfaces to read and write to IOAPIC redirect tables. Signed-off-by: Neeraj Upadhyay --- .../testing/selftests/kvm/include/kvm_util.h |

[RFC PATCH 31/31] KVM: selftests: Add MSI injection test for SAVIC

2025-02-28 Thread Neeraj Upadhyay
Extend SAVIC test include MSI injection from host. Test scenarios where MSI vector is not allowed by guest in ALLOWED_IRR and when it is allowed. Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/x86/savic_test.c | 49 1 file changed, 49 insertions(+) diff --gi

Re: [PATCH v2 03/16] elf, uapi: Add definition for DT_GNU_HASH

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > The definition is used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the define to the kernels own UAPI headers. > > Link: > https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Cor

Re: [PATCH net-next v20 00/25] Introducing OpenVPN Data Channel Offload

2025-02-28 Thread Antonio Quartulli
On 2/27/25 5:21 PM, Jakub Kicinski wrote: On Thu, 27 Feb 2025 02:21:25 +0100 Antonio Quartulli wrote: After some time of struggle trying to fix all hidden bugs that Sabrina has found...here is v20! Please note that some patches were already reviewed/tested by a few people. These patches have

Re: [PATCH v1 2/2] mm/slab/kvfree_rcu: Switch to WQ_MEM_RECLAIM wq

2025-02-28 Thread Uladzislau Rezki
On Fri, Feb 28, 2025 at 03:42:02PM +0100, Vlastimil Babka wrote: > On 2/28/25 13:13, Uladzislau Rezki (Sony) wrote: > > Currently kvfree_rcu() APIs use a system workqueue which is > > "system_unbound_wq" to driver RCU machinery to reclaim a memory. > > > > Recently, it has been noted that the foll

Re: [PATCH v1 1/2] kunit, slub: Add test_kfree_rcu_wq_destroy use case

2025-02-28 Thread Uladzislau Rezki
On Fri, Feb 28, 2025 at 04:49:24PM +0100, Vlastimil Babka wrote: > On 2/28/25 13:13, Uladzislau Rezki (Sony) wrote: > > Add a test_kfree_rcu_wq_destroy test to verify a kmem_cache_destroy() > > from a workqueue context. The problem is that, before destroying any > > cache the kvfree_rcu_barrier() i

[PATCH v3 09/10] selftests/mm: Drop unnecessary sudo usage

2025-02-28 Thread Brendan Jackman
This script must be run as root anyway (see all the writing to privileged files in /proc etc). Remove the unnecessary use of sudo to avoid breaking on single-user systems that don't have sudo. This also avoids confusing readers. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/run_

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

2025-02-28 Thread Uladzislau Rezki
On Fri, Feb 28, 2025 at 05:36:47PM +0100, Uladzislau Rezki wrote: > On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote: > > On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote: > > > On Thu, Feb 27, 2025 at 09:26:40AM -0800, Paul E. McKenney wrote: > > > > On Thu, Feb 27,

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

2025-02-28 Thread Paul E. McKenney
On Fri, Feb 28, 2025 at 07:24:41PM +0100, Uladzislau Rezki wrote: > On Fri, Feb 28, 2025 at 10:21:57AM -0800, Paul E. McKenney wrote: > > On Fri, Feb 28, 2025 at 05:36:47PM +0100, Uladzislau Rezki wrote: > > > On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote: > > > > On Thu, Feb 27,

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

2025-02-28 Thread Uladzislau Rezki
On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote: > On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote: > > On Thu, Feb 27, 2025 at 09:26:40AM -0800, Paul E. McKenney wrote: > > > On Thu, Feb 27, 2025 at 09:12:39AM -0800, Boqun Feng wrote: > > > > Hi Ulad, > > > > > >

Re: [PATCH 2/2] remoteproc: k3-r5: Refactor Data Structures to Align with DSP and M4

2025-02-28 Thread Andrew Davis
On 2/26/25 9:30 AM, Beleswar Prasad Padhi wrote: Hi Andrew, On 26/02/25 20:14, Andrew Davis wrote: On 2/19/25 3:10 AM, Beleswar Padhi wrote: Currently, struct members such as mem, num_mems, reset, tsp, ti_sci and ti_sci_id are part of the k3_r5_core structure. To align the rproc->priv data str

Re: [PATCH v1 2/2] mm/slab/kvfree_rcu: Switch to WQ_MEM_RECLAIM wq

2025-02-28 Thread Vlastimil Babka
On 2/28/25 13:13, Uladzislau Rezki (Sony) wrote: > Currently kvfree_rcu() APIs use a system workqueue which is > "system_unbound_wq" to driver RCU machinery to reclaim a memory. > > Recently, it has been noted that the following kernel warning can > be observed: > > > workqueue: WQ_MEM_RECLAIM n

[PATCH v3 00/10] selftests/mm: Some cleanups from trying to run them

2025-02-28 Thread Brendan Jackman
I never had much luck running mm selftests so I spent a few hours digging into why. Looks like most of the reason is missing SKIP checks, so this series is just adding a bunch of those that I found. I did not do anything like all of them, just the ones I spotted in gup_longterm, gup_test, mmap, us

[PATCH v3 02/10] selftests/mm: Skip uffd-stress if userfaultfd not available

2025-02-28 Thread Brendan Jackman
It's pretty obvious that the test wouldn't work if you don't have the feature enabled. But, it's still useful to SKIP instead of failing so the reader can immediately tell that this is the reason why. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stress.c | 4 ++-- 1 file ch

[PATCH v3 07/10] selftests/mm: Skip map_populate on weird filesystems

2025-02-28 Thread Brendan Jackman
It seems that 9pfs does not allow truncating unlinked files, Mark Brown has noted that NFS may also behave this way. It doesn't seem quite right to call this a "bug" but it's probably a special enough case that it makes sense for the test to just SKIP if it happens. Signed-off-by: Brendan Jackman

[PATCH v3 06/10] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-02-28 Thread Brendan Jackman
This calculation divides a fixed parameter by an environment-dependent parameter i.e. the number of CPUs. The simple way to avoid machine-specific failures here is to just put a cap on the max value of the latter. Suggested-by: Mateusz Guzik Signed-off-by: Brendan Jackman --- tools/testing/sel

[PATCH v3 01/10] selftests/mm: Report errno when things fail in gup_longterm

2025-02-28 Thread Brendan Jackman
Just reporting failure doesn't tell you what went wrong. This can fail in different ways so report errno to help the reader get started debugging. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 37 ++- 1 file changed, 21 insertions(+),

[PATCH v3 05/10] selftests/mm: Print some details when uffd-stress gets bad params

2025-02-28 Thread Brendan Jackman
So this can be debugged more easily. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index ec842bbb9f18e291fa51d

[PATCH v3 10/10] selftests/mm: Ensure uffd-wp-mremap gets pages of each size

2025-02-28 Thread Brendan Jackman
This test allocates a page of every available size and doesn't have any SKIP logic if the allocation fails. So, ensure it's available and skip the test if we can't do so. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/run_vmtests.sh | 23 ++- 1 file changed, 22

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

2025-02-28 Thread Paul E. McKenney
On Fri, Feb 28, 2025 at 06:08:19PM +0100, Uladzislau Rezki wrote: > On Fri, Feb 28, 2025 at 05:36:47PM +0100, Uladzislau Rezki wrote: > > On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote: > > > On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote: > > > > On Thu, Feb 27,

Re: [PATCH net-next v20 09/25] ovpn: implement basic RX path (UDP)

2025-02-28 Thread Sabrina Dubroca
(I'm still reviewing how everything fits together, but one small thing here:) 2025-02-27, 02:21:34 +0100, Antonio Quartulli wrote: > +static void ovpn_udp_close(struct sock *sk, long timeout) > +{ > + struct ovpn_socket *sock; > + struct ovpn_priv *ovpn; > + > + rcu_read_lock(); > +

Re: [PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-02-28 Thread Dev Jain
On 28/02/25 10:24 pm, Brendan Jackman wrote: A later commit will bound this variable so it no longer necessarily matches the number of CPUs. Rename it appropriately. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-common.c | 8 tools/testing/selftests/mm/u

Re: [PATCH v3 06/10] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-02-28 Thread Dev Jain
On 28/02/25 10:24 pm, Brendan Jackman wrote: This calculation divides a fixed parameter by an environment-dependent parameter i.e. the number of CPUs. The simple way to avoid machine-specific failures here is to just put a cap on the max value of the latter. Suggested-by: Mateusz Guzik Sign

Re: [PATCH v2 01/16] MAINTAINERS: Add vDSO selftests

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > These currently have no maintainer besides the default kselftest ones. > Add the general vDSO maintainers, too. > > Signed-off-by: Thomas Weißschuh > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTA

Re: [PATCH v1 1/2] kunit, slub: Add test_kfree_rcu_wq_destroy use case

2025-02-28 Thread Vlastimil Babka
On 2/28/25 13:13, Uladzislau Rezki (Sony) wrote: > Add a test_kfree_rcu_wq_destroy test to verify a kmem_cache_destroy() > from a workqueue context. The problem is that, before destroying any > cache the kvfree_rcu_barrier() is invoked to guarantee that in-flight > freed objects are flushed. > > T

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

2025-02-28 Thread Paul E. McKenney
On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote: > On Thu, Feb 27, 2025 at 09:26:40AM -0800, Paul E. McKenney wrote: > > On Thu, Feb 27, 2025 at 09:12:39AM -0800, Boqun Feng wrote: > > > Hi Ulad, > > > > > > I put these three patches into next (and misc.2025.02.27a) for some > > >

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

2025-02-28 Thread Marcus Wichelmann
Am 28.02.25 um 06:43 schrieb Lei Yang: Hi Marcus Since your patches are about the virtual network, I'd like to test it, but it conflicts (Please review the attachment to review more details) when I apply it to the master branch. My test based on this commit: commit 1e15510b71c99c6e49134d756df910

Re: [PATCH v3 03/10] selftests/mm: Skip uffd-wp-mremap if userfaultfd not available

2025-02-28 Thread Dev Jain
On 28/02/25 10:24 pm, Brendan Jackman wrote: It's obvious that this should fail in that case, but still, save the reader the effort of figuring out that they've run into this by just SKIPping Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-wp-mremap.c | 5 - 1 file

Re: [PATCH v3 09/10] selftests/mm: Drop unnecessary sudo usage

2025-02-28 Thread Dev Jain
On 28/02/25 10:24 pm, Brendan Jackman wrote: This script must be run as root anyway (see all the writing to privileged files in /proc etc). Remove the unnecessary use of sudo to avoid breaking on single-user systems that don't have sudo. This also avoids confusing readers. Signed-off-by: Bre

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

2025-02-28 Thread Uladzislau Rezki
Hello, Paul! > > > > > > > > > > Except that I got this from overnight testing of rcu/dev on the shared > > > > > RCU tree: > > > > > > > > > > WARNING: CPU: 5 PID: 14 at kernel/rcu/tree.c:1636 > > > > > rcu_sr_normal_complete+0x5c/0x80 > > > > > > > > > > I see this only on TREE05. Which sho

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

2025-02-28 Thread Uladzislau Rezki
On Fri, Feb 28, 2025 at 10:21:57AM -0800, Paul E. McKenney wrote: > On Fri, Feb 28, 2025 at 05:36:47PM +0100, Uladzislau Rezki wrote: > > On Fri, Feb 28, 2025 at 07:41:40AM -0800, Paul E. McKenney wrote: > > > On Thu, Feb 27, 2025 at 06:44:15PM +0100, Uladzislau Rezki wrote: > > > > On Thu, Feb 27,

[RFC PATCH 23/31] KVM: selftests: Add SAVIC GPA notification GHCB call

2025-02-28 Thread Neeraj Upadhyay
Add GHCB call to register Secure AVIC guest APIC backing page GPA with the hyperversior. This call ensures that guest APIC backing page is pinned in NPT while vCPU is running. Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/include/x86/sev.h | 1 + tools/testing/selftests/kvm/lib

[RFC PATCH 22/31] KVM: selftests: Add args param to kvm_arch_vm_post_create()

2025-02-28 Thread Neeraj Upadhyay
Add provision to pass custom args to kvm_arch_vm_post_create(). This will be used to pass sev init args (vmsa features) for SEV VMs. Signed-off-by: Neeraj Upadhyay --- .../testing/selftests/kvm/include/kvm_util.h | 9 +++- tools/testing/selftests/kvm/include/x86/sev.h | 3 ++ tools/testing/se

[RFC PATCH 07/31] KVM: selftests: Fix ghcb_entry returned in ghcb_alloc()

2025-02-28 Thread Neeraj Upadhyay
Currently, ghcb_alloc() always returns first entry. Fix it to return an unused entry. Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/lib/x86/sev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/lib/x86/sev.c b/tools/testing/self

[RFC PATCH 29/31] KVM: selftests: Add cross-vCPU IPI testing for SAVIC guests

2025-02-28 Thread Neeraj Upadhyay
Extend SAVIC test to include various cross-vCPU IPI modes - fixed dest, fixed-logical, broadcast-all, broadcast excluding self. Signed-off-by: Neeraj Upadhyay --- tools/testing/selftests/kvm/x86/savic_test.c | 305 ++- 1 file changed, 299 insertions(+), 6 deletions(-) diff --git

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-28 Thread Danilo Krummrich
On Fri, Feb 28, 2025 at 04:29:04PM +1100, Alistair Popple wrote: > On Thu, Feb 27, 2025 at 11:01:55AM +0100, Danilo Krummrich wrote: > > On Thu, Feb 27, 2025 at 11:25:55AM +1100, Alistair Popple wrote: > > > > To be honest I don't really understand the utility here because the > > > compile-time

Re: [PATCH v2 07/16] tools/include: Add uapi/linux/elf.h

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > It will be used by the vDSO selftests. > > Signed-off-by: Thomas Weißschuh Reviewed-by: Vincenzo Frascino > --- > tools/include/uapi/linux/elf.h | 524 > + > 1 file changed, 524 insertions(+) > > diff

Re: [PATCH v2 09/16] tools/nolibc: add limits.h shim header

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > limits.h is a widely used standard header. > Missing it from nolibc requires adoption effort to port applications. > > Add a shim header which includes the global nolibc.h header. > It makes all nolibc symbols available. > > Signed-off-by: Thomas

Re: [PATCH v2 16/16] selftests: vDSO: vdso_standalone_test_x86: Switch to nolibc

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > vdso_standalone_test_x86 provides its own ASM syscall wrappers and > _start() implementation. The in-tree nolibc library already provides > this functionality for multiple architectures. By making use of nolibc, > the standalone testcase can be buil

Re: [PATCH v2 15/16] selftests: vDSO: vdso_test_gettimeofday: Make compatible with nolibc

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > nolibc does not provide sys/time.h and sys/auxv.h, > instead their definitions are available unconditionally. > > Guard the includes so they are not attempted on nolibc. > > Signed-off-by: Thomas Weißschuh Reviewed-by: Vincenzo Frascino > ---

Re: [PATCH v2 08/16] selftests: Add headers target

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > Some selftests need access to a full UAPI headers tree, for example when > building with nolibc which heavily relies on UAPI headers. > A reference to such a tree is available in the KHDR_INCLUDES variable, > but there is currently no way to populat

Re: [PATCH v2 06/16] elf, uapi: Add types ElfXX_Verdef and ElfXX_Veraux

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > The types are used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the types to the kernels own UAPI headers. > > Link: > https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Co

Re: [PATCH v2 10/16] selftests: vDSO: vdso_standalone_test_x86: Use vdso_init_form_sysinfo_ehdr

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > vdso_standalone_test_x86 is the only user of vdso_init_from_auxv(). > Instead of combining the parsing the aux vector with the parsing of the > vDSO, split them apart into getauxval() and the regular > vdso_init_from_sysinfo_ehdr(). > > The impleme

Re: [PATCH v2 11/16] selftests: vDSO: parse_vdso: Drop vdso_init_from_auxv()

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > There are no users left. > > This also removes the usage of ElfXX_auxv_t, > which is not formally standardized. > > Signed-off-by: Thomas Weißschuh Reviewed-by: Vincenzo Frascino > --- > tools/testing/selftests/vDSO/parse_vdso.c | 14

Re: [PATCH v2 12/16] selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > To allow the usage of parse_vdso.c together with a limited libc like > nolibc, use the kernels own elf.h and auxvec.h headers. > > Signed-off-by: Thomas Weißschuh Reviewed-by: Vincenzo Frascino > --- > tools/testing/selftests/vDSO/Makefile

Re: [PATCH v2 13/16] selftests: vDSO: parse_vdso: Test __SIZEOF_LONG__ instead of ULONG_MAX

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > According to limits.h(2) ULONG_MAX is only guaranteed to expand to an > expression, not a symbolic constant which can be evaluated by the > preprocessor. > Specifically the definition of ULONG_MAX from nolibc can no be evaluated > by the preprocesso

[PATCH v1 1/2] kunit, slub: Add test_kfree_rcu_wq_destroy use case

2025-02-28 Thread Uladzislau Rezki (Sony)
Add a test_kfree_rcu_wq_destroy test to verify a kmem_cache_destroy() from a workqueue context. The problem is that, before destroying any cache the kvfree_rcu_barrier() is invoked to guarantee that in-flight freed objects are flushed. The _barrier() function queues and flushes its own internal wo

[PATCH v1 2/2] mm/slab/kvfree_rcu: Switch to WQ_MEM_RECLAIM wq

2025-02-28 Thread Uladzislau Rezki (Sony)
Currently kvfree_rcu() APIs use a system workqueue which is "system_unbound_wq" to driver RCU machinery to reclaim a memory. Recently, it has been noted that the following kernel warning can be observed: workqueue: WQ_MEM_RECLAIM nvme-wq:nvme_scan_work is flushing !WQ_MEM_RECLAIM events_unbound

Re: [PATCH v2 02/16] elf, uapi: Add definition for STN_UNDEF

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > The definition is used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the definition to the kernels own UAPI headers. > > Link: https://refspecs.linuxfoundation.org/elf/gabi4+

Re: [PATCH v2 04/16] elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the definitions to the kernels own UAPI headers. > > Link: https://docs.oracle.com/cd/E19683-01/816-138

Re: [PATCH v2 05/16] elf, uapi: Add type ElfXX_Versym

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > The types are used by tools/testing/selftests/vDSO/parse_vdso.c. > To be able to build the vDSO selftests without a libc dependency, > add the types to the kernels own UAPI headers. > > As documented by elf(5). > > Reviewed-by: Kees Cook > Signed

[RFC PATCH 27/31] KVM: selftests: Extend savic test with idle halt testing

2025-02-28 Thread Neeraj Upadhyay
Add idle halt entry and exit on pending events test for Secure AVIC guests. Secure AVIC guests require idle halt intercept to be enabled. Without idle halt intercept being enabled, guest can block in halt forever as hv does not have access to APIC_IRR state to check for pending events. Signed-off-

[RFC PATCH 04/31] Add GHCB allocations and helpers

2025-02-28 Thread Neeraj Upadhyay
From: Peter Gonda Add GHCB management functionality similar to the ucall management. Allows for selftest vCPUs to acquire GHCBs for their usage. Cc: Vishal Annapurve Cc: Ackerley Tng Cc: Paolo Bonzini Cc: Claudio Imbrenda Cc: Sean Christopherson Cc: Carlos Bilbao Cc: Tom Lendacky Cc: Mich

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-28 Thread Miguel Ojeda
On Fri, Feb 28, 2025 at 6:29 AM Alistair Popple wrote: > > I'm not sure I agree it works perfectly fine. Developer ergonomics are > an important aspect of any build environment, and I'd argue the ergonomic > limitation for (2) means it is at least somewhat broken and needs fixing. > > Anyway thank

Re: [PATCH v2 6/9] selftests/mm: Print some details when uffd-stress gets bad params

2025-02-28 Thread Brendan Jackman
On Fri, 21 Feb 2025 at 19:26, Brendan Jackman wrote: > nr_pages_per_cpu = bytes / page_size / nr_threads; > if (!nr_pages_per_cpu) { > - _err("invalid MiB"); > + _err("pages_per_cpu = 0, cannot test (%lu / %lu / %lu)", > + nr_pages_

Re: [PATCH v2 14/16] selftests: vDSO: vdso_test_gettimeofday: Clean up includes

2025-02-28 Thread Vincenzo Frascino
On 26/02/2025 11:44, Thomas Weißschuh wrote: > Some unnecessary headers are included, remove them. > > Signed-off-by: Thomas Weißschuh Reviewed-by: Vincenzo Frascino > --- > tools/testing/selftests/vDSO/vdso_test_gettimeofday.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/too

[RFC PATCH 30/31] KVM: selftests: Add NMI test for SAVIC guests

2025-02-28 Thread Neeraj Upadhyay
Extend SAVIC test with various NMI tests: - Test NMI injection failure when AllowedNMI is not set by guest. - Test NMI injection when 2 NMIs are pending. - Test ICR based cross-VCPU NMI for fixed-phys, fixed-logical, broadcast-all and broadcast-exclself modes. Signed-off-by: Neeraj Upadhyay

[RFC PATCH 25/31] KVM: selftests: Add Secure AVIC APIC regs test

2025-02-28 Thread Neeraj Upadhyay
Add a APIC regs to verify APIC register updates at various stages in Secure AVIC guest's APIC enablement. In summary, do below validations: - Verify that the initial reset of APIC is xapic. - Values written by SAVIC guest in xapic mode are propagated to host APIC state. - APIC regs state updates

  1   2   >