[PATCH v2 3/4] kunit: Fix possible memory leak in kunit_filter_suites()

2023-09-20 Thread Jinjie Ruan
If the outer layer for loop is iterated more than once and it fails not in the first iteration, the filtered_suite and filtered_suite->test_cases allocated in the last kunit_filter_attr_tests() in last inner for loop is leaked. So add a new free_filtered_suite err label and free the filtered_suite

[PATCH v2 4/4] kunit: test: Fix the possible memory leak in executor_test

2023-09-20 Thread Jinjie Ruan
When CONFIG_KUNIT_ALL_TESTS=y, making CONFIG_DEBUG_KMEMLEAK=y and CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y, the below memory leak is detected. If kunit_filter_suites() succeeds, not only copy but also filtered_suite and filtered_suite->test_cases should be freed. So use kunit_free_suite_set() to free th

[PATCH v2 2/4] kunit: Fix the wrong kfree of copy for kunit_filter_suites()

2023-09-20 Thread Jinjie Ruan
If the outer layer for loop is iterated more than once and it fails not in the first iteration, the copy pointer has been moved. So it should free the original copy's backup copy_start. Fixes: abbf73816b6f ("kunit: fix possible memory leak in kunit_filter_suites()") Signed-off-by: Jinjie Ruan Rev

[PATCH v2 1/4] kunit: Fix missed memory release in kunit_free_suite_set()

2023-09-20 Thread Jinjie Ruan
modprobe cpumask_kunit and rmmod cpumask_kunit, kmemleak detect a suspected memory leak as below. If kunit_filter_suites() in kunit_module_init() succeeds, the suite_set.start will not be NULL and the kunit_free_suite_set() in kunit_module_exit() should free all the memory which has not been freed

[PATCH v2 0/4] kunit: Fix some bugs in kunit

2023-09-20 Thread Jinjie Ruan
The test_cases is not freed in kunit_free_suite_set(). And the copy pointer may be moved in kunit_filter_suites(). The filtered_suite and filtered_suite->test_cases allocated in the last kunit_filter_attr_tests() in last inner for loop may be leaked if kunit_filter_suites() fails. If kunit_filte

Re: [PATCH 6/6] iommu/vt-d: Add domain_alloc_user op

2023-09-20 Thread Baolu Lu
On 9/20/23 9:10 PM, Liu, Yi L wrote: + + domain = iommu_domain_alloc(dev->bus); No need to bounce between core and driver. Just, intel_iommu_domain_alloc(IOMMU_DOMAIN_UNMANAGED); and fully initialize it before return. If you are going to do that then intel_iommu_domain_alloc() s

Re: [PATCH 3/4] KVM: riscv: selftests: Fix ISA_EXT register handling in get-reg-list

2023-09-20 Thread Atish Patra
On Wed, Sep 20, 2023 at 6:56 AM Anup Patel wrote: > > On Wed, Sep 20, 2023 at 1:24 AM Atish Patra wrote: > > > > On Mon, Sep 18, 2023 at 11:07 AM Anup Patel wrote: > > > > > > Same set of ISA_EXT registers are not present on all host because > > > ISA_EXT registers are visible to the KVM user sp

Re: [RFC PATCH v2 0/9] iov_iter: kunit: Cleanup, abstraction and more tests

2023-09-20 Thread David Howells
David Howells wrote: > Hi Jens, > > Can you consider taking this through the block tree? Sorry, I forgot to remove the 'RFC' tag in the subject. David

Re: [PATCH v3 0/3] Add a test to catch unprobed Devicetree devices

2023-09-20 Thread Nícolas F . R . A . Prado
On Wed, Sep 20, 2023 at 02:56:29PM -0500, Rob Herring wrote: > On Wed, Sep 20, 2023 at 10:03:06AM -0400, Nícolas F. R. A. Prado wrote: > > On Mon, Aug 28, 2023 at 05:13:09PM -0400, Nícolas F. R. A. Prado wrote: > > > > > > Regressions that cause a device to no longer be probed by a driver can > >

Re: [RFC PATCH v2 5/9] iov_iter: Create a function to prepare userspace VM for UBUF/IOVEC tests

2023-09-20 Thread David Howells
David Howells wrote: > diff --git a/arch/loongarch/include/asm/page.h > b/arch/loongarch/include/asm/page.h > index 63f137ce82a4..c7c5f5b4c0d3 100644 > --- a/arch/loongarch/include/asm/page.h > +++ b/arch/loongarch/include/asm/page.h > @@ -32,6 +32,7 @@ > > #include > #include > +#include

Re: [PATCH V7 0/7] amd-pstate preferred core

2023-09-20 Thread Mario Limonciello
On 9/20/2023 14:34, Oleksandr Natalenko wrote: Hello. On středa 20. září 2023 18:56:09 CEST Mario Limonciello wrote: When applied on top of v6.5.3 this breaks turbo on my 5950X after suspend/resume cycle. Please see the scenario description below. If I boot v6.5.3 + this patchset, then `turbo

Re: [PATCH v3 0/3] Add a test to catch unprobed Devicetree devices

2023-09-20 Thread Rob Herring
On Wed, Sep 20, 2023 at 10:03:06AM -0400, Nícolas F. R. A. Prado wrote: > On Mon, Aug 28, 2023 at 05:13:09PM -0400, Nícolas F. R. A. Prado wrote: > > > > Regressions that cause a device to no longer be probed by a driver can > > have a big impact on the platform's functionality, and despite being

Re: [PATCH V7 0/7] amd-pstate preferred core

2023-09-20 Thread Oleksandr Natalenko
Hello. On středa 20. září 2023 18:56:09 CEST Mario Limonciello wrote: > > When applied on top of v6.5.3 this breaks turbo on my 5950X after > > suspend/resume cycle. Please see the scenario description below. > > > > If I boot v6.5.3 + this patchset, then `turbostat` reports ~4.9 GHz on core >

Re: selftests: user_events: ftrace_test: Internal error: Oops: 0000000096000021

2023-09-20 Thread Beau Belgrave
On Wed, Sep 20, 2023 at 03:20:58PM +0100, Mark Rutland wrote: > Hi Naresh, > > As a general thing, for arm64 issues could you please Cc the linux-arm-kernel > mailing list? > > On Wed, Sep 20, 2023 at 02:40:24PM +0200, Naresh Kamboju wrote: > > Following selftests: user_events: ftrace_test runnin

Re: [PATCH V7 0/7] amd-pstate preferred core

2023-09-20 Thread Mario Limonciello
On 9/19/2023 14:01, Oleksandr Natalenko wrote: Meng Li (7): x86: Drop CPU_SUP_INTEL from SCHED_MC_PRIO for the expansion. acpi: cppc: Add get the highest performance cppc control cpufreq: amd-pstate: Enable amd-pstate preferred core supporting. cpufreq: Add a notification message that

Re: [PATCH] kselftest/alsa: pcm-test: Report cards declared in config but missing

2023-09-20 Thread Mark Brown
On Tue, Sep 19, 2023 at 11:26:21AM -0400, Nícolas F. R. A. Prado wrote: > When parsing the configs, keep track of card configurations that match > the current system but haven't matched any card, and report those as > test failures as they represent that a card which was expected to be > present on

Re: [PATCH] kselftest/alsa: pcm-test: Report cards declared in config but missing

2023-09-20 Thread Takashi Iwai
On Tue, 19 Sep 2023 17:26:21 +0200, Nícolas F. R. A. Prado wrote: > > When parsing the configs, keep track of card configurations that match > the current system but haven't matched any card, and report those as > test failures as they represent that a card which was expected to be > present on th

Re: [PATCH 2/3] userfaultfd: UFFDIO_REMAP uABI

2023-09-20 Thread Jann Horn
On Wed, Sep 20, 2023 at 3:49 AM Suren Baghdasaryan wrote: > On Tue, Sep 19, 2023 at 4:51 PM Jann Horn wrote: > > On Wed, Sep 20, 2023 at 1:08 AM Suren Baghdasaryan > > wrote: > > > On Thu, Sep 14, 2023 at 7:28 PM Jann Horn wrote: > > > > On Thu, Sep 14, 2023 at 5:26 PM Suren Baghdasaryan > >

Re: [PATCH v2 4/4] KVM: riscv: selftests: Selectively filter-out AIA registers

2023-09-20 Thread Andrew Jones
On Wed, Sep 20, 2023 at 09:16:08PM +0530, Anup Patel wrote: > Currently the AIA ONE_REG registers are reported by get-reg-list > as new registers for various vcpu_reg_list configs whenever Ssaia > is available on the host because Ssaia extension can only be > disabled by Smstateen extension which i

[PATCH v2 2/4] RISC-V: KVM: Fix riscv_vcpu_get_isa_ext_single() for missing extensions

2023-09-20 Thread Anup Patel
The riscv_vcpu_get_isa_ext_single() should fail with -ENOENT error when corresponding ISA extension is not available on the host. Fixes: e98b1085be79 ("RISC-V: KVM: Factor-out ONE_REG related code to its own source file") Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Andrew Jo

[PATCH v2 4/4] KVM: riscv: selftests: Selectively filter-out AIA registers

2023-09-20 Thread Anup Patel
Currently the AIA ONE_REG registers are reported by get-reg-list as new registers for various vcpu_reg_list configs whenever Ssaia is available on the host because Ssaia extension can only be disabled by Smstateen extension which is not always available. To tackle this, we should filter-out AIA ON

[PATCH v2 3/4] KVM: riscv: selftests: Fix ISA_EXT register handling in get-reg-list

2023-09-20 Thread Anup Patel
Same set of ISA_EXT registers are not present on all host because ISA_EXT registers are visible to the KVM user space based on the ISA extensions available on the host. Also, disabling an ISA extension using corresponding ISA_EXT register does not affect the visibility of the ISA_EXT register itsel

[PATCH v2 1/4] RISC-V: KVM: Fix KVM_GET_REG_LIST API for ISA_EXT registers

2023-09-20 Thread Anup Patel
The ISA_EXT registers to enabled/disable ISA extensions for VCPU are always available when underlying host has the corresponding ISA extension. The copy_isa_ext_reg_indices() called by the KVM_GET_REG_LIST API does not align with this expectation so let's fix it. Fixes: 031f9efafc08 ("KVM: riscv:

[PATCH v2 0/4] KVM RISC-V fixes for ONE_REG interface

2023-09-20 Thread Anup Patel
This series includes few assorted fixes for KVM RISC-V ONE_REG interface and KVM_GET_REG_LIST API. These patches can also be found in riscv_kvm_onereg_fixes_v2 branch at: https://github.com/avpatel/linux.git Changes since v1: - Addressed Drew's comments in PATCH4 Anup Patel (4): RISC-V: KVM:

Re: selftests: user_events: ftrace_test: Internal error: Oops: 0000000096000021

2023-09-20 Thread Mark Rutland
Hi Naresh, As a general thing, for arm64 issues could you please Cc the linux-arm-kernel mailing list? On Wed, Sep 20, 2023 at 02:40:24PM +0200, Naresh Kamboju wrote: > Following selftests: user_events: ftrace_test running on arm64 Juno-r2 > Linux next-20230919. > Reported-by: Linux Kernel Functi

Re: [PATCH v3 0/3] Add a test to catch unprobed Devicetree devices

2023-09-20 Thread Nícolas F . R . A . Prado
On Mon, Aug 28, 2023 at 05:13:09PM -0400, Nícolas F. R. A. Prado wrote: > > Regressions that cause a device to no longer be probed by a driver can > have a big impact on the platform's functionality, and despite being > relatively common there isn't currently any generic test to detect them. > As

Re: [PATCH 3/4] KVM: riscv: selftests: Fix ISA_EXT register handling in get-reg-list

2023-09-20 Thread Anup Patel
On Wed, Sep 20, 2023 at 1:24 AM Atish Patra wrote: > > On Mon, Sep 18, 2023 at 11:07 AM Anup Patel wrote: > > > > Same set of ISA_EXT registers are not present on all host because > > ISA_EXT registers are visible to the KVM user space based on the > > ISA extensions available on the host. Also,

Re: [PATCH 4/4] KVM: riscv: selftests: Selectively filter-out AIA registers

2023-09-20 Thread Anup Patel
On Wed, Sep 20, 2023 at 1:43 AM Atish Patra wrote: > > On Mon, Sep 18, 2023 at 11:07 AM Anup Patel wrote: > > > > Currently the AIA ONE_REG registers are reported by get-reg-list > > as new registers for various vcpu_reg_list configs whenever Ssaia > > is available on the host because Ssaia exten

Re: [PATCH 4/4] KVM: riscv: selftests: Selectively filter-out AIA registers

2023-09-20 Thread Anup Patel
On Wed, Sep 20, 2023 at 10:54 AM Andrew Jones wrote: > > On Mon, Sep 18, 2023 at 11:36:46PM +0530, Anup Patel wrote: > > Currently the AIA ONE_REG registers are reported by get-reg-list > > as new registers for various vcpu_reg_list configs whenever Ssaia > > is available on the host because Ssaia

Re: [PATCH -fixes] riscv: kselftests: Fix mm build by removing testcases subdirectory

2023-09-20 Thread patchwork-bot+linux-riscv
Hello: This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt : On Fri, 15 Sep 2023 12:01:13 +0200 you wrote: > kselftests fails to build because the mm/testcases subdirectory is not > created and then the compiler fails to output the binary there. > > So fix this by simply removing

RE: [PATCH 6/6] iommu/vt-d: Add domain_alloc_user op

2023-09-20 Thread Liu, Yi L
> From: Baolu Lu > Sent: Wednesday, September 20, 2023 1:29 PM > > On 9/19/23 5:25 PM, Yi Liu wrote: > > This adds the domain_alloc_user op implementation. It supports allocating > > domains to be used as parent under nested translation. > > Documentation/process/submitting-patches.rst: > > Des

Re: [PATCH 6/6] iommu/vt-d: Add domain_alloc_user op

2023-09-20 Thread Jason Gunthorpe
On Wed, Sep 20, 2023 at 01:10:04PM +, Liu, Yi L wrote: > > From: Jason Gunthorpe > > Sent: Wednesday, September 20, 2023 9:05 PM > > > > On Wed, Sep 20, 2023 at 01:28:41PM +0800, Baolu Lu wrote: > > > > > > > > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c > > > > ind

RE: [PATCH 6/6] iommu/vt-d: Add domain_alloc_user op

2023-09-20 Thread Liu, Yi L
> From: Yang, Weijiang > Sent: Wednesday, September 20, 2023 1:41 PM > On 9/19/2023 5:25 PM, Yi Liu wrote: > > This adds the domain_alloc_user op implementation. It supports allocating > > domains to be used as parent under nested translation. > > > > Signed-off-by: Yi Liu > > --- > > drivers/i

RE: [PATCH 6/6] iommu/vt-d: Add domain_alloc_user op

2023-09-20 Thread Liu, Yi L
> From: Jason Gunthorpe > Sent: Wednesday, September 20, 2023 9:05 PM > > On Wed, Sep 20, 2023 at 01:28:41PM +0800, Baolu Lu wrote: > > > > > > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c > > > index 5db283c17e0d..491bcde1ff96 100644 > > > --- a/drivers/iommu/intel/iomm

[RFC PATCH v2 3/9] iov_iter: Consolidate the test vector struct in the kunit tests

2023-09-20 Thread David Howells
Consolidate the test vector struct in the kunit tests so that the bvec pattern check helpers can share with the kvec check helpers. Signed-off-by: David Howells cc: Christoph Hellwig cc: Christian Brauner cc: Jens Axboe cc: Al Viro cc: David Hildenbrand cc: John Hubbard cc: Brendan Higgins

[RFC PATCH v2 7/9] iov_iter: Add extract kunit tests for ITER_UBUF and ITER_IOVEC

2023-09-20 Thread David Howells
Add extraction kunit tests for ITER_UBUF- and ITER_IOVEC-type iterators. This attaches a userspace VM with a mapped file in it temporarily to the test thread. [!] Note that this requires the kernel thread running the test to obtain and deploy an mm_struct so that a user-side buffer can be created

[RFC PATCH v2 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-20 Thread David Howells
Add kunit tests to benchmark 256MiB copies to a UBUF iterator and an IOVEC iterator. This attaches a userspace VM with a mapped file in it temporarily to the test thread. Signed-off-by: David Howells cc: Andrew Morton cc: Christoph Hellwig cc: Christian Brauner cc: Jens Axboe cc: Al Viro cc

[RFC PATCH v2 5/9] iov_iter: Create a function to prepare userspace VM for UBUF/IOVEC tests

2023-09-20 Thread David Howells
Create a function to set up a userspace VM for the kunit testing thread and set up a buffer within it such that ITER_UBUF and ITER_IOVEC tests can be performed. Note that this requires current->mm to point to a sufficiently set up mm_struct. This is done by partially mirroring what execve does.

[RFC PATCH v2 2/9] iov_iter: Consolidate some of the repeated code into helpers

2023-09-20 Thread David Howells
Consolidate some of the repeated code snippets into helper functions to reduce the line count. Signed-off-by: David Howells cc: Christoph Hellwig cc: Christian Brauner cc: Jens Axboe cc: Al Viro cc: David Hildenbrand cc: John Hubbard cc: Brendan Higgins cc: David Gow cc: linux-kselftest@v

Re: [PATCH 6/6] iommu/vt-d: Add domain_alloc_user op

2023-09-20 Thread Jason Gunthorpe
On Wed, Sep 20, 2023 at 01:41:07PM +0800, Yang, Weijiang wrote: > On 9/19/2023 5:25 PM, Yi Liu wrote: > > This adds the domain_alloc_user op implementation. It supports allocating > > domains to be used as parent under nested translation. > > > > Signed-off-by: Yi Liu > > --- > > drivers/iommu/

Re: [PATCH 6/6] iommu/vt-d: Add domain_alloc_user op

2023-09-20 Thread Jason Gunthorpe
On Wed, Sep 20, 2023 at 01:28:41PM +0800, Baolu Lu wrote: > > > > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c > > index 5db283c17e0d..491bcde1ff96 100644 > > --- a/drivers/iommu/intel/iommu.c > > +++ b/drivers/iommu/intel/iommu.c > > @@ -4074,6 +4074,25 @@ static struct

[RFC PATCH v2 6/9] iov_iter: Add copy kunit tests for ITER_UBUF and ITER_IOVEC

2023-09-20 Thread David Howells
Add copy kunit tests for ITER_UBUF- and ITER_IOVEC-type iterators. This attaches a userspace VM with a mapped file in it temporarily to the test thread. Signed-off-by: David Howells cc: Andrew Morton cc: Christoph Hellwig cc: Christian Brauner cc: Jens Axboe cc: Al Viro cc: Matthew Wilcox

[RFC PATCH v2 4/9] iov_iter: Consolidate bvec pattern checking

2023-09-20 Thread David Howells
Make the BVEC-testing functions use the consolidated pattern checking functions to reduce the amount of duplicated code. Signed-off-by: David Howells cc: Christoph Hellwig cc: Christian Brauner cc: Jens Axboe cc: Al Viro cc: David Hildenbrand cc: John Hubbard cc: Brendan Higgins cc: David

[RFC PATCH v2 8/9] iov_iter: Add benchmarking kunit tests

2023-09-20 Thread David Howells
Add kunit tests to benchmark 256MiB copies to a KVEC iterator, a BVEC iterator, an XARRAY iterator and to a loop that allocates 256-page BVECs and fills them in (similar to a maximal bio struct being set up). Signed-off-by: David Howells cc: Christoph Hellwig cc: Christian Brauner cc: Jens Axbo

[RFC PATCH v2 0/9] iov_iter: kunit: Cleanup, abstraction and more tests

2023-09-20 Thread David Howells
Hi Jens, Can you consider taking this through the block tree? These patches make some changes to the kunit tests previously added for iov_iter testing, in particular adding testing of UBUF/IOVEC iterators and some benchmarking: (1) Clean up a couple of checkpatch style complaints. (2) Consoli

[RFC PATCH v2 1/9] iov_iter: Fix some checkpatch complaints in kunit tests

2023-09-20 Thread David Howells
Fix some checkpatch complaints in the new iov_iter kunit tests: (1) Some lines had eight spaces instead of a tab at the start. (2) Checkpatch doesn't like (void*)(unsigned long)0xnULL, so switch to using POISON_POINTER_DELTA plus an offset instead. Reported-by: Johannes Thumshirn Sig

selftests: user_events: ftrace_test: Internal error: Oops: 0000000096000021

2023-09-20 Thread Naresh Kamboju
Following selftests: user_events: ftrace_test running on arm64 Juno-r2 Linux next-20230919. Reported-by: Linux Kernel Functional Testing kselftest: Running tests in user_events TAP version 13 1..4 # timeout set to 90 # selftests: user_events: ftrace_test [ 1138.755735] Unable to handle kernel pa

Re: [PATCH net-next v4 6/6] selftests: forwarding: bridge_fdb_learning_limit: Add a new selftest

2023-09-20 Thread Nikolay Aleksandrov
On 9/19/23 11:12, Johannes Nixdorf wrote: Add a suite covering the fdb_n_learned and fdb_max_learned bridge features, touching all special cases in accounting at least once. Signed-off-by: Johannes Nixdorf --- tools/testing/selftests/net/forwarding/Makefile| 3 +- .../net/forwarding/br

Re: [PATCH net-next v4 5/6] net: bridge: Add a configurable default FDB learning limit

2023-09-20 Thread Nikolay Aleksandrov
On 9/19/23 11:12, Johannes Nixdorf wrote: Add a Kconfig option to configure a default FDB learning limit system wide, so a distributor building a special purpose kernel can limit all created bridges by default. The limit is only a soft default setting and overrideable on a per bridge basis using

Re: [PATCH net-next v4 4/6] net: bridge: Add netlink knobs for number / max learned FDB entries

2023-09-20 Thread Nikolay Aleksandrov
On 9/19/23 11:12, Johannes Nixdorf wrote: The previous patch added accounting and a limit for the number of dynamically learned FDB entries per bridge. However it did not provide means to actually configure those bounds or read back the count. This patch does that. Two new netlink attributes are

Re: [PATCH net-next v4 3/6] net: bridge: Track and limit dynamically learned FDB entries

2023-09-20 Thread Nikolay Aleksandrov
On 9/19/23 11:12, Johannes Nixdorf wrote: A malicious actor behind one bridge port may spam the kernel with packets with a random source MAC address, each of which will create an FDB entry, each of which is a dynamic allocation in the kernel. There are roughly 2^48 different MAC addresses, furth

Re: [PATCH net-next v4 2/6] net: bridge: Set strict_start_type for br_policy

2023-09-20 Thread Nikolay Aleksandrov
On 9/19/23 11:12, Johannes Nixdorf wrote: Set any new attributes added to br_policy to be parsed strictly, to prevent userspace from passing garbage. Signed-off-by: Johannes Nixdorf --- net/bridge/br_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_netlink.c b/ne

Re: [PATCH net-next v4 1/6] net: bridge: Set BR_FDB_ADDED_BY_USER early in fdb_add_entry

2023-09-20 Thread Nikolay Aleksandrov
On 9/19/23 11:12, Johannes Nixdorf wrote: In preparation of the following fdb limit for dynamically learned entries, allow fdb_create to detect that the entry was added by the user. This way it can skip applying the limit in this case. Signed-off-by: Johannes Nixdorf --- net/bridge/br_fdb.c |

Re: [PATCH v2 0/6] selftests/resctrl: Fixes to failing tests

2023-09-20 Thread Maciej Wieczór-Retman
Hi, looks good to me. Also ran it without problems on Intel(R) Xeon(R) Platinum 8360Y. Reviewed-by: Maciej Wieczor-Retman Tested-by: Maciej Wieczor-Retman -- Kind regards Maciej Wieczór-Retman

[PATCH v2] kunit: Warn if tests are slow

2023-09-20 Thread Maxime Ripard
Kunit recently gained support to setup attributes, the first one being the speed of a given test, then allowing to filter out slow tests. A slow test is defined in the documentation as taking more than one second. There's an another speed attribute called "super slow" but whose definition is less

Re: [PATCH 7/7] KVM: riscv: selftests: Add condops extensions to get-reg-list test

2023-09-20 Thread Andrew Jones
On Tue, Sep 19, 2023 at 09:23:43AM +0530, Anup Patel wrote: > We have a new conditional operations related ISA extensions so let us add > these extensions to get-reg-list test. > > Signed-off-by: Anup Patel > --- > tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 > 1 file changed, 4 in

Re: [PATCH 6/7] KVM: riscv: selftests: Add smstateen registers to get-reg-list test

2023-09-20 Thread Andrew Jones
On Tue, Sep 19, 2023 at 09:23:42AM +0530, Anup Patel wrote: > We have a new smstateen registers as separate sub-type of CSR ONE_REG > interface so let us add these registers to get-reg-list test. > > Signed-off-by: Anup Patel > --- > .../selftests/kvm/riscv/get-reg-list.c| 34 +++

Re: [PATCH 5/7] KVM: riscv: selftests: Add senvcfg register to get-reg-list test

2023-09-20 Thread Andrew Jones
On Tue, Sep 19, 2023 at 09:23:41AM +0530, Anup Patel wrote: > We have a new senvcfg register in the general CSR ONE_REG interface > so let us add it to get-reg-list test. > > Signed-off-by: Anup Patel > --- > tools/testing/selftests/kvm/riscv/get-reg-list.c | 3 +++ > 1 file changed, 3 insertion

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

2023-09-20 Thread Andrew Jones
On Tue, Sep 19, 2023 at 09:23:40AM +0530, Anup Patel wrote: > We extend the KVM ISA extension ONE_REG interface to allow KVM > user space to detect and enable Zicond extension for Guest/VM. > > Signed-off-by: Anup Patel > --- > arch/riscv/include/uapi/asm/kvm.h | 1 + > arch/riscv/kvm/vcpu_onere

Re: [PATCH 3/7] RISC-V: KVM: Allow XVentanaCondOps extension for Guest/VM

2023-09-20 Thread Andrew Jones
On Tue, Sep 19, 2023 at 09:23:39AM +0530, Anup Patel wrote: > We extend the KVM ISA extension ONE_REG interface to allow KVM > user space to detect and enable XVentanaCondOps extension for > Guest/VM. > > Signed-off-by: Anup Patel > --- > arch/riscv/include/uapi/asm/kvm.h | 1 + > arch/riscv/kvm

Re: [PATCH 2/7] RISC-V: Detect Zicond from ISA string

2023-09-20 Thread Andrew Jones
On Tue, Sep 19, 2023 at 09:23:38AM +0530, Anup Patel wrote: > The RISC-V integer conditional (Zicond) operation extension defines > standard conditional arithmetic and conditional-select/move operations > which are inspired from the XVentanaCondOps extension. In fact, QEMU > RISC-V also has support

Re: [PATCH 1/7] RISC-V: Detect XVentanaCondOps from ISA string

2023-09-20 Thread Andrew Jones
On Tue, Sep 19, 2023 at 09:23:37AM +0530, Anup Patel wrote: > The Veyron-V1 CPU supports custom conditional arithmetic and > conditional-select/move operations referred to as XVentanaCondOps > extension. In fact, QEMU RISC-V also has support for emulating > XVentanaCondOps extension. > > Let us de

Re: [PATCH 4/4] KVM: riscv: selftests: Selectively filter-out AIA registers

2023-09-20 Thread Andrew Jones
On Wed, Sep 20, 2023 at 07:24:16AM +0200, Andrew Jones wrote: > On Mon, Sep 18, 2023 at 11:36:46PM +0530, Anup Patel wrote: > > Currently the AIA ONE_REG registers are reported by get-reg-list > > as new registers for various vcpu_reg_list configs whenever Ssaia > > is available on the host because

Re: [PATCH 1/2] kunit: Warn if tests are slow

2023-09-20 Thread Maxime Ripard
Hi, On Tue, Sep 19, 2023 at 03:48:55PM -0400, Rae Moar wrote: > On Mon, Sep 11, 2023 at 5:51 AM Maxime Ripard wrote: > > > > Kunit recently gained support to setup attributes, the first one being > > the speed of a given test, then allowing to filter out slow tests. > > > > A slow test is defined

Re: [PATCH 4/4] kunit: test: Fix the possible memory leak in executor_test

2023-09-20 Thread Ruan Jinjie
On 2023/9/20 5:19, Rae Moar wrote: > On Thu, Sep 14, 2023 at 7:47 AM 'Jinjie Ruan' via KUnit Development > wrote: >> >> If kunit_filter_suites() succeeds, not only copy but also filtered_suite >> and filtered_suite->test_cases should be freed. >> >> So use kunit_free_suite_set() to free the fil