Re: [PATCH v2 0/6] iommufd support allocating nested parent domain

2023-10-12 Thread Yi Liu
On 2023/10/11 00:47, Jason Gunthorpe wrote: On Thu, Sep 28, 2023 at 12:15:22AM -0700, Yi Liu wrote: Yi Liu (6): iommu: Add new iommu op to create domains owned by userspace iommufd/hw_pagetable: Use domain_alloc_user op for domain allocation iommufd/hw_pagetable: Accepts user flags for

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

2023-10-12 Thread Maciej Wieczór-Retman
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 other logic. >> >> There is no format checking for the variadic functions that use >> printing inside kselftest.h. Be

Re: [PATCH 1/1] selftests/mm: include mman header to access MREMAP_DONTUNMAP identifier

2023-10-12 Thread Muhammad Usama Anjum
On 10/12/23 11:40 AM, Samasth Norway Ananda wrote: > Definition for MREMAP_DONTUNMAP not present in the selftest for > mremap_dontunmap thus throwing an undeclared error when running make > on mm. Thanks for sending the patch. You have mentioned in other email that MREMAP_DONTUNMAP isn't present i

Re: [PATCH 1/1] selftests/mm: include mman header to access MREMAP_DONTUNMAP identifier

2023-10-12 Thread Muhammad Usama Anjum
On 10/12/23 1:06 PM, Muhammad Usama Anjum wrote: > On 10/12/23 11:40 AM, Samasth Norway Ananda wrote: >> Definition for MREMAP_DONTUNMAP not present in the selftest for >> mremap_dontunmap thus throwing an undeclared error when running make >> on mm. > Thanks for sending the patch. > > You have me

Re: [PATCH v4 00/17] iommufd: Add nesting infrastructure

2023-10-12 Thread Yi Liu
On 2023/10/11 00:53, Jason Gunthorpe wrote: On Thu, Sep 21, 2023 at 12:51:21AM -0700, Yi Liu wrote: v4: - Separate HWPT alloc/destroy/abort functions between user-managed HWPTs and kernel-managed HWPTs - Rework invalidate uAPI to be a multi-request array-based design - Add a struct iom

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

2023-10-12 Thread Yi Liu
On 2023/10/11 00:58, 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 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -14,6 +14,7 @@ #include #include

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

2023-10-12 Thread Yi Liu
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 + *include/uapi/linux/iommufd.h

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

2023-10-12 Thread Yi Liu
On 2023/10/11 01:21, Jason Gunthorpe wrote: On Thu, Sep 21, 2023 at 12:51:23AM -0700, Yi Liu wrote: From: Lu Baolu Introduce a new domain type for a user I/O page table, which is nested on top of another user space address represented by a UNMANAGED domain. The Lets start using the world PAG

[PATCH v4 0/2] Fix issues observed in selftests/amd-pstate

2023-10-12 Thread Swapnil Sapkal
This series fixes issues observed with selftests/amd-pstate while running performance comparison tests with different governors. First patch changes relative paths with absolute paths and also change it with correct paths wherever it is broken. The second patch adds an option to provide perf binary

[PATCH v4 1/2] selftests/amd-pstate: Fix broken paths to run workloads in amd-pstate-ut

2023-10-12 Thread Swapnil Sapkal
In selftests/amd-pstate, tbench and gitsource microbenchmarks are used to compare the performance with different governors. In current implementation the relative path to run `amd_pstate_tracer.py` is broken. Fix this by using absolute paths. Signed-off-by: Swapnil Sapkal --- .../x86/amd_pstate_

[PATCH v4 2/2] selftests/amd-pstate: Added option to provide perf binary path

2023-10-12 Thread Swapnil Sapkal
In selftests/amd-pstate, distro `perf` is used to capture `perf stat` while running microbenchmarks. Distro `perf` is not working with upstream kernel. Fix this by providing an option to give the perf binary path. Reviewed-by: Mario Limonciello Signed-off-by: Swapnil Sapkal --- tools/testing/se

Re: [External] : Re: [PATCH 1/1] selftests/mm: include mman header to access MREMAP_DONTUNMAP identifier

2023-10-12 Thread samasth . norway . ananda
On 10/12/23 1:06 AM, Muhammad Usama Anjum wrote: You have mentioned in other email that MREMAP_DONTUNMAP isn't present in glibc older than 2.32. So including linux/mman.h solves the build error for people having older glibc. Please add this to the description of the patch to give the exact re

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

2023-10-12 Thread Ilpo Järvinen
On Thu, 12 Oct 2023, 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 other logic. > >> > >> There is no format checking for the

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

2023-10-12 Thread Jason Gunthorpe
On Thu, Oct 12, 2023 at 05:11:09PM +0800, Yi Liu wrote: > On 2023/10/11 00:58, 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 > > > --- a/include/linux/

Re: [PATCH v3 0/6] KVM RISC-V Conditional Operations

2023-10-12 Thread Anup Patel
Hi Palmer, On Thu, Oct 5, 2023 at 11:35 AM Anup Patel wrote: > > On Tue, Oct 3, 2023 at 9:22 AM Anup Patel wrote: > > > > This series extends KVM RISC-V to allow Guest/VM discover and use > > conditional operations related ISA extensions (namely XVentanaCondOps > > and Zicond). > > > > To try th

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

2023-10-12 Thread Shuah Khan
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 other logic. There is no format checking for the variadic functions that

Re: [PATCH v4 1/2] selftests/amd-pstate: Fix broken paths to run workloads in amd-pstate-ut

2023-10-12 Thread Mario Limonciello
On 10/12/2023 04:32, Swapnil Sapkal wrote: In selftests/amd-pstate, tbench and gitsource microbenchmarks are used to compare the performance with different governors. In current implementation the relative path to run `amd_pstate_tracer.py` is broken. Fix this by using absolute paths. Signed-off

Re: [PATCH 0/5] KVM: x86: Fix breakage in KVM_SET_XSAVE's ABI

2023-10-12 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH v2] selftests/mm: include mman header to access MREMAP_DONTUNMAP identifier

2023-10-12 Thread Samasth Norway Ananda
Definition for MREMAP_DONTUNMAP is not present in glibc older than 2.32 thus throwing an undeclared error when running make on mm. Including linux/mman.h solves the build error for people having older glibc. Fixes: 0183d777c29a ("selftests: mm: remove duplicate unneeded defines") Reported-by: Linu

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

2023-10-12 Thread Jason Gunthorpe
On Tue, Oct 10, 2023 at 03:49:32PM -0300, Jason Gunthorpe wrote: > > diff --git a/drivers/iommu/iommufd/iommufd_private.h > > b/drivers/iommu/iommufd/iommufd_private.h > > index 1d3b1a74e854..3e89c3d530f3 100644 > > --- a/drivers/iommu/iommufd/iommufd_private.h > > +++ b/drivers/iommu/iommufd/iomm

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

2023-10-12 Thread Peter Xu
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 Baghdasaryan wrote: > >

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

2023-10-12 Thread Peter Xu
On Sun, Oct 08, 2023 at 11:42:27PM -0700, Suren Baghdasaryan wrote: > From: Andrea Arcangeli > > Implement the uABI of UFFDIO_MOVE ioctl. > UFFDIO_COPY performs ~20% better than UFFDIO_MOVE when the application > needs pages to be allocated [1]. However, with UFFDIO_MOVE, if pages are > available

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

2023-10-12 Thread Peter Xu
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 sufficient to hold the folio lock w

Re: [PATCH v3 3/3] selftests/mm: add UFFDIO_MOVE ioctl test

2023-10-12 Thread Peter Xu
On Sun, Oct 08, 2023 at 11:42:28PM -0700, Suren Baghdasaryan wrote: > Add a test for new UFFDIO_MOVE ioctl which uses uffd to move source > into destination buffer while checking the contents of both after > remapping. After the operation the content of the destination buffer > should match the ori

[PATCH] KVM: selftests: Initialise dynamically allocated configuration names

2023-10-12 Thread Mark Brown
if (!strcmp(s->name, "base")) --- base-commit: 6465e260f48790807eef06b583b38ca9789b6072 change-id: 20231012-kvm-get-reg-list-str-init-76c8ed4e19d6 Best regards, -- Mark Brown

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

2023-10-12 Thread Nicolin Chen
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 > > --- a/include/linux/iommu.h > > +++ b/include/linux/iommu.h > > @

[PATCH] selftests: bpf: remove unused variables

2023-10-12 Thread zhujun2
These variables are never referenced in the code, just remove them. Signed-off-by: zhujun2 --- tools/testing/selftests/bpf/prog_tests/atomic_bounds.c | 1 - tools/testing/selftests/bpf/prog_tests/kfree_skb.c | 2 -- tools/testing/selftests/bpf/prog_tests/perf_branches.c | 6 +-

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

2023-10-12 Thread Andrii Nakryiko
On Thu, Oct 12, 2023 at 6:35 PM zhujun2 wrote: > > These variables are never referenced in the code, just remove them. > > Signed-off-by: zhujun2 > --- Why do you stubbornly keep submitting the same untested and broken patch, ignoring the feedback ([0])? Your changes don't even compile success

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

2023-10-12 Thread Meng Li
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 maximum frequency of a part. This means that a fraction of cores can reach

[PATCH V9 1/7] x86: Drop CPU_SUP_INTEL from SCHED_MC_PRIO for the expansion.

2023-10-12 Thread Meng Li
amd-pstate driver also uses SCHED_MC_PRIO, so decouple the requirement of CPU_SUP_INTEL from the dependencies to allow compilation in kernels without Intel CPU support. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Huang Rui Signed-off-by: Meng Li --- arch/x86/Kco

[PATCH V9 2/7] acpi: cppc: Add get the highest performance cppc control

2023-10-12 Thread Meng Li
Add support for getting the highest performance to the generic CPPC driver. This enables downstream drivers such as amd-pstate to discover and use these values. Please refer to the ACPI_Spec for details on continuous performance control of CPPC. Tested-by: Oleksandr Natalenko Reviewed-by: Mario

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

2023-10-12 Thread Meng Li
amd-pstate driver utilizes the functions and data structures provided by the ITMT architecture to enable the scheduler to favor scheduling on cores which can be get a higher frequency with lower voltage. We call it amd-pstate preferrred core. Here sched_set_itmt_core_prio() is called to set priori

[PATCH V9 4/7] cpufreq: Add a notification message that the highest perf has changed

2023-10-12 Thread Meng Li
ACPI 6.5 section 8.4.6.1.1.1 specifies that Notify event 0x85 can be emmitted to cause the the OSPM to re-evaluate the highest performance register. Add support for this event. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Huang Rui Signed-off-by: Meng Li Link: ht

[PATCH V9 5/7] cpufreq: amd-pstate: Update amd-pstate preferred core ranking dynamically

2023-10-12 Thread Meng Li
Preferred core rankings can be changed dynamically by the platform based on the workload and platform conditions and accounting for thermals and aging. When this occurs, cpu priority need to be set. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Reviewed-b

[PATCH V9 6/7] Documentation: amd-pstate: introduce amd-pstate preferred core

2023-10-12 Thread Meng Li
Introduce amd-pstate preferred core. check preferred core state set by the kernel parameter: $ cat /sys/devices/system/cpu/amd-pstate/prefcore Tested-by: Oleksandr Natalenko Reviewed-by: Wyes Karny Reviewed-by: Mario Limonciello Reviewed-by: Huang Rui Signed-off-by: Meng Li --- Documentatio

[PATCH V9 7/7] Documentation: introduce amd-pstate preferrd core mode kernel command line options

2023-10-12 Thread Meng Li
amd-pstate driver support enable/disable preferred core. Default enabled on platforms supporting amd-pstate preferred core. Disable amd-pstate preferred core with "amd_prefcore=disable" added to the kernel command line. Signed-off-by: Meng Li Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karn

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

2023-10-12 Thread Meng Li
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 maximum frequency of a part. This means that a fraction of cores can reach

[RESEND PATCH V9 1/7] x86: Drop CPU_SUP_INTEL from SCHED_MC_PRIO for the expansion.

2023-10-12 Thread Meng Li
amd-pstate driver also uses SCHED_MC_PRIO, so decouple the requirement of CPU_SUP_INTEL from the dependencies to allow compilation in kernels without Intel CPU support. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Huang Rui Signed-off-by: Meng Li --- arch/x86/Kco

[RESEND PATCH V9 2/7] acpi: cppc: Add get the highest performance cppc control

2023-10-12 Thread Meng Li
Add support for getting the highest performance to the generic CPPC driver. This enables downstream drivers such as amd-pstate to discover and use these values. Please refer to the ACPI_Spec for details on continuous performance control of CPPC. Tested-by: Oleksandr Natalenko Reviewed-by: Mario

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

2023-10-12 Thread Meng Li
amd-pstate driver utilizes the functions and data structures provided by the ITMT architecture to enable the scheduler to favor scheduling on cores which can be get a higher frequency with lower voltage. We call it amd-pstate preferrred core. Here sched_set_itmt_core_prio() is called to set priori

[RESEND PATCH V9 5/7] cpufreq: amd-pstate: Update amd-pstate preferred core ranking dynamically

2023-10-12 Thread Meng Li
Preferred core rankings can be changed dynamically by the platform based on the workload and platform conditions and accounting for thermals and aging. When this occurs, cpu priority need to be set. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karny Reviewed-b

[RESEND PATCH V9 4/7] cpufreq: Add a notification message that the highest perf has changed

2023-10-12 Thread Meng Li
ACPI 6.5 section 8.4.6.1.1.1 specifies that Notify event 0x85 can be emmitted to cause the the OSPM to re-evaluate the highest performance register. Add support for this event. Tested-by: Oleksandr Natalenko Reviewed-by: Mario Limonciello Reviewed-by: Huang Rui Signed-off-by: Meng Li Link: ht

[RESEND PATCH V9 6/7] Documentation: amd-pstate: introduce amd-pstate preferred core

2023-10-12 Thread Meng Li
Introduce amd-pstate preferred core. check preferred core state set by the kernel parameter: $ cat /sys/devices/system/cpu/amd-pstate/prefcore Tested-by: Oleksandr Natalenko Reviewed-by: Wyes Karny Reviewed-by: Mario Limonciello Reviewed-by: Huang Rui Signed-off-by: Meng Li --- Documentatio

[RESEND PATCH V9 7/7] Documentation: introduce amd-pstate preferrd core mode kernel command line options

2023-10-12 Thread Meng Li
amd-pstate driver support enable/disable preferred core. Default enabled on platforms supporting amd-pstate preferred core. Disable amd-pstate preferred core with "amd_prefcore=disable" added to the kernel command line. Signed-off-by: Meng Li Reviewed-by: Mario Limonciello Reviewed-by: Wyes Karn

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

2023-10-12 Thread Yi Liu
On 2023/10/12 21:39, Jason Gunthorpe wrote: On Thu, Oct 12, 2023 at 05:11:09PM +0800, Yi Liu wrote: On 2023/10/11 00:58, 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 10

Re: [PATCH] KVM: selftests: Initialise dynamically allocated configuration names

2023-10-12 Thread Andrew Jones
> c->name = malloc(len); > > + c->name[0] = '\0'; > len = 0; > for_each_sublist(c, s) { > if (!strcmp(s->name, "base")) > > --- > base-commit: 6465e260f48790807eef06b583b38ca9789b6072 > change-id: 20231012-kvm-get-reg-list-str-init-76c8ed4e19d6 > Other than the tag, Reviewed-by: Andrew Jones Thanks, drew