Re: [PATCH v1 3/3] KVM: selftests: aarch64: Introduce pmu_event_filter_test

2023-11-27 Thread Eric Auger
Hi Shaoqin, On 11/23/23 07:37, Shaoqin Huang wrote: > Introduce pmu_event_filter_test for arm64 platforms. The test configures > PMUv3 for a vCPU, and sets different pmu event filter for the vCPU, and filters > check if the guest can use those events which user allow and can't use > those events w

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-27 Thread Conor Dooley
Hi, On Fri, Nov 24, 2023 at 08:21:37AM +0100, Christoph Muellner wrote: > From: Christoph Müllner > > The upcoming RISC-V Ssdtso specification introduces a bit in the senvcfg > CSR to switch the memory consistency model at run-time from RVWMO to TSO > (and back). The active consistency model can

lsm_list_modules_test.c:104:22: error: 'LSM_ID_IMA' undeclared (first use in this function); did you mean 'LSM_ID_YAMA'?

2023-11-27 Thread Naresh Kamboju
Following build errors noticed while building selftests lsm tests for x86 with gcc-13 toolchain on Linux next-20231127 tag. Build log: -- selftest/lsm/lsm_list_modules_test lsm_list_modules_test.c: In function 'correct_lsm_list_modules': lsm_list_modules_test.c:104:22: error: &

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-27 Thread Peter Zijlstra
On Fri, Nov 24, 2023 at 09:51:53PM -0500, Guo Ren wrote: > On Fri, Nov 24, 2023 at 11:15:19AM +0100, Peter Zijlstra wrote: > > On Fri, Nov 24, 2023 at 08:21:37AM +0100, Christoph Muellner wrote: > > > From: Christoph Müllner > > > > > > The upcoming RISC-V Ssdtso specification introduces a bit in

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-27 Thread Mark Rutland
On Fri, Nov 24, 2023 at 12:54:30PM +0100, Peter Zijlstra wrote: > On Fri, Nov 24, 2023 at 12:04:09PM +0100, Jonas Oberhauser wrote: > > > I think ARM64 approached this problem by adding the > > > load-acquire/store-release instructions and for TSO based code, > > > translate into those (eg. x86 ->

Re: [PATCH net 4/4] selftests/net: mptcp: fix uninitialized variable warnings

2023-11-27 Thread Matthieu Baerts
Hi Willem, (+ cc MPTCP list) On 24/11/2023 18:15, Willem de Bruijn wrote: > From: Willem de Bruijn > > Same init_rng() in both tests. The function reads /dev/urandom to > initialize srand(). In case of failure, it falls back onto the > entropy in the uninitialized variable. Not sure if this is

Re: [PATCH net-next v2] net: ctnetlink: support filtering by zone

2023-11-27 Thread Pablo Neira Ayuso
Hi, On Mon, Nov 27, 2023 at 11:49:16AM +, Felix Huettner wrote: > conntrack zones are heavily used by tools like openvswitch to run > multiple virtual "routers" on a single machine. In this context each > conntrack zone matches to a single router, thereby preventing > overlapping IPs from beco

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-27 Thread Christoph Müllner
On Mon, Nov 27, 2023 at 11:37 AM Conor Dooley wrote: > > Hi, > > On Fri, Nov 24, 2023 at 08:21:37AM +0100, Christoph Muellner wrote: > > From: Christoph Müllner > > > > The upcoming RISC-V Ssdtso specification introduces a bit in the senvcfg > > CSR to switch the memory consistency model at run-t

Re: [PATCH net-next 01/38] selftests/net: add lib.sh

2023-11-27 Thread Petr Machata
Hangbin Liu writes: > On Fri, Nov 24, 2023 at 03:05:18PM +0100, Petr Machata wrote: >> >> Hangbin Liu writes: >> >> > +# Helpers >> > +busywait() >> > +{ >> > + local timeout=$1; shift >> > + >> > + local start_time="$(date -u +%s%3N)" >> > + while true >> > + do >> > + local ou

Re: [PATCH net-next 01/38] selftests/net: add lib.sh

2023-11-27 Thread Petr Machata
Hangbin Liu writes: > On Fri, Nov 24, 2023 at 03:35:51PM +0100, Petr Machata wrote: >> >> Hangbin Liu writes: >> >> > + fi >> > + done >> > + >> > + [ $errexit -eq 1 ] && set -e >> > + return 0 >> > +} >> > + >> > +# By default, remove all netns before EXIT. >> > +cleanup_all_ns(

Re: [RFC PATCH 2/5] RISC-V: Expose Ssdtso via hwprobe API

2023-11-27 Thread Samuel Holland
Hi Christoph, On 2023-11-24 1:21 AM, Christoph Muellner wrote: > From: Christoph Müllner > > This patch adds Ssdtso to the list of extensions which > are announced to user-space using te hwprobe API. > > Signed-off-by: Christoph Müllner > --- > Documentation/arch/riscv/hwprobe.rst | 3 +++ >

Re: [PATCH net 1/4] selftests/net: ipsec: fix constant out of range

2023-11-27 Thread Dmitry Safonov
On 11/24/23 17:15, Willem de Bruijn wrote: > From: Willem de Bruijn > > Fix a small compiler warning. > > nr_process must be a signed long: it is assigned a signed long by > strtol() and is compared against LONG_MIN and LONG_MAX. > > ipsec.c:2280:65: > error: result of comparison of constan

Re: [RFC PATCH 2/5] RISC-V: Expose Ssdtso via hwprobe API

2023-11-27 Thread Christoph Müllner
On Mon, Nov 27, 2023 at 3:32 PM Samuel Holland wrote: > > Hi Christoph, > > On 2023-11-24 1:21 AM, Christoph Muellner wrote: > > From: Christoph Müllner > > > > This patch adds Ssdtso to the list of extensions which > > are announced to user-space using te hwprobe API. > > > > Signed-off-by: Chri

Re: lsm_list_modules_test.c:104:22: error: 'LSM_ID_IMA' undeclared (first use in this function); did you mean 'LSM_ID_YAMA'?

2023-11-27 Thread Paul Moore
On Mon, Nov 27, 2023 at 5:43 AM Naresh Kamboju wrote: > > Following build errors noticed while building selftests lsm tests for x86 > with gcc-13 toolchain on Linux next-20231127 tag. > > Build log: > -- > selftest/lsm/lsm_list_modules_test > lsm_list_mod

Re: [PATCH net 4/4] selftests/net: mptcp: fix uninitialized variable warnings

2023-11-27 Thread Willem de Bruijn
Matthieu Baerts wrote: > Hi Willem, > > (+ cc MPTCP list) > > On 24/11/2023 18:15, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > Same init_rng() in both tests. The function reads /dev/urandom to > > initialize srand(). In case of failure, it falls back onto the > > entropy in the u

Re: [PATCH net-next 0/5] selftests: tc-testing: updates and cleanups for tdc

2023-11-27 Thread Jamal Hadi Salim
On Fri, Nov 24, 2023 at 10:43 AM Pedro Tammela wrote: > > Address the recommendations from the previous series and cleanup some > leftovers. > > Pedro Tammela (5): > selftests: tc-testing: remove buildebpf plugin > selftests: tc-testing: remove unnecessary time.sleep > selftests: tc-testing:

Re: [PATCH net 4/4] selftests/net: mptcp: fix uninitialized variable warnings

2023-11-27 Thread Matthieu Baerts
On 27/11/2023 16:46, Willem de Bruijn wrote: > Matthieu Baerts wrote: >> Hi Willem, >> >> (+ cc MPTCP list) >> >> On 24/11/2023 18:15, Willem de Bruijn wrote: >>> From: Willem de Bruijn >>> >>> Same init_rng() in both tests. The function reads /dev/urandom to >>> initialize srand(). In case of fai

Re: [PATCH v3 06/25] KVM: arm64: Save/restore POE registers

2023-11-27 Thread Marc Zyngier
On Fri, 24 Nov 2023 16:34:51 +, Joey Gouly wrote: > > Define the new system registers that POE introduces and context switch them. I would really like to see a discussion on the respective lifetimes of these two registers (see below). > > Signed-off-by: Joey Gouly > Cc: Marc Zyngier > Cc:

[PATCH v6 3/6] zswap: make shrinking memcg-aware

2023-11-27 Thread Nhat Pham
From: Domenico Cerasuolo Currently, we only have a single global LRU for zswap. This makes it impossible to perform worload-specific shrinking - an memcg cannot determine which pages in the pool it owns, and often ends up writing pages from other memcgs. This issue has been previously observed in

[PATCH v6 4/6] mm: memcg: add per-memcg zswap writeback stat

2023-11-27 Thread Nhat Pham
From: Domenico Cerasuolo Since zswap now writes back pages from memcg-specific LRUs, we now need a new stat to show writebacks count for each memcg. Suggested-by: Nhat Pham Signed-off-by: Domenico Cerasuolo Signed-off-by: Nhat Pham --- include/linux/vm_event_item.h | 1 + mm/memcontrol.c

[PATCH v6 1/6] list_lru: allows explicit memcg and NUMA node selection

2023-11-27 Thread Nhat Pham
The interface of list_lru is based on the assumption that the list node and the data it represents belong to the same allocated on the correct node/memcg. While this assumption is valid for existing slab objects LRU such as dentries and inodes, it is undocumented, and rather inflexible for certain

[PATCH v6 0/6] workload-specific and memory pressure-driven zswap writeback

2023-11-27 Thread Nhat Pham
Changelog: v6: * Rebase on top of latest mm-unstable. * Fix/improve the in-code documentation of the new list_lru manipulation functions (patch 1) v5: * Replace reference getting with an rcu_read_lock() section for zswap lru modifications (suggested by Yosry) * Add a new prep

[PATCH v6 6/6] zswap: shrinks zswap pool based on memory pressure

2023-11-27 Thread Nhat Pham
Currently, we only shrink the zswap pool when the user-defined limit is hit. This means that if we set the limit too high, cold data that are unlikely to be used again will reside in the pool, wasting precious memory. It is hard to predict how much zswap space will be needed ahead of time, as this

[PATCH] cgroup/cpuset: Expose cpuset.cpus.isolated

2023-11-27 Thread Waiman Long
The root-only cpuset.cpus.isolated control file shows the current set of isolated CPUs in isolated partitions. This control file is currently exposed only with the cgroup_debug boot command line option which also adds the ".__DEBUG__." prefix. This is actually a useful control file if users want to

Re: [PATCH v6 2/6] iommufd: Add IOMMU_HWPT_INVALIDATE

2023-11-27 Thread Nicolin Chen
On Fri, Nov 24, 2023 at 02:36:29AM +, Tian, Kevin wrote: > > > > > > >> + * @out_driver_error_code: Report a driver speicifc error code > > upon > > > > > > failure. > > > > > > >> + * It's optional, driver has a choice > > > > > > >> to fill it or > > > > > > >> + *

Re: [PATCH ipsec-next v1 6/7] bpf: selftests: test_tunnel: Disable CO-RE relocations

2023-11-27 Thread Daniel Xu
On Sun, Nov 26, 2023 at 09:53:04PM -0800, Yonghong Song wrote: > > On 11/27/23 12:44 AM, Yonghong Song wrote: > > > > On 11/26/23 8:52 PM, Eduard Zingerman wrote: > > > On Sun, 2023-11-26 at 18:04 -0600, Daniel Xu wrote: > > > [...] > > > > > Tbh I'm not sure. This test passes with preserve_stati

Re: [PATCH v6 6/6] zswap: shrinks zswap pool based on memory pressure

2023-11-27 Thread Andrew Morton
On Mon, 27 Nov 2023 11:37:03 -0800 Nhat Pham wrote: > Currently, we only shrink the zswap pool when the user-defined limit is > hit. This means that if we set the limit too high, cold data that are > unlikely to be used again will reside in the pool, wasting precious > memory. It is hard to predi

Re: [PATCH v6 2/6] memcontrol: allows mem_cgroup_iter() to check for onlineness

2023-11-27 Thread Andrew Morton
On Mon, 27 Nov 2023 11:36:59 -0800 Nhat Pham wrote: > The new zswap writeback scheme requires an online-only memcg hierarchy > traversal. Add a new parameter to mem_cgroup_iter() to check for > onlineness before returning. I get a few build errors, perhaps because of patch timing issues... mm/s

Re: [PATCH v1 2/3] KVM: selftests: aarch64: Move the pmu helper function into lib/

2023-11-27 Thread Raghavendra Rao Ananta
Hi Shaoqin, On Wed, Nov 22, 2023 at 10:39 PM Shaoqin Huang wrote: > > Move those pmu helper function into lib/, thus it can be used by other > pmu test. > > Signed-off-by: Shaoqin Huang > --- > .../kvm/aarch64/vpmu_counter_access.c | 118 - > .../selftests/kvm/include/aa

Re: [PATCH v6 2/6] memcontrol: allows mem_cgroup_iter() to check for onlineness

2023-11-27 Thread Nhat Pham
On Mon, Nov 27, 2023 at 1:43 PM Andrew Morton wrote: > > On Mon, 27 Nov 2023 11:36:59 -0800 Nhat Pham wrote: > > > The new zswap writeback scheme requires an online-only memcg hierarchy > > traversal. Add a new parameter to mem_cgroup_iter() to check for > > onlineness before returning. > > I get

[PATCH v6 1/6] list_lru: allows explicit memcg and NUMA node selection (fix)

2023-11-27 Thread Nhat Pham
The original patch missed a list_lru_del() -> list_lru_del_obj() conversion. This patch fixed that. Signed-off-by: Nhat Pham --- drivers/android/binder_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c inde

[RFC PATCH v2 0/2] Add test to verify probe of devices from discoverable busses

2023-11-27 Thread Nícolas F . R . A . Prado
Hi, v1 [1] was discussed during Plumbers [2], where a lot of feedback was given. I hope to justify the changes in v2 and address the feedback here. One feedback from Shuah was that keeping per-platform files with the USB/PCI devices to test as part of the kselftest tree wasn't maintainable. One

[RFC PATCH v2 1/2] kselftest: Add test to verify probe of devices from discoverable busses

2023-11-27 Thread Nícolas F . R . A . Prado
Add a new test to verify that a list of expected devices on a given platform have been successfully probed by a driver. Add a new test to verify that all expected devices from discoverable busses (ie USB, PCI) have been successfully instantiated and probed by a driver. The per-platform list of ex

[PATCH v7 3/6] zswap: make shrinking memcg-aware

2023-11-27 Thread Nhat Pham
From: Domenico Cerasuolo Currently, we only have a single global LRU for zswap. This makes it impossible to perform worload-specific shrinking - an memcg cannot determine which pages in the pool it owns, and often ends up writing pages from other memcgs. This issue has been previously observed in

[PATCH v7 0/6] workload-specific and memory pressure-driven zswap writeback

2023-11-27 Thread Nhat Pham
Changelog: v7: * Added the mem_cgroup_iter_online() function to the API for the new behavior (suggested by Andrew Morton) (patch 2) * Fixed a missing list_lru_del -> list_lru_del_obj (patch 1) v6: * Rebase on top of latest mm-unstable. * Fix/improve the in-code documentation of the

[PATCH v7 2/6] memcontrol: add a new function to traverse online-only memcg hierarchy

2023-11-27 Thread Nhat Pham
The new zswap writeback scheme requires an online-only memcg hierarchy traversal. Add this functionality via the new mem_cgroup_iter_online() function - the old mem_cgroup_iter() is a special case of this new function. Suggested-by: Andrew Morton Signed-off-by: Nhat Pham --- include/linux/memco

[PATCH v7 6/6] zswap: shrinks zswap pool based on memory pressure

2023-11-27 Thread Nhat Pham
Currently, we only shrink the zswap pool when the user-defined limit is hit. This means that if we set the limit too high, cold data that are unlikely to be used again will reside in the pool, wasting precious memory. It is hard to predict how much zswap space will be needed ahead of time, as this

[PATCH v7 5/6] selftests: cgroup: update per-memcg zswap writeback selftest

2023-11-27 Thread Nhat Pham
From: Domenico Cerasuolo The memcg-zswap self test is updated to adjust to the behavior change implemented by commit 87730b165089 ("zswap: make shrinking memcg-aware"), where zswap performs writeback for specific memcg. Signed-off-by: Domenico Cerasuolo Signed-off-by: Nhat Pham --- tools/test

Re: [PATCH ipsec-next v1 6/7] bpf: selftests: test_tunnel: Disable CO-RE relocations

2023-11-27 Thread Daniel Xu
On Mon, Nov 27, 2023 at 02:45:11PM -0600, Daniel Xu wrote: > On Sun, Nov 26, 2023 at 09:53:04PM -0800, Yonghong Song wrote: > > > > On 11/27/23 12:44 AM, Yonghong Song wrote: > > > > > > On 11/26/23 8:52 PM, Eduard Zingerman wrote: > > > > On Sun, 2023-11-26 at 18:04 -0600, Daniel Xu wrote: > > >

Re: [RFC PATCH 0/5] RISC-V: Add dynamic TSO support

2023-11-27 Thread Guo Ren
On Mon, Nov 27, 2023 at 12:16:43PM +0100, Peter Zijlstra wrote: > On Fri, Nov 24, 2023 at 09:51:53PM -0500, Guo Ren wrote: > > On Fri, Nov 24, 2023 at 11:15:19AM +0100, Peter Zijlstra wrote: > > > On Fri, Nov 24, 2023 at 08:21:37AM +0100, Christoph Muellner wrote: > > > > From: Christoph Müllner >

Re: [PATCH net-next 1/5] selftests: tc-testing: remove buildebpf plugin

2023-11-27 Thread Jakub Kicinski
On Fri, 24 Nov 2023 12:42:44 -0300 Pedro Tammela wrote: > diff --git a/tools/testing/selftests/tc-testing/Makefile > b/tools/testing/selftests/tc-testing/Makefile > index b1fa2e177e2f..e8b3dde4fa16 100644 > --- a/tools/testing/selftests/tc-testing/Makefile > +++ b/tools/testing/selftests/tc-testin

Re: [PATCH net 0/4] selftests/net: fix a few small compiler warnings

2023-11-27 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Fri, 24 Nov 2023 12:15:18 -0500 you wrote: > From: Willem de Bruijn > > Observed a clang warning when backporting cmsg_sender. > Ran the same build against all the .c files under selftests/net. > > This is clang-14

Re: [PATCH net-next 0/5] selftests: tc-testing: updates and cleanups for tdc

2023-11-27 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Fri, 24 Nov 2023 12:42:43 -0300 you wrote: > Address the recommendations from the previous series and cleanup some > leftovers. > > Pedro Tammela (5): > selftests: tc-testing: remove buildebpf plugin > selfte

Re: [PATCH 2/3] vfio: Add VFIO_DEVICE_PASID_[AT|DE]TACH_IOMMUFD_PT

2023-11-27 Thread Yi Liu
On 2023/11/27 14:50, Duan, Zhenzhong wrote: -Original Message- From: Liu, Yi L Sent: Monday, November 27, 2023 2:39 PM Subject: [PATCH 2/3] vfio: Add VFIO_DEVICE_PASID_[AT|DE]TACH_IOMMUFD_PT This adds ioctls for the userspace to attach a given pasid of a vfio device to/from an IOA

Re: [PATCH 3/3] vfio: Report PASID capability via VFIO_DEVICE_FEATURE ioctl

2023-11-27 Thread Yi Liu
On 2023/11/27 15:28, Duan, Zhenzhong wrote: -Original Message- From: Liu, Yi L Sent: Monday, November 27, 2023 2:39 PM Subject: [PATCH 3/3] vfio: Report PASID capability via VFIO_DEVICE_FEATURE ioctl This reports the PASID capability data to userspace via VFIO_DEVICE_FEATURE, hence u

Re: [PATCH ipsec-next v1 6/7] bpf: selftests: test_tunnel: Disable CO-RE relocations

2023-11-27 Thread Yonghong Song
On 11/27/23 7:01 PM, Daniel Xu wrote: On Mon, Nov 27, 2023 at 02:45:11PM -0600, Daniel Xu wrote: On Sun, Nov 26, 2023 at 09:53:04PM -0800, Yonghong Song wrote: On 11/27/23 12:44 AM, Yonghong Song wrote: On 11/26/23 8:52 PM, Eduard Zingerman wrote: On Sun, 2023-11-26 at 18:04 -0600, Daniel X

RE: [PATCH 3/3] vfio: Report PASID capability via VFIO_DEVICE_FEATURE ioctl

2023-11-27 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Sent: Tuesday, November 28, 2023 11:12 AM >Subject: Re: [PATCH 3/3] vfio: Report PASID capability via VFIO_DEVICE_FEATURE >ioctl > >On 2023/11/27 15:28, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Liu, Yi L >>> Sent: Monday

Re: [PATCH v6 2/6] iommufd: Add IOMMU_HWPT_INVALIDATE

2023-11-27 Thread Yi Liu
On 2023/11/28 03:53, Nicolin Chen wrote: On Fri, Nov 24, 2023 at 02:36:29AM +, Tian, Kevin wrote: + * @out_driver_error_code: Report a driver speicifc error code upon failure. + * It's optional, driver has a choice to fill it or + * not.

[PATCH v2 1/3] kunit: Add a macro to wrap a deferred action function

2023-11-27 Thread David Gow
KUnit's deferred action API accepts a void(*)(void *) function pointer which is called when the test is exited. However, we very frequently want to use existing functions which accept a single pointer, but which may not be of type void*. While this is probably dodgy enough to be on the wrong side o

[PATCH v2 3/3] drm/vc4: tests: Use KUNIT_DEFINE_ACTION_WRAPPER

2023-11-27 Thread David Gow
In order to pass functions to kunit_add_action(), they need to be of the kunit_action_t type. While casting the function pointer can work, it will break control-flow integrity. vc4_mock already defines such a wrapper for drm_dev_unregister(), but it involves less boilerplate to use the new macro,

[PATCH v2 2/3] drm/tests: Use KUNIT_DEFINE_ACTION_WRAPPER()

2023-11-27 Thread David Gow
In order to pass functions to kunit_add_action(), they need to be of the kunit_action_t type. While casting the function pointer can work, it will break control-flow integrity. drm_kunit_helpers already defines wrappers, but we now have a macro which does this automatically. Using this greatly red