Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-13 Thread Nicolin Chen
On Fri, Oct 13, 2023 at 09:07:09PM -0300, Jason Gunthorpe wrote: > On Fri, Oct 13, 2023 at 01:58:59PM -0700, Nicolin Chen wrote: > > On Fri, Oct 13, 2023 at 12:19:23PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 12:51:31AM -0700, Yi Liu wrote: > > > > IOMMU_HWPT_ALLOC already suppor

Re: [PATCH v4 02/17] iommu: Add nested domain support

2023-10-13 Thread Nicolin Chen
On Thu, Oct 12, 2023 at 05:13:59PM +0800, Yi Liu wrote: > > > @@ -241,6 +245,21 @@ struct iommu_user_data { > > > size_t len; > > > }; > > > > > > +/** > > > + * struct iommu_user_data_array - iommu driver specific user space data > > > array > > > + * @uptr: Pointer to the user buffer a

Re: [PATCH v4 08/17] iommufd: Always setup MSI and anforce cc on kernel-managed domains

2023-10-13 Thread Nicolin Chen
On Tue, Sep 26, 2023 at 01:16:35AM -0700, Tian, Kevin wrote: > > From: Liu, Yi L > > Sent: Thursday, September 21, 2023 3:51 PM > > > > From: Nicolin Chen > > > > Now enforce_cache_coherency and msi_cookie are kernel-managed hwpt > > things. > > So, they should be only setup on kernel-managed dom

Re: [PATCH v4 07/17] iommufd: Add user-managed hw_pagetable support

2023-10-13 Thread Nicolin Chen
On Tue, Sep 26, 2023 at 01:14:47AM -0700, Tian, Kevin wrote: > > From: Liu, Yi L > > Sent: Thursday, September 21, 2023 3:51 PM > > > > +static void iommufd_user_managed_hwpt_abort(struct iommufd_object > > *obj) > > +{ > > + struct iommufd_hw_pagetable *hwpt = > > + container_of(o

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-13 Thread Jason Gunthorpe
On Fri, Oct 13, 2023 at 01:58:59PM -0700, Nicolin Chen wrote: > On Fri, Oct 13, 2023 at 12:19:23PM -0300, Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 12:51:31AM -0700, Yi Liu wrote: > > > IOMMU_HWPT_ALLOC already supports iommu_domain allocation for usersapce. > > > But it can only allocate

kselftest/next kselftest-lib: 3 runs, 3 regressions (v6.6-rc2-43-g508934b5d15ab)

2023-10-13 Thread kernelci.org bot
kselftest/next kselftest-lib: 3 runs, 3 regressions (v6.6-rc2-43-g508934b5d15ab) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---+--+-

kselftest/next kselftest-seccomp: 4 runs, 3 regressions (v6.6-rc2-43-g508934b5d15ab)

2023-10-13 Thread kernelci.org bot
kselftest/next kselftest-seccomp: 4 runs, 3 regressions (v6.6-rc2-43-g508934b5d15ab) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---+---

kselftest/next kselftest-lkdtm: 3 runs, 2 regressions (v6.6-rc2-43-g508934b5d15ab)

2023-10-13 Thread kernelci.org bot
kselftest/next kselftest-lkdtm: 3 runs, 2 regressions (v6.6-rc2-43-g508934b5d15ab) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---+-

kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.6-rc2-43-g508934b5d15ab)

2023-10-13 Thread kernelci.org bot
kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.6-rc2-43-g508934b5d15ab) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +---+---+--+

kselftest/next kselftest-cpufreq: 7 runs, 3 regressions (v6.6-rc2-43-g508934b5d15ab)

2023-10-13 Thread kernelci.org bot
kselftest/next kselftest-cpufreq: 7 runs, 3 regressions (v6.6-rc2-43-g508934b5d15ab) Regressions Summary --- platform | arch | lab | compiler | defconfig | regressions -+---+---+---

kselftest/next build: 6 builds: 0 failed, 6 passed, 1 warning (v6.6-rc2-43-g508934b5d15ab)

2023-10-13 Thread kernelci.org bot
kselftest/next build: 6 builds: 0 failed, 6 passed, 1 warning (v6.6-rc2-43-g508934b5d15ab) Full Build Summary: https://kernelci.org/build/kselftest/branch/next/kernel/v6.6-rc2-43-g508934b5d15ab/ Tree: kselftest Branch: next Git Describe: v6.6-rc2-43-g508934b5d15ab Git Commit: 508934b5d15ab79fd5

Re: [PATCH v4 01/17] iommu: Add hwpt_type with user_data for domain_alloc_user op

2023-10-13 Thread Nicolin Chen
On Fri, Oct 13, 2023 at 07:42:50PM +0800, Yi Liu wrote: > On 2023/10/12 17:12, Yi Liu wrote: > > On 2023/9/26 14:56, Tian, Kevin wrote: > > > > From: Yi Liu > > > > Sent: Thursday, September 21, 2023 3:51 PM > > > > + > > > > +/** > > > > + * iommu_copy_user_data - Copy iommu driver specific user

Re: [PATCH v6 0/8] Add printf attribute to kselftest functions

2023-10-13 Thread Reinette Chatre
On 10/13/2023 2:03 PM, Shuah wrote: > Applied this series and the following three - all 25 patches are > in linux-kselftest next for Linux 6.7-rc1. > > [1] > https://lore.kernel.org/all/cover.1696932728.git.maciej.wieczor-ret...@intel.com/ > [2] > https://lore.kernel.org/all/20231002094813.66

Re: [PATCH v6 0/8] Add printf attribute to kselftest functions

2023-10-13 Thread Shuah
On 10/13/23 05:36, Maciej Wieczor-Retman wrote: kselftest.h declares many variadic functions that can print some formatted message while also executing selftest logic. These declarations don't have any compiler mechanism to verify if passed arguments are valid in comparison with format specifiers

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-13 Thread Nicolin Chen
On Fri, Oct 13, 2023 at 12:19:23PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 12:51:31AM -0700, Yi Liu wrote: > > IOMMU_HWPT_ALLOC already supports iommu_domain allocation for usersapce. > > But it can only allocate a hw_pagetable that associates to a given IOAS, > > i.e. only a kernel

Re: [PATCH net v2 0/4] selftests: openvswitch: Minor fixes for some systems

2023-10-13 Thread Simon Horman
On Wed, Oct 11, 2023 at 03:49:35PM -0400, Aaron Conole wrote: > A number of corner cases were caught when trying to run the selftests on > older systems. Missed skip conditions, some error cases, and outdated > python setups would all report failures but the issue would actually be > related to so

[PATCH-cgroup 3/4] cgroup/cpuset: Keep track of CPUs in isolated partitions

2023-10-13 Thread Waiman Long
Add a new internal isolated_cpus mask to keep track of the CPUs that are in isolated partitions. Expose that new cpumask as a new root-only control file ".__DEBUG__.cpuset.cpus.isolated" when cgroup_debug command line option is specified. Signed-off-by: Waiman Long --- kernel/cgroup/cpuset.c | 1

[PATCH-cgroup 2/4] selftests/cgroup: Minor code cleanup and reorganization of test_cpuset_prs.sh

2023-10-13 Thread Waiman Long
Minor cleanup of test matrix and relocation of test_isolated() function to prepare for the next patch. There is no functional change. Signed-off-by: Waiman Long --- .../selftests/cgroup/test_cpuset_prs.sh | 142 +- 1 file changed, 71 insertions(+), 71 deletions(-) diff --g

[PATCH-cgroup 1/4] workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask

2023-10-13 Thread Waiman Long
When the "isolcpus" boot command line option is used to add a set of isolated CPUs, those CPUs will be excluded automatically from wq_unbound_cpumask to avoid running work functions from unbound workqueues. Recently cpuset has been extended to allow the creation of partitions of isolated CPUs dyna

[PATCH-cgroup 4/4] cgroup/cpuset: Take isolated CPUs out of workqueue unbound cpumask

2023-10-13 Thread Waiman Long
To make CPUs in isolated cpuset partition closer in isolation to the boot time isolated CPUs specified in the "isolcpus" boot command line option, we need to take those CPUs out of the workqueue unbound cpumask so that work functions from the unbound workqueues won't run on those CPUs. Otherwise,

[PATCH-cgroup 0/4] cgroup/cpuset: Improve CPU isolation in isolated partitions

2023-10-13 Thread Waiman Long
Isolated cpuset partition can currently be created to contain an exclusive set of CPUs not used in other cgroups and with load balancing disabled to reduce interference from the scheduler. The main purpose of this isolated partition type is to dynamically emulate what can be done via the "isolcpus

Re: [PATCH v4 01/17] iommu: Add hwpt_type with user_data for domain_alloc_user op

2023-10-13 Thread Nicolin Chen
On Fri, Oct 13, 2023 at 11:04:56AM -0300, Jason Gunthorpe wrote: > On Fri, Oct 13, 2023 at 12:33:13PM +0800, Yi Liu wrote: > > > not really. Below the users of the struct iommu_user_data in my current > > iommufd_nesting branch. Only the domain_alloc_user op has type as there > > can be multiple v

Re: [PATCH v3 2/3] userfaultfd: UFFDIO_MOVE uABI

2023-10-13 Thread Peter Xu
On Fri, Oct 13, 2023 at 09:49:10AM -0700, Lokesh Gidra wrote: > On Fri, Oct 13, 2023 at 9:08 AM Peter Xu wrote: > > > > On Fri, Oct 13, 2023 at 11:56:31AM +0200, David Hildenbrand wrote: > > > Hi Peter, > > > > Hi, David, > > > > > > > > > I used to have the same thought with David on whether we c

Re: [PATCH v3 2/3] userfaultfd: UFFDIO_MOVE uABI

2023-10-13 Thread Lokesh Gidra
On Fri, Oct 13, 2023 at 9:08 AM Peter Xu wrote: > > On Fri, Oct 13, 2023 at 11:56:31AM +0200, David Hildenbrand wrote: > > Hi Peter, > > Hi, David, > > > > > > I used to have the same thought with David on whether we can simplify the > > > design to e.g. limit it to single mm. Then I found that t

Re: [PATCH v3 2/3] userfaultfd: UFFDIO_MOVE uABI

2023-10-13 Thread Peter Xu
On Fri, Oct 13, 2023 at 11:56:31AM +0200, David Hildenbrand wrote: > Hi Peter, Hi, David, > > > I used to have the same thought with David on whether we can simplify the > > design to e.g. limit it to single mm. Then I found that the trickiest is > > actually patch 1 together with the anon_vma

Re: [RESEND PATCH V9 3/7] cpufreq: amd-pstate: Enable amd-pstate preferred core supporting.

2023-10-13 Thread Peter Zijlstra
On Fri, Oct 13, 2023 at 11:31:14AM +0800, Meng Li wrote: > +#define AMD_PSTATE_PREFCORE_THRESHOLD166 > +#define AMD_PSTATE_MAX_CPPC_PERF 255 > +static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata) > +{ > + int ret, prio; > + u32 highest_perf; > + static u32 ma

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

2023-10-13 Thread Oleksandr Natalenko
Hello. On pátek 13. října 2023 5:31:11 CEST Meng Li wrote: > Hi all: > > The core frequency is subjected to the process variation in semiconductors. > Not all cores are able to reach the maximum frequency respecting the > infrastructure limits. Consequently, AMD has redefined the concept of > max

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-13 Thread Jason Gunthorpe
On Thu, Sep 21, 2023 at 12:51:31AM -0700, Yi Liu wrote: > IOMMU_HWPT_ALLOC already supports iommu_domain allocation for usersapce. > But it can only allocate a hw_pagetable that associates to a given IOAS, > i.e. only a kernel-managed hw_pagetable of IOMMU_HWPT_TYPE_DEFAULT type. > > IOMMU drivers

Re: [PATCH v4 05/17] iommufd: Separate kernel-managed HWPT alloc/destroy/abort functions

2023-10-13 Thread Jason Gunthorpe
On Fri, Oct 13, 2023 at 07:13:34AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Friday, October 13, 2023 3:10 AM > > > > Also, we probably should feed enforce_cache_coherency through the > > alloc_hwpt uapi and not try to autodetect it.. > > > > In the past we had a long discus

Re: [PATCH v4 01/17] iommu: Add hwpt_type with user_data for domain_alloc_user op

2023-10-13 Thread Jason Gunthorpe
On Fri, Oct 13, 2023 at 12:33:13PM +0800, Yi Liu wrote: > not really. Below the users of the struct iommu_user_data in my current > iommufd_nesting branch. Only the domain_alloc_user op has type as there > can be multiple vendor specific alloc data types. Basically, I'm ok to > make the change you

Re: [PATCH v4 01/17] iommu: Add hwpt_type with user_data for domain_alloc_user op

2023-10-13 Thread Jason Gunthorpe
On Thu, Oct 12, 2023 at 05:34:58PM -0700, Nicolin Chen wrote: > On Tue, Oct 10, 2023 at 01:58:44PM -0300, Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 12:51:22AM -0700, Yi Liu wrote: > > > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > > > index 660dc1931dc9..12e12e5563e6 100644

Re: [PATCH v5 10/11] iommu/vt-d: Add nested domain allocation

2023-10-13 Thread Yi Liu
On 2023/9/27 14:56, Tian, Kevin wrote: From: Liu, Yi L Sent: Thursday, September 21, 2023 3:55 PM + if (hwpt_type != IOMMU_HWPT_TYPE_DEFAULT && + hwpt_type != IOMMU_HWPT_TYPE_VTD_S1) + return ERR_PTR(-EINVAL); + + if ((hwpt_type == IOMMU_HWPT_TYPE_DEFAULT) =

Re: [PATCH v5 09/11] iommu/vt-d: Add iotlb flush for nested domain

2023-10-13 Thread Yi Liu
On 2023/9/27 14:53, Tian, Kevin wrote: From: Liu, Yi L Sent: Thursday, September 21, 2023 3:54 PM + + /* REVISIT: +* VT-d has defined ITE, ICE, IQE for invalidation failure per hardware, +* but no error code yet, so just set the error code to be 0. +*/ + *cerr

Re: [PATCH v5 04/11] iommu/vt-d: Add helper to setup pasid nested translation

2023-10-13 Thread Baolu Lu
On 2023/10/13 20:40, Yi Liu wrote: +    return -EINVAL; +    } + +    if ((s1_cfg->flags & IOMMU_VTD_S1_SRE) && !ecap_srs(iommu- ecap)) { +    pr_err_ratelimited("No supervisor request support on %s\n", +   iommu->name); +    return -EINVAL; +    } + +    if ((s1_c

Re: [PATCH v5 04/11] iommu/vt-d: Add helper to setup pasid nested translation

2023-10-13 Thread Yi Liu
On 2023/9/27 14:37, Tian, Kevin wrote: From: Liu, Yi L Sent: Thursday, September 21, 2023 3:54 PM + +/** + * intel_pasid_setup_nested() - Set up PASID entry for nested translation. + * @iommu: IOMMU which the device belong to + * @dev:Device to be set up for translation + * @pasid:

Re: [PATCH v5 1/8] selftests: Add printf attribute to kselftest prints

2023-10-13 Thread Maciej Wieczór-Retman
On 2023-10-12 at 08:30:37 -0600, Shuah Khan wrote: >On 10/12/23 01:32, Maciej Wieczór-Retman wrote: >> On 2023-10-11 at 13:40:48 -0600, Shuah wrote: >> > On 10/11/23 02:23, Maciej Wieczor-Retman wrote: >> > > Kselftest header defines multiple variadic functions that use printf >> > > along with oth

Re: [PATCH v4 01/17] iommu: Add hwpt_type with user_data for domain_alloc_user op

2023-10-13 Thread Yi Liu
On 2023/10/12 17:12, Yi Liu wrote: On 2023/9/26 14:56, Tian, Kevin wrote: From: Yi Liu Sent: Thursday, September 21, 2023 3:51 PM + +/** + * iommu_copy_user_data - Copy iommu driver specific user space data + * @dst_data: Pointer to an iommu driver specific user data that is defined in + *   

[PATCH v6 8/8] selftests/resctrl: Fix wrong format specifier

2023-10-13 Thread Maciej Wieczor-Retman
Compiling resctrl selftest after adding a __printf() attribute to ksft_print_msg() exposes -Wformat warning in show_cache_info(). The format specifier used expects a variable of type int but a long unsigned int variable is passed instead. Change the format specifier to match the passed variable.

[PATCH v6 7/8] selftests/mm: Substitute attribute with a macro

2023-10-13 Thread Maciej Wieczor-Retman
Compiling mm selftest after adding a __printf() attribute to ksft_print_msg() exposes -Wformat warning in remap_region(). Fix the wrong format specifier causing the warning. The mm selftest uses the printf attribute in its full form. Since the header file that uses it also includes kselftests.h i

[PATCH v6 6/8] selftests/kvm: Replace attribute with macro

2023-10-13 Thread Maciej Wieczor-Retman
The __printf() macro is used in many tools in the linux kernel to validate the format specifiers in functions that use printf. The kvm selftest uses it without putting it in a macro definition while it also imports the kselftests.h header where the macro attribute is defined. Use __printf() from k

[PATCH v6 5/8] selftests/sigaltstack: Fix wrong format specifier

2023-10-13 Thread Maciej Wieczor-Retman
Compiling sigaltstack selftest after adding a __printf() attribute to ksft_print_msg() exposes -Wformat warning in main(). The format specifier inside ksft_print_msg() expects a long unsigned int but the passed variable is of unsigned int type. Fix the format specifier so it matches the passed var

[PATCH v6 4/8] selftests/pidfd: Fix ksft print formats

2023-10-13 Thread Maciej Wieczor-Retman
Compiling pidfd selftest after adding a __printf() attribute to ksft_print_msg() and ksft_test_result_pass() exposes -Wformat warnings in error_report(), test_pidfd_poll_exec_thread(), child_poll_exec_test(), test_pidfd_poll_leader_exit_thread(), child_poll_leader_exit_test(). The ksft_test_result

[PATCH v6 3/8] selftests/openat2: Fix wrong format specifier

2023-10-13 Thread Maciej Wieczor-Retman
Compiling openat2 selftest after adding a __printf() attribute to ksft_print_msg() exposes a -Wformat warning in test_openat2_flags(). The wrong format specifier is used for printing test.how->flags variable. Change the format specifier to %llX so it matches the printed variable. Signed-off-by: M

[PATCH v6 2/8] selftests/cachestat: Fix print_cachestat format

2023-10-13 Thread Maciej Wieczor-Retman
Compiling cachestat selftest after adding a __printf() attribute to ksft_print_msg() exposes a -Wformat warning in print_cachestat(). The format specifier in printf() call expects long int variables and received long long int. Change format specifiers to long long int so they match passed variable

[PATCH v6 1/8] selftests: Add printf attribute to kselftest prints

2023-10-13 Thread Maciej Wieczor-Retman
Kselftest header defines multiple variadic functions that use printf along with other logic. There is no format checking for the variadic functions that use printing inside kselftest.h. Because of this the compiler won't be able to catch instances of mismatched printf formats and debugging tests m

[PATCH v6 0/8] Add printf attribute to kselftest functions

2023-10-13 Thread Maciej Wieczor-Retman
kselftest.h declares many variadic functions that can print some formatted message while also executing selftest logic. These declarations don't have any compiler mechanism to verify if passed arguments are valid in comparison with format specifiers used in printf() calls. Attribute addition can m

Re: [PATCH bpf-next v2 2/2] selftests/bpf: Add pairs_redir_to_connected helper

2023-10-13 Thread Jakub Sitnicki
On Thu, Oct 05, 2023 at 10:18 PM -07, Martin KaFai Lau wrote: > On 10/5/23 12:21 AM, Geliang Tang wrote: >> --- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c >> +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c >> @@ -1336,32 +1336,22 @@ static void test_redir(struct test_so

Re: [PATCH v3 2/3] userfaultfd: UFFDIO_MOVE uABI

2023-10-13 Thread David Hildenbrand
On 12.10.23 22:11, Peter Xu wrote: On Mon, Oct 09, 2023 at 05:29:08PM +0100, Lokesh Gidra wrote: On Mon, Oct 9, 2023 at 5:24 PM David Hildenbrand wrote: On 09.10.23 18:21, Suren Baghdasaryan wrote: On Mon, Oct 9, 2023 at 7:38 AM David Hildenbrand wrote: On 09.10.23 08:42, Suren Baghdasary

Re: [patch net-next] selftests: netdevsim: use suitable existing dummy file for flash test

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Tue, 10 Oct 2023 16:44:00 +0200 you wrote: > From: Jiri Pirko > > The file name used in flash test was "dummy" because at the time test > was written, drivers were responsible for file request and as netdevsim >

Re: [PATCH net-next 00/11] Extend VXLAN driver to support FDB flushing

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller : On Mon, 9 Oct 2023 13:06:07 +0300 you wrote: > The merge commit 92716869375b ("Merge branch 'br-flush-filtering'") added > support for FDB flushing in bridge driver. Extend VXLAN driver to support > FDB flushing als

Re: [PATCH] selftests: bpf: remove unused variables

2023-10-13 Thread Yafang Shao
On Fri, Oct 13, 2023 at 9:35 AM zhujun2 wrote: > > These variables are never referenced in the code, just remove them. You can't remove them because they are really referenced in the CHECK() marco. Sending a patch without even testing a build is bad :( > > Signed-off-by: zhujun2 > --- > tools/

Re: [PATCH v3 1/3] mm/rmap: support move to different root anon_vma in folio_move_anon_rmap()

2023-10-13 Thread David Hildenbrand
On 13.10.23 00:01, Peter Xu wrote: On Sun, Oct 08, 2023 at 11:42:26PM -0700, Suren Baghdasaryan wrote: From: Andrea Arcangeli For now, folio_move_anon_rmap() was only used to move a folio to a different anon_vma after fork(), whereby the root anon_vma stayed unchanged. For that, it was suffici

RE: [PATCH v4 05/17] iommufd: Separate kernel-managed HWPT alloc/destroy/abort functions

2023-10-13 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Friday, October 13, 2023 3:10 AM > > Also, we probably should feed enforce_cache_coherency through the > alloc_hwpt uapi and not try to autodetect it.. > In the past we had a long discussion about this with the conclusion that user opt is the ideal model but it's