Re: [PATCH v5 7/8] mm: thp: split huge page to any lower order pages

2024-02-28 Thread Ryan Roberts
Hi Zi, On 26/02/2024 20:55, Zi Yan wrote: > From: Zi Yan > > To split a THP to any lower order pages, we need to reform THPs on > subpages at given order and add page refcount based on the new page > order. Also we need to reinitialize page_deferred_list after removing > the page from the split

[PATCH net-next] selftests: net: Correct couple of spelling mistakes

2024-02-28 Thread Prabhav Kumar Vaish
Changes : - "excercise" is corrected to "exercise" in drivers/net/mlxsw/spectrum-2/tc_flower.sh - "mutliple" is corrected to "multiple" in drivers/net/netdevsim/ethtool-fec.sh Signed-off-by: Prabhav Kumar Vaish --- .../testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh

Re: [PATCH net-next] selftests: net: Correctcouple of spelling mistakes

2024-02-28 Thread prabhav kumar
On Wed, Feb 28, 2024 at 1:20 PM Jiri Pirko wrote: > > Please fix the patch subject to include appropriate prefixes and > rephrase a bit like this: > > Subject: [PATCH net-next] selftests: net: Correct couple of spelling mistakes > > pw-bot: cr > > > Tue, Feb 27, 2024 at 06:55:13PM CET, pvkumar5749

Re: [PATCH net-next] selftests: net: Correct couple of spelling mistakes

2024-02-28 Thread prabhav kumar
On Wed, Feb 28, 2024 at 1:20 PM Jiri Pirko wrote: > > Please fix the patch subject to include appropriate prefixes and > rephrase a bit like this: > > Subject: [PATCH net-next] selftests: net: Correct couple of spelling mistakes > > pw-bot: cr > > > Tue, Feb 27, 2024 at 06:55:13PM CET, pvkumar5749

Re: [PATCH v7 0/4] KVM: selftests: Add LoongArch support

2024-02-28 Thread maobibo
ping. Can it be merged for 6.9? Regards Bibo Mao On 2024/2/2 下午12:10, Bibo Mao wrote: This patchset adds KVM selftests for LoongArch system, currently only some common test cases are supported and pass to run. These testcase are listed as following: demand_paging_test dirty_l

Re: [PATCH net-next] selftests: net: Correct couple of spelling mistakes

2024-02-28 Thread Jiri Pirko
Prabhav, I'm not sure what you are trying to do, but you have to re-submit the patch, preferably using git-send-email or another email client you use. Wed, Feb 28, 2024 at 09:42:01AM CET, pvkumar5749...@gmail.com wrote: >On Wed, Feb 28, 2024 at 1:20 PM Jiri Pirko wrote: >> >> Please fix the patc

Re: [PATCH v10] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests

2024-02-28 Thread Geert Uytterhoeven
CC testing On Wed, Feb 28, 2024 at 8:59 AM Guenter Roeck wrote: > On 2/27/24 23:25, Christophe Leroy wrote: > [ ... ] > >> > >> This test case is supposed to be as true to the "general case" as > >> possible, so I have aligned the data along 14 + NET_IP_ALIGN. On ARM > >> this will be a 16-byte b

Re: [PATCH v5 1/8] mm/huge_memory: only split PMD mapping when necessary in unmap_folio()

2024-02-28 Thread David Hildenbrand
On 26.02.24 21:55, Zi Yan wrote: From: Zi Yan As multi-size THP support is added, not all THPs are PMD-mapped, thus during a huge page split, there is no need to always split PMD mapping in unmap_folio(). Make it conditional. Signed-off-by: Zi Yan --- mm/huge_memory.c | 7 +-- 1 file c

Re: [PATCH v5 6/8] mm: page_owner: add support for splitting to any order in split page_owner.

2024-02-28 Thread David Hildenbrand
On 26.02.24 21:55, Zi Yan wrote: From: Zi Yan It adds a new_order parameter to set new page order in page owner. It prepares for upcoming changes to support split huge page to any lower order. Signed-off-by: Zi Yan --- include/linux/page_owner.h | 13 - mm/huge_memory.c

Re: [PATCH RFC bpf-next v3 08/16] bpf/verifier: do_misc_fixups for is_bpf_timer_set_sleepable_cb_kfunc

2024-02-28 Thread Benjamin Tissoires
On Wed, Feb 28, 2024 at 2:49 AM Alexei Starovoitov wrote: > > On Tue, Feb 27, 2024 at 8:51 AM Benjamin Tissoires > wrote: > > > > On Tue, Feb 27, 2024 at 5:36 PM Eduard Zingerman wrote: > > > > > > On Tue, 2024-02-27 at 17:18 +0100, Benjamin Tissoires wrote: > > > [...] > > > > > > > Hmm, I must

Re: [PATCH v2 1/2] selftests/dmabuf-heap: conform test to TAP format output

2024-02-28 Thread Muhammad Usama Anjum
On 2/27/24 10:18 PM, T.J. Mercier wrote: > On Tue, Feb 27, 2024 at 4:21 AM Muhammad Usama Anjum > wrote: >> >> Conform the layout, informational and status messages to TAP. No >> functional change is intended other than the layout of output messages. >> >> Signed-off-by: Muhammad Usama Anjum >> -

[PATCH net-next] Correct couple of spelling mistakes

2024-02-28 Thread Prabhav Kumar Vaish
Changes : - "excercise" is corrected to "exercise" in drivers/net/mlxsw/spectrum-2/tc_flower.sh - "mutliple" is corrected to "multiple" in drivers/net/netdevsim/ethtool-fec.sh Signed-off-by: Prabhav Kumar Vaish --- .../testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh

[PATCH net-next] selftests: net: Correct couple of spelling mistakes

2024-02-28 Thread Prabhav Kumar Vaish
Changes : - "excercise" is corrected to "exercise" in drivers/net/mlxsw/spectrum-2/tc_flower.sh - "mutliple" is corrected to "multiple" in drivers/net/netdevsim/ethtool-fec.sh Signed-off-by: Prabhav Kumar Vaish --- .../testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh

Re: [PATCH net-next] selftests: net: Correct couple of spelling mistakes

2024-02-28 Thread Jiri Pirko
Wed, Feb 28, 2024 at 09:24:16AM CET, pvkumar5749...@gmail.com wrote: >Changes : > - "excercise" is corrected to "exercise" in > drivers/net/mlxsw/spectrum-2/tc_flower.sh > - "mutliple" is corrected to "multiple" in > drivers/net/netdevsim/ethtool-fec.sh > >Signed-off-by: Prabhav Kumar

Re: [PATCH net-next] selftests: net: Correct couple of spelling mistakes

2024-02-28 Thread prabhav kumar
On Wed, Feb 28, 2024 at 3:02 PM Jiri Pirko wrote: > > Prabhav, I'm not sure what you are trying to do, but you have to > re-submit the patch, preferably using git-send-email or another email > client you use. >> Sorry for that. >> Re-Submitted the patch. > > > Wed, Feb 28, 2024 at 09:42:01AM CET,

Re: [PATCH 1/5] RISC-V: KVM: Forward SEED CSR access to user space

2024-02-28 Thread Andrew Jones
On Wed, Feb 14, 2024 at 06:07:53PM +0530, Anup Patel wrote: > The SEED CSR access from VS/VU mode (guest) will always trap to > HS-mode (KVM) when Zkr extension is available to the Guest/VM. > > We must forward this CSR access to KVM user space so that it > can be emulated based on the method chos

Re: [PATCH 2/5] RISC-V: KVM: Allow Ztso extension for Guest/VM

2024-02-28 Thread Andrew Jones
On Wed, Feb 14, 2024 at 06:07:54PM +0530, Anup Patel wrote: > We extend the KVM ISA extension ONE_REG interface to allow KVM > user space to detect and enable Ztso extension for Guest/VM. > > Signed-off-by: Anup Patel > --- > arch/riscv/include/uapi/asm/kvm.h | 1 + > arch/riscv/kvm/vcpu_onereg.

Re: [PATCH 3/5] KVM: riscv: selftests: Add Ztso extension to get-reg-list test

2024-02-28 Thread Andrew Jones
On Wed, Feb 14, 2024 at 06:07:55PM +0530, Anup Patel wrote: > The KVM RISC-V allows Ztso extension for Guest/VM so let us > add this extension to get-reg-list test. > > Signed-off-by: Anup Patel > --- > tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 > 1 file changed, 4 insertions(+)

Re: [PATCH net-next] Correct couple of spelling mistakes

2024-02-28 Thread Jiri Pirko
You sent this already here: https://lore.kernel.org/all/20240228082416.416882-1-pvkumar5749...@gmail.com/ I don't understand why you send this again. Could you slow down a bit please?

Re: [PATCH 4/5] RISC-V: KVM: Allow Zacas extension for Guest/VM

2024-02-28 Thread Andrew Jones
On Wed, Feb 14, 2024 at 06:07:56PM +0530, Anup Patel wrote: > We extend the KVM ISA extension ONE_REG interface to allow KVM > user space to detect and enable Zacas extension for Guest/VM. > > Signed-off-by: Anup Patel > --- > arch/riscv/include/uapi/asm/kvm.h | 1 + > arch/riscv/kvm/vcpu_onereg

Re: [PATCH bpf-next v2] selftests/bpf: Move test_dev_cgroup to prog_tests

2024-02-28 Thread Muhammad Usama Anjum
On 2/21/24 7:06 PM, Muhammad Usama Anjum wrote: > On 2/21/24 2:22 PM, Muhammad Usama Anjum wrote: >> Move test_dev_cgroup.c to prog_tests/dev_cgroup.c to be able to run it >> with test_progs. Replace dev_cgroup.bpf.o with skel header file, >> dev_cgroup.skel.h and load program from it accourdingly.

Re: [PATCH 5/5] KVM: riscv: selftests: Add Zacas extension to get-reg-list test

2024-02-28 Thread Andrew Jones
On Wed, Feb 14, 2024 at 06:07:57PM +0530, Anup Patel wrote: > The KVM RISC-V allows Zacas extension for Guest/VM so let us > add this extension to get-reg-list test. > > Signed-off-by: Anup Patel > --- > tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 > 1 file changed, 4 insertions(+)

Re: [PATCH net-next] selftests: net: Correct couple of spelling mistakes

2024-02-28 Thread Jiri Pirko
Again, you sent this already here: https://lore.kernel.org/all/20240228082416.416882-1-pvkumar5749...@gmail.com/ Could you please avoid duplicates like this? Also, note there is 24h rule not to repost the same patch. Could you please read: https://www.kernel.org/doc/html/v6.6/process/maintainer-ne

Re: [PATCH v10] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests

2024-02-28 Thread Guenter Roeck
On 2/28/24 02:15, Geert Uytterhoeven wrote: CC testing On Wed, Feb 28, 2024 at 8:59 AM Guenter Roeck wrote: On 2/27/24 23:25, Christophe Leroy wrote: [ ... ] This test case is supposed to be as true to the "general case" as possible, so I have aligned the data along 14 + NET_IP_ALIGN. On ARM

Re: [PATCH v5 7/8] mm: thp: split huge page to any lower order pages

2024-02-28 Thread Zi Yan
On 28 Feb 2024, at 3:23, Ryan Roberts wrote: > Hi Zi, > > > On 26/02/2024 20:55, Zi Yan wrote: >> From: Zi Yan >> >> To split a THP to any lower order pages, we need to reform THPs on >> subpages at given order and add page refcount based on the new page >> order. Also we need to reinitialize pag

Re: [PATCH v5 7/8] mm: thp: split huge page to any lower order pages

2024-02-28 Thread Ryan Roberts
On 28/02/2024 15:42, Zi Yan wrote: > On 28 Feb 2024, at 3:23, Ryan Roberts wrote: > >> Hi Zi, >> >> >> On 26/02/2024 20:55, Zi Yan wrote: >>> From: Zi Yan >>> >>> To split a THP to any lower order pages, we need to reform THPs on >>> subpages at given order and add page refcount based on the new

Re: [PATCH v5 7/8] mm: thp: split huge page to any lower order pages

2024-02-28 Thread Zi Yan
Hi Andrew, On 26 Feb 2024, at 15:55, Zi Yan wrote: > From: Zi Yan > > To split a THP to any lower order pages, we need to reform THPs on > subpages at given order and add page refcount based on the new page > order. Also we need to reinitialize page_deferred_list after removing > the page from t

Re: [RFC PATCH v5 05/29] KVM: selftests: Add helper functions to create TDX VMs

2024-02-28 Thread Binbin Wu
On 12/13/2023 4:46 AM, Sagi Shahar wrote: From: Erdem Aktas TDX requires additional IOCTLs to initialize VM and vCPUs to add private memory and to finalize the VM memory. Also additional utility functions are provided to manipulate a TD, similar to those that manipulate a VM in the current s

Re: [PATCH v2 0/7] tracing/probes: Support function parameter access from return probe

2024-02-28 Thread Jiri Olsa
On Mon, Feb 26, 2024 at 12:57:53PM +0900, Masami Hiramatsu (Google) wrote: > Hi, > > Here is version 2 series of patches to support accessing function entry data > from function *return* probes (including kretprobe and fprobe-exit event). > > In this version, I added another cleanup [4/7], update

Re: [PATCH v4 5/7] arm64: Unconditionally call unflatten_device_tree()

2024-02-28 Thread Rob Herring
On Tue, Feb 27, 2024 at 05:34:58PM +, Mark Rutland wrote: > On Fri, Feb 23, 2024 at 11:17:02AM -0700, Rob Herring wrote: > > On Fri, Feb 23, 2024 at 3:23 AM Will Deacon wrote: > > > > > > On Thu, Feb 22, 2024 at 05:03:17PM -0700, Rob Herring wrote: > > > > On Fri, Feb 16, 2024 at 05:05:54PM -0

Re: [PATCH v3 00/13] security: digest_cache LSM

2024-02-28 Thread Roberto Sassu
On Fri, 2024-02-09 at 15:09 +0100, Roberto Sassu wrote: > From: Roberto Sassu > > Introduce the digest_cache LSM, whose purpose is to deliver reference > digest values to integrity providers, such as IMA and IPE, abstracting to > them how those digests where extracted from the respective data sou

Re: [PATCH v2 1/2] selftests/dmabuf-heap: conform test to TAP format output

2024-02-28 Thread T.J. Mercier
On Wed, Feb 28, 2024 at 3:46 AM Muhammad Usama Anjum wrote: > > On 2/27/24 10:18 PM, T.J. Mercier wrote: > > On Tue, Feb 27, 2024 at 4:21 AM Muhammad Usama Anjum > > wrote: > >> > >> Conform the layout, informational and status messages to TAP. No > >> functional change is intended other than the

Re: [PATCH v2 1/2] selftests/dmabuf-heap: conform test to TAP format output

2024-02-28 Thread T.J. Mercier
On Tue, Feb 27, 2024 at 4:21 AM Muhammad Usama Anjum wrote: ... > +static int numer_of_heaps(void) > +{ > + DIR *d = opendir(DEVPATH); > + struct dirent *dir; > + int heaps = 0; > + > + while ((dir = readdir(d))) { > + if (!strncmp(dir->d_name, ".", 2)) > +

Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API

2024-02-28 Thread Mark Brown
#x27; of git://anongit.freedesktop.org/drm/drm-misc git bisect good 75d8cf735082728a5dfb7e46926ee184851cc519 # bad: [20af1ca418d2c0b11bc2a1fe8c0c88f67bcc2a7e] Add linux-next specific files for 20240228 git bisect bad 20af1ca418d2c0b11bc2a1fe8c0c88f67bcc2a7e # good: [1322f1801e59dddce10591d602d246c1b

Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API

2024-02-28 Thread Sean Christopherson
gt; >https://lava.sirena.org.uk/scheduler/job/645026#L1581 > > Bisect log: > > git bisect start > # good: [75d8cf735082728a5dfb7e46926ee184851cc519] Merge branch > 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc > git bisect good 75d8cf735082728a5dfb

lock warnings in dev_addr_lists test

2024-02-28 Thread Guenter Roeck
Hi, when running the dev_addr_lists unit test with lock debugging enabled, I always get the following lockdep warning. [7.031327] [7.031393] WARNING: kunit_try_catch/1886 still has locks held! [7.031478] 6.8.0-rc6-00053-g0fec7343edb5-dirty #1 Taint

Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API

2024-02-28 Thread Sean Christopherson
Oliver and/or Marc, question for y'all towards the bottom. On Wed, Feb 28, 2024, Sean Christopherson wrote: > On Wed, Feb 28, 2024, Mark Brown wrote: > > On Thu, Feb 08, 2024 at 09:48:39PM +0100, Thomas Huth wrote: > > > From: Sean Christopherson > > > > > > Extract the code to set a vCPU's entr

Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API

2024-02-28 Thread Oliver Upton
+cc Raghavendra Hey, On Wed, Feb 28, 2024 at 01:19:48PM -0800, Sean Christopherson wrote: > but due to a different issue that is fixed in the kvm-arm tree[*], but not in > mine, > I built without -Werror and didn't see the new warn in the sea of GUEST_PRINTF > warnings. > > Ugh, and I still can

Re: [PATCH v3 0/8] Use TAP in some more x86 KVM selftests

2024-02-28 Thread Sean Christopherson
On Mon, Feb 26, 2024, Sean Christopherson wrote: > On Thu, 08 Feb 2024 21:48:36 +0100, Thomas Huth wrote: > > Basic idea of this series is now to use the kselftest_harness.h > > framework to get TAP output in the tests, so that it is easier > > for the user to see what is going on, and e.g. to be a

Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API

2024-02-28 Thread Oliver Upton
I really should fix the CC list _before_ drafting a reply... On Wed, Feb 28, 2024 at 09:29:56PM +, Oliver Upton wrote: > +cc Raghavendra See below :) > Hey, > > On Wed, Feb 28, 2024 at 01:19:48PM -0800, Sean Christopherson wrote: > > but due to a different issue that is fixed in the kvm-arm

Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API

2024-02-28 Thread Sean Christopherson
On Wed, Feb 28, 2024, Oliver Upton wrote: > +cc Raghavendra > > Hey, > > On Wed, Feb 28, 2024 at 01:19:48PM -0800, Sean Christopherson wrote: > > but due to a different issue that is fixed in the kvm-arm tree[*], but not > > in mine, > > I built without -Werror and didn't see the new warn in the

Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API

2024-02-28 Thread Mark Brown
On Wed, Feb 28, 2024 at 01:19:48PM -0800, Sean Christopherson wrote: > I'll squash the above and force push. Thanks, I'll give that a spin (likely tomorrow at this point). > And another question: is there any reason to not force -Werror for selftests? Enabling it by default can cause a bunch of

Re: kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.8-rc1-56-g539cd3f4da3f)

2024-02-28 Thread Shuah Khan
On 2/28/24 00:21, kernelci.org bot wrote: kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.8-rc1-56-g539cd3f4da3f) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+--

[PATCH 0/3] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2024-02-28 Thread Helen Koike
Dear Kernel Community, This patch introduces a `.gitlab-ci` file along with a `ci/` folder, defining a basic test pipeline triggered by code pushes to a GitLab-CI instance. This initial version includes static checks (checkpatch and smatch for now) and build tests across various architectures and

[PATCH 1/3] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2024-02-28 Thread Helen Koike
This patch introduces a `.gitlab-ci` file along with a `ci/` folder, defininga basic test pipeline triggered by code pushes to a GitLab-CI instance. This initial version includes static checks (checkpatch and smatch for now) and build tests across various architectures and configurations. It levera

[PATCH 2/3] kci-gitlab: Add documentation

2024-02-28 Thread Helen Koike
Add documentation of kci-gitlab. Signed-off-by: Helen Koike --- Documentation/ci/gitlab-ci/gitlab-ci.rst | 404 +++ Documentation/index.rst | 7 + MAINTAINERS | 1 + 3 files changed, 412 insertions(+) create mode 100644 Docum

Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API

2024-02-28 Thread Raghavendra Rao Ananta
Hey Oliver, +cc Shaoqin On Wed, Feb 28, 2024 at 1:30 PM Oliver Upton wrote: > > +cc Raghavendra > > Hey, > > On Wed, Feb 28, 2024 at 01:19:48PM -0800, Sean Christopherson wrote: > > but due to a different issue that is fixed in the kvm-arm tree[*], but not > > in mine, > > I built without -Werr

Re: [PATCH 0/3] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2024-02-28 Thread Laurent Pinchart
Hi Helen, I appreciate the amount of work you've put into this, to improve testing of the kernel as a whole. I'll need more time to answer, but please see below for a quick comment already. On Wed, Feb 28, 2024 at 07:55:24PM -0300, Helen Koike wrote: > Dear Kernel Community, > > This patch intro

[PATCH v4 00/12] selftests: kselftest_harness: support using xfail

2024-02-28 Thread Jakub Kicinski
Hi! When running selftests for our subsystem in our CI we'd like all tests to pass. Currently some tests use SKIP for cases they expect to fail, because the kselftest_harness limits the return codes to pass/fail/skip. XFAIL which would be a great match here cannot be used. Remove the no_print han

[PATCH v4 01/12] selftests/landlock: Redefine TEST_F() as TEST_F_FORK()

2024-02-28 Thread Jakub Kicinski
From: Mickaël Salaün This has the effect of creating a new test process for either TEST_F() or TEST_F_FORK(), which doesn't change tests but will ease potential backports. See next commit for the TEST_F_FORK() merge into TEST_F(). Cc: Günther Noack Cc: Kees Cook Cc: Shuah Khan Cc: Will Drewr

[PATCH v4 02/12] selftests/harness: Merge TEST_F_FORK() into TEST_F()

2024-02-28 Thread Jakub Kicinski
From: Mickaël Salaün Replace Landlock-specific TEST_F_FORK() with an improved TEST_F() which brings four related changes: Run TEST_F()'s tests in a grandchild process to make it possible to drop privileges and delegate teardown to the parent. Compared to TEST_F_FORK(), simplify handling of the

[PATCH v4 03/12] selftests: kselftest_harness: use KSFT_* exit codes

2024-02-28 Thread Jakub Kicinski
Now that we no longer need low exit codes to communicate assertion steps - use normal KSFT exit codes. Acked-by: Kees Cook Tested-by: Jakub Sitnicki Signed-off-by: Jakub Kicinski --- CC: keesc...@chromium.org CC: l...@amacapital.net CC: w...@chromium.org CC: sh...@kernel.org CC: m...@digikod.ne

[PATCH v4 04/12] selftests: kselftest_harness: generate test name once

2024-02-28 Thread Jakub Kicinski
Since we added variant support generating full test case name takes 4 string arguments. We're about to need it in another two places. Stop the duplication and print once into a temporary buffer. Suggested-by: Jakub Sitnicki Acked-by: Kees Cook Signed-off-by: Jakub Kicinski --- tools/testing/se

[PATCH v4 05/12] selftests: kselftest_harness: save full exit code in metadata

2024-02-28 Thread Jakub Kicinski
Instead of tracking passed = 0/1 rename the field to exit_code and invert the values so that they match the KSFT_* exit codes. This will allow us to fold SKIP / XFAIL into the same value. Signed-off-by: Jakub Kicinski --- tools/testing/selftests/kselftest_harness.h | 48 +++ to

[PATCH v4 06/12] selftests: kselftest_harness: use exit code to store skip

2024-02-28 Thread Jakub Kicinski
We always use skip in combination with exit_code being 0 (KSFT_PASS). This are basic KSFT / KTAP semantics. Store the right KSFT_* code in exit_code directly. This makes it easier to support tests reporting other extended KSFT_* codes like XFAIL / XPASS. Reviewed-by: Kees Cook Signed-off-by: Jak

[PATCH v4 07/12] selftests: kselftest: add ksft_test_result_code(), handling all exit codes

2024-02-28 Thread Jakub Kicinski
For generic test harness code it's more useful to deal with exit codes directly, rather than having to switch on them and call the right ksft_test_result_*() helper. Add such function to kselftest.h. Note that "directive" and "diagnostic" are what ktap docs call those parts of the message. Review

[PATCH v4 08/12] selftests: kselftest_harness: print test name for SKIP

2024-02-28 Thread Jakub Kicinski
Jakub points out that for parsers it's rather useful to always have the test name on the result line. Currently if we SKIP (or soon XFAIL or XPASS), we will print: ok 17 # SKIP SCTP doesn't support IP_BIND_ADDRESS_NO_PORT ^ no test name Always print the test name. KTAP format seems to

[PATCH v4 09/12] selftests: kselftest_harness: separate diagnostic message with # in ksft_test_result_code()

2024-02-28 Thread Jakub Kicinski
According to the spec we should always print a # if we add a diagnostic message. Having the caller pass in the new line as part of diagnostic message makes handling this a bit counter-intuitive, so append the new line in the helper. Reviewed-by: Kees Cook Signed-off-by: Jakub Kicinski --- tools

[PATCH v4 10/12] selftests: kselftest_harness: let PASS / FAIL provide diagnostic

2024-02-28 Thread Jakub Kicinski
Switch to printing KTAP line for PASS / FAIL with ksft_test_result_code(), this gives us the ability to report diagnostic messages. Reviewed-by: Kees Cook Signed-off-by: Jakub Kicinski --- tools/testing/selftests/kselftest_harness.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)

[PATCH v4 11/12] selftests: kselftest_harness: support using xfail

2024-02-28 Thread Jakub Kicinski
Currently some tests report skip for things they expect to fail e.g. when given combination of parameters is known to be unsupported. This is confusing because in an ideal test environment and fully featured kernel no tests should be skipped. Selftest summary line already includes xfail and xpass

[PATCH v4 12/12] selftests: ip_local_port_range: use XFAIL instead of SKIP

2024-02-28 Thread Jakub Kicinski
SCTP does not support IP_LOCAL_PORT_RANGE and we know it, so use XFAIL instead of SKIP. Reviewed-by: Kees Cook Signed-off-by: Jakub Kicinski --- tools/testing/selftests/net/ip_local_port_range.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/ne

[PATCH v4 00/15] RISC-V SBI v2.0 PMU improvements and Perf sampling in KVM guest

2024-02-28 Thread Atish Patra
This series implements SBI PMU improvements done in SBI v2.0[1] i.e. PMU snapshot and fw_read_hi() functions. SBI v2.0 introduced PMU snapshot feature which allows the SBI implementation to provide counter information (i.e. values/overflow status) via a shared memory between the SBI implementati

[PATCH v4 01/15] RISC-V: Fix the typo in Scountovf CSR name

2024-02-28 Thread Atish Patra
The counter overflow CSR name is "scountovf" not "sscountovf". Fix the csr name. Fixes: 4905ec2fb7e6 ("RISC-V: Add sscofpmf extension support") Reviewed-by: Conor Dooley Reviewed-by: Anup Patel Signed-off-by: Atish Patra --- arch/riscv/include/asm/csr.h | 2 +- arch/riscv/include/asm/

[PATCH v4 02/15] RISC-V: Add FIRMWARE_READ_HI definition

2024-02-28 Thread Atish Patra
SBI v2.0 added another function to SBI PMU extension to read the upper bits of a counter with width larger than XLEN. Add the definition for that function. Acked-by: Conor Dooley Reviewed-by: Anup Patel Signed-off-by: Atish Patra --- arch/riscv/include/asm/sbi.h | 1 + 1 file changed, 1 inser

[PATCH v4 03/15] drivers/perf: riscv: Read upper bits of a firmware counter

2024-02-28 Thread Atish Patra
SBI v2.0 introduced a explicit function to read the upper 32 bits for any firmwar counter width that is longer than 32bits. This is only applicable for RV32 where firmware counter can be 64 bit. Acked-by: Palmer Dabbelt Reviewed-by: Conor Dooley Reviewed-by: Anup Patel Signed-off-by: Atish Patr

[PATCH v4 04/15] RISC-V: Add SBI PMU snapshot definitions

2024-02-28 Thread Atish Patra
SBI PMU Snapshot function optimizes the number of traps to higher privilege mode by leveraging a shared memory between the S/VS-mode and the M/HS mode. Add the definitions for that extension and new error codes. Reviewed-by: Anup Patel Acked-by: Palmer Dabbelt Signed-off-by: Atish Patra --- ar

[PATCH v4 05/15] drivers/perf: riscv: Implement SBI PMU snapshot function

2024-02-28 Thread Atish Patra
SBI v2.0 SBI introduced PMU snapshot feature which adds the following features. 1. Read counter values directly from the shared memory instead of csr read. 2. Start multiple counters with initial values with one SBI call. These functionalities optimizes the number of traps to the higher privilege

[PATCH v4 06/15] RISC-V: KVM: No need to update the counter value during reset

2024-02-28 Thread Atish Patra
The virtual counter value is updated during pmu_ctr_read. There is no need to update it in reset case. Otherwise, it will be counted twice which is incorrect. Fixes: 0cb74b65d2e5 ("RISC-V: KVM: Implement perf support without sampling") Reviewed-by: Anup Patel Signed-off-by: Atish Patra --- arch

[PATCH v4 07/15] RISC-V: KVM: No need to exit to the user space if perf event failed

2024-02-28 Thread Atish Patra
Currently, we return a linux error code if creating a perf event failed in kvm. That shouldn't be necessary as guest can continue to operate without perf profiling or profiling with firmware counters. Return appropriate SBI error code to indicate that PMU configuration failed. An error message in

[PATCH v4 08/15] RISC-V: KVM: Implement SBI PMU Snapshot feature

2024-02-28 Thread Atish Patra
PMU Snapshot function allows to minimize the number of traps when the guest access configures/access the hpmcounters. If the snapshot feature is enabled, the hypervisor updates the shared memory with counter data and state of overflown counters. The guest can just read the shared memory instead of

[PATCH v4 09/15] RISC-V: KVM: Add perf sampling support for guests

2024-02-28 Thread Atish Patra
KVM enables perf for guest via counter virtualization. However, the sampling can not be supported as there is no mechanism to enabled trap/emulate scountovf in ISA yet. Rely on the SBI PMU snapshot to provide the counter overflow data via the shared memory. In case of sampling event, the host firs

[PATCH v4 10/15] RISC-V: KVM: Support 64 bit firmware counters on RV32

2024-02-28 Thread Atish Patra
The SBI v2.0 introduced a fw_read_hi function to read 64 bit firmware counters for RV32 based systems. Add infrastructure to support that. Reviewed-by: Anup Patel Signed-off-by: Atish Patra --- arch/riscv/include/asm/kvm_vcpu_pmu.h | 4 ++- arch/riscv/kvm/vcpu_pmu.c | 37 +

[PATCH v4 11/15] KVM: riscv: selftests: Add Sscofpmf to get-reg-list test

2024-02-28 Thread Atish Patra
The KVM RISC-V allows Sscofpmf extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Atish Patra --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/too

[PATCH v4 12/15] KVM: riscv: selftests: Add SBI PMU extension definitions

2024-02-28 Thread Atish Patra
The SBI PMU extension definition is required for upcoming SBI PMU selftests. Signed-off-by: Atish Patra --- .../selftests/kvm/include/riscv/processor.h | 67 +++ 1 file changed, 67 insertions(+) diff --git a/tools/testing/selftests/kvm/include/riscv/processor.h b/tools/testin

[PATCH v4 14/15] KVM: riscv: selftests: Add a test for PMU snapshot functionality

2024-02-28 Thread Atish Patra
Verify PMU snapshot functionality by setting up the shared memory correctly and reading the counter values from the shared memory instead of the CSR. Signed-off-by: Atish Patra --- .../selftests/kvm/include/riscv/processor.h | 25 .../selftests/kvm/lib/riscv/processor.c | 12 ++ t

[PATCH v4 13/15] KVM: riscv: selftests: Add SBI PMU selftest

2024-02-28 Thread Atish Patra
This test implements basic sanity test and cycle/instret event counting tests. Signed-off-by: Atish Patra --- tools/testing/selftests/kvm/Makefile| 1 + tools/testing/selftests/kvm/riscv/sbi_pmu.c | 340 2 files changed, 341 insertions(+) create mode 100644 tools/

[PATCH v4 15/15] KVM: riscv: selftests: Add a test for counter overflow

2024-02-28 Thread Atish Patra
Add a test for verifying overflow interrupt. Currently, it relies on overflow support on cycle/instret events. This test works for cycle/ instret events which support sampling via hpmcounters on the platform. There are no ISA extensions to detect if a platform supports that. Thus, this test will fa

RE: [PATCH 1/3] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2024-02-28 Thread Bird, Tim
> -Original Message- > From: Helen Koike > > Hey all, > > You can check the validation of this patchset on: > https://gitlab.collabora.com/koike/linux/-/pipelines/87035 > > I would appreciate your feedback on this work, what do you think? > > If you would rate from 0 to 5

Re: [PATCH net-next] selftests: vxlan_mdb: Avoid duplicate test names

2024-02-28 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Tue, 27 Feb 2024 19:04:18 +0200 you wrote: > Rename some test cases to avoid overlapping test names which is > problematic for the kernel test robot. No changes in the test's logic. > > Suggested-by: Yujie Liu >

Re: [PATCH v2 0/7] tracing/probes: Support function parameter access from return probe

2024-02-28 Thread Google
On Wed, 28 Feb 2024 17:23:34 +0100 Jiri Olsa wrote: > On Mon, Feb 26, 2024 at 12:57:53PM +0900, Masami Hiramatsu (Google) wrote: > > Hi, > > > > Here is version 2 series of patches to support accessing function entry data > > from function *return* probes (including kretprobe and fprobe-exit eve

Re: [PATCH v3 3/8] KVM: selftests: Move setting a vCPU's entry point to a dedicated API

2024-02-28 Thread Oliver Upton
On Wed, Feb 28, 2024 at 03:00:03PM -0800, Raghavendra Rao Ananta wrote: [...] > I sent out a patch in the past to get rid of them [1], but Shaoqin is > currently making an effort to (fix and) use them in their tests [2]. > While we are still reviewing the series, we can apply [1] to unblock > ena

Re: [PATCH v2 0/7] tracing/probes: Support function parameter access from return probe

2024-02-28 Thread Google
On Thu, 29 Feb 2024 14:51:39 +0900 Masami Hiramatsu (Google) wrote: > On Wed, 28 Feb 2024 17:23:34 +0100 > Jiri Olsa wrote: > > > On Mon, Feb 26, 2024 at 12:57:53PM +0900, Masami Hiramatsu (Google) wrote: > > > Hi, > > > > > > Here is version 2 series of patches to support accessing function e

[PATCH v5 1/3] KVM: selftests: aarch64: Add helper function for the vpmu vcpu creation

2024-02-28 Thread Shaoqin Huang
Create a vcpu with vpmu would be a common requirement for the vpmu test, so add the helper function for the vpmu vcpu creation. And use those helper function in the vpmu_counter_access.c test. Use this chance to delete the meaningless ASSERT about the pmuver, because KVM does not advertise an IMP_

[PATCH v5 0/3] KVM: selftests: aarch64: Introduce pmu_event_filter_test

2024-02-28 Thread Shaoqin Huang
The test is inspired by the pmu_event_filter_test which implemented by x86. On the arm64 platform, there is the same ability to set the pmu_event_filter through the KVM_ARM_VCPU_PMU_V3_FILTER attribute. So add the test for arm64. The series first create the helper function which can be used for th

[PATCH v5 2/3] KVM: selftests: aarch64: Introduce pmu_event_filter_test

2024-02-28 Thread Shaoqin Huang
Introduce pmu_event_filter_test for arm64 platforms. The test configures PMUv3 for a vCPU, and sets different pmu event filters for the vCPU, and check if the guest can see those events which user allow and can't use those events which use deny. This test refactor the create_vpmu_vm() and make it

[PATCH v5 3/3] KVM: selftests: aarch64: Add invalid filter test in pmu_event_filter_test

2024-02-28 Thread Shaoqin Huang
Add the invalid filter test which sets the filter beyond the event space and sets the invalid action to double check if the KVM_ARM_VCPU_PMU_V3_FILTER will return the expected error. Signed-off-by: Shaoqin Huang --- .../kvm/aarch64/pmu_event_filter_test.c | 38 +++ 1 file c

Re: [PATCH v2 0/7] tracing/probes: Support function parameter access from return probe

2024-02-28 Thread Google
On Thu, 29 Feb 2024 15:38:55 +0900 Masami Hiramatsu (Google) wrote: > Hmm, this seems arch_rethook_trampoline caused the issue. > > And curiously, it depends on the number of stored data. > > OK: > /sys/kernel/tracing # echo 'f vfs_read%return $arg1 $arg2 $arg3' >> > dynamic_events > /sys/ker