Re: [PATCH v7 2/8] KVM: Introduce __kvm_follow_pfn function

2023-07-05 Thread David Stevens
On Thu, Jul 6, 2023 at 10:34 AM Isaku Yamahata wrote: > > On Tue, Jul 04, 2023 at 04:50:47PM +0900, > David Stevens wrote: > > > From: David Stevens > > > > Introduce __kvm_follow_pfn, which will replace __gfn_to_pfn_memslot. > > __kvm_follow_pfn refactors the old API's arguments into a struct

Re: [PATCH v7 2/8] KVM: Introduce __kvm_follow_pfn function

2023-07-05 Thread David Stevens
On Wed, Jul 5, 2023 at 7:53 PM Yu Zhang wrote: > > On Wed, Jul 05, 2023 at 06:22:59PM +0900, David Stevens wrote: > > On Wed, Jul 5, 2023 at 12:10 PM Yu Zhang wrote: > > > > > > > @@ -2514,35 +2512,26 @@ static bool hva_to_pfn_fast(unsigned long addr, > > > > bool write_fault, > > > > * The

Re: [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-07-05 Thread David Stevens
On Thu, Jul 6, 2023 at 11:10 AM Isaku Yamahata wrote: > > On Tue, Jul 04, 2023 at 04:50:50PM +0900, > David Stevens wrote: > > > diff --git a/arch/x86/kvm/mmu/spte.c b/arch/x86/kvm/mmu/spte.c > > index cf2c6426a6fc..46c681dc45e6 100644 > > --- a/arch/x86/kvm/mmu/spte.c > > +++

Re: [PATCH] rtc: Kconfig: select REGMAP for RTC_DRV_DS1307

2023-07-05 Thread Christophe Leroy
Le 05/07/2023 à 02:30, Benjamin Gray a écrit : > The drivers/rtc/rtc-ds1307.c driver has a direct dependency on > struct regmap_config, which is guarded behind CONFIG_REGMAP. > > Commit 70a640c0efa7 ("regmap: REGMAP_KUNIT should not select REGMAP") > exposed this by disabling the default pick

Re: [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-07-05 Thread David Stevens
On Wed, Jul 5, 2023 at 7:17 PM Yu Zhang wrote: > > On Tue, Jul 04, 2023 at 04:50:50PM +0900, David Stevens wrote: > > From: David Stevens > > > > Stop passing FOLL_GET to __kvm_follow_pfn. This allows the host to map > > memory into the guest that is backed by un-refcounted struct pages - for >

Re: [PATCH] powerpc/powermac: Use early_* IO variants in via_calibrate_decr

2023-07-05 Thread Christophe Leroy
Le 06/07/2023 à 03:08, Benjamin Gray a écrit : > On a powermac platform, under the call path > >start_kernel > time_init > ppc_md.calibrate_decr (pmac_calibrate_decr) > via_calibrate_decr > > we run ioremap and iounmap. The unmap can enable interrupts > unexpectedly

Re: [PATCH] KVM: ppc64: Enable ring-based dirty memory tracking

2023-07-05 Thread Jordan Niethe
On 8/6/23 10:34 pm, Kautuk Consul wrote: Need at least a little context in the commit message itself: "Enable ring-based dirty memory tracking on ppc64:" - Enable CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL as ppc64 is weakly ordered. - Enable CONFIG_NEED_KVM_DIRTY_RING_WITH_BITMAP because the

Re: [PATCH] powerpc/mm/book3s64/hash/4k: Add pmd_same callback for 4K page size

2023-07-05 Thread Hugh Dickins
On Thu, 6 Jul 2023, Aneesh Kumar K.V wrote: > With commit 0d940a9b270b ("mm/pgtable: allow pte_offset_map[_lock]() to > fail") the kernel is now using pmd_same to compare pmd values that are > pointing to a level 4 page table page. Move the functions out of #ifdef > CONFIG_TRANSPARENT_HUGEPAGE

[PATCH] powerpc/mm/book3s64/hash/4k: Add pmd_same callback for 4K page size

2023-07-05 Thread Aneesh Kumar K.V
With commit 0d940a9b270b ("mm/pgtable: allow pte_offset_map[_lock]() to fail") the kernel is now using pmd_same to compare pmd values that are pointing to a level 4 page table page. Move the functions out of #ifdef CONFIG_TRANSPARENT_HUGEPAGE and add a variant that can work with both 4K and 64K

Re: [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-07-05 Thread Isaku Yamahata
On Tue, Jul 04, 2023 at 04:50:50PM +0900, David Stevens wrote: > diff --git a/arch/x86/kvm/mmu/spte.c b/arch/x86/kvm/mmu/spte.c > index cf2c6426a6fc..46c681dc45e6 100644 > --- a/arch/x86/kvm/mmu/spte.c > +++ b/arch/x86/kvm/mmu/spte.c > @@ -138,7 +138,7 @@ bool make_spte(struct kvm_vcpu *vcpu,

Re: [PATCH v7 4/8] KVM: x86/mmu: Migrate to __kvm_follow_pfn

2023-07-05 Thread Isaku Yamahata
On Tue, Jul 04, 2023 at 04:50:49PM +0900, David Stevens wrote: > From: David Stevens > > Migrate from __gfn_to_pfn_memslot to __kvm_follow_pfn. > > Signed-off-by: David Stevens > --- > arch/x86/kvm/mmu/mmu.c | 35 +-- > 1 file changed, 25 insertions(+), 10

Re: [PATCH v7 2/8] KVM: Introduce __kvm_follow_pfn function

2023-07-05 Thread Isaku Yamahata
On Tue, Jul 04, 2023 at 04:50:47PM +0900, David Stevens wrote: > From: David Stevens > > Introduce __kvm_follow_pfn, which will replace __gfn_to_pfn_memslot. > __kvm_follow_pfn refactors the old API's arguments into a struct and, > where possible, combines the boolean arguments into a single

Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page

2023-07-05 Thread Hugh Dickins
On Wed, 5 Jul 2023, Gerald Schaefer wrote: > On Tue, 4 Jul 2023 10:03:57 -0700 (PDT) > Hugh Dickins wrote: > > On Tue, 4 Jul 2023, Gerald Schaefer wrote: > > > On Sat, 1 Jul 2023 21:32:38 -0700 (PDT) > > > Hugh Dickins wrote: > > > > On Thu, 29 Jun 2023, Hugh Dickins wrote: > > ... > > > >

[PATCH] powerpc/powermac: Use early_* IO variants in via_calibrate_decr

2023-07-05 Thread Benjamin Gray
On a powermac platform, under the call path start_kernel time_init ppc_md.calibrate_decr (pmac_calibrate_decr) via_calibrate_decr we run ioremap and iounmap. The unmap can enable interrupts unexpectedly (cond_resched in vunmap_pmd_range), which is warned about later in the boot

Re: [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-07-05 Thread Jeff Layton
On Thu, 2023-07-06 at 08:19 +0900, Damien Le Moal wrote: > On 7/6/23 03:58, Jeff Layton wrote: > > A rename potentially involves updating 4 different inode timestamps. Add > > a function that handles the details sanely, and convert the libfs.c > > callers to use it. > > > > Signed-off-by: Jeff

Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page

2023-07-05 Thread Hugh Dickins
On Wed, 5 Jul 2023, Alexander Gordeev wrote: > On Sat, Jul 01, 2023 at 09:32:38PM -0700, Hugh Dickins wrote: > > On Thu, 29 Jun 2023, Hugh Dickins wrote: > > Hi Hugh, > > ... > > > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > > +void pte_free_defer(struct mm_struct *mm, pgtable_t pgtable) > > +{ > > +

Re: [PATCH v2 92/92] fs: rename i_ctime field to __i_ctime

2023-07-05 Thread Damien Le Moal
On 7/6/23 03:58, Jeff Layton wrote: > Now that everything in-tree is converted to use the accessor functions, > rename the i_ctime field in the inode to discourage direct access. > > Signed-off-by: Jeff Layton Looks OK to me. Reviewed-by: Damien Le Moal -- Damien Le Moal Western Digital

Re: [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-07-05 Thread Damien Le Moal
On 7/6/23 03:58, Jeff Layton wrote: > A rename potentially involves updating 4 different inode timestamps. Add > a function that handles the details sanely, and convert the libfs.c > callers to use it. > > Signed-off-by: Jeff Layton > --- > fs/libfs.c | 36

Re: [PATCH v2 07/92] fs: add ctime accessors infrastructure

2023-07-05 Thread Damien Le Moal
On 7/6/23 03:58, Jeff Layton wrote: > struct timespec64 has unused bits in the tv_nsec field that can be used > for other purposes. In future patches, we're going to change how the > inode->i_ctime is accessed in certain inodes in order to make use of > them. In order to do that safely though,

Re: [PATCH v2 00/89] fs: new accessors for inode->i_ctime

2023-07-05 Thread Jeff Layton
sent me an Acked-by or Reviewed-by in the previous set, then I tried to keep it on the patch here, since the respun patches are mostly just renaming stuff from v1. Let me know if I've missed any. I've also pushed the pile to my tree as this tag: https://git.kernel.org/pub/scm/linux/kernel/git/j

Re: [PATCH v4 12/13] s390/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
On 7/5/23 11:23, Eric DeVolder wrote: On 7/5/23 10:49, Nathan Chancellor wrote: Hi Eric, On Wed, Jul 05, 2023 at 10:20:03AM -0400, Eric DeVolder wrote: The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the

[PATCH v2 92/92] fs: rename i_ctime field to __i_ctime

2023-07-05 Thread Jeff Layton
Now that everything in-tree is converted to use the accessor functions, rename the i_ctime field in the inode to discourage direct access. Signed-off-by: Jeff Layton --- include/linux/fs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/fs.h

[PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-07-05 Thread Jeff Layton
A rename potentially involves updating 4 different inode timestamps. Add a function that handles the details sanely, and convert the libfs.c callers to use it. Signed-off-by: Jeff Layton --- fs/libfs.c | 36 +++- include/linux/fs.h | 2 ++ 2 files

[PATCH v2 07/92] fs: add ctime accessors infrastructure

2023-07-05 Thread Jeff Layton
struct timespec64 has unused bits in the tv_nsec field that can be used for other purposes. In future patches, we're going to change how the inode->i_ctime is accessed in certain inodes in order to make use of them. In order to do that safely though, we'll need to eradicate raw accesses of the

[PATCH v2 00/89] fs: new accessors for inode->i_ctime

2023-07-05 Thread Jeff Layton
v2: - prepend patches to add missing ctime updates - add simple_rename_timestamp helper function - rename ctime accessor functions as inode_get_ctime/inode_set_ctime_* - drop individual inode_ctime_set_{sec,nsec} helpers I've been working on a patchset to change how the inode->i_ctime is accessed

Re: [PATCH v4 12/13] s390/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
On 7/5/23 10:49, Nathan Chancellor wrote: Hi Eric, On Wed, Jul 05, 2023 at 10:20:03AM -0400, Eric DeVolder wrote: The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to

Re: [PATCH v4 03/13] arm/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Arnd Bergmann
On Wed, Jul 5, 2023, at 17:22, Eric DeVolder wrote: > On 7/5/23 10:05, Arnd Bergmann wrote: >> On Wed, Jul 5, 2023, at 16:19, Eric DeVolder wrote: >> >> I see this is now in linux-next, and it caused a few randconfig >> build issues, these never happened in the past: > > Arnd, > Thanks for

Re: [PATCH v4 12/13] s390/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Nathan Chancellor
Hi Eric, On Wed, Jul 05, 2023 at 10:20:03AM -0400, Eric DeVolder wrote: > The kexec and crash kernel options are provided in the common > kernel/Kconfig.kexec. Utilize the common options and provide > the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the > equivalent set of KEXEC and CRASH

Re: [PATCH v4 03/13] arm/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
On 7/5/23 10:05, Arnd Bergmann wrote: On Wed, Jul 5, 2023, at 16:19, Eric DeVolder wrote: The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of

Re: [PATCH v4 03/13] arm/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Arnd Bergmann
On Wed, Jul 5, 2023, at 16:19, Eric DeVolder wrote: > The kexec and crash kernel options are provided in the common > kernel/Kconfig.kexec. Utilize the common options and provide > the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the > equivalent set of KEXEC and CRASH options. > >

[PATCH v4 13/13] sh/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder Acked-by: John Paul Adrian Glaubitz ---

[PATCH v4 12/13] s390/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. NOTE: The original Kconfig has a KEXEC_SIG which depends on

[PATCH v4 11/13] riscv/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder --- arch/riscv/Kconfig | 44

[PATCH v4 10/13] powerpc/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder Reviewed-by: Sourabh Jain ---

[PATCH v4 08/13] mips/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder Acked-by: Thomas Bogendoerfer ---

[PATCH v4 09/13] parisc/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder --- arch/parisc/Kconfig | 34

[PATCH v4 07/13] m68k/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder Reviewed-by: Geert Uytterhoeven

[PATCH v4 05/13] arm64/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder --- arch/arm64/Kconfig | 62

[PATCH v4 06/13] loongarch/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder --- arch/loongarch/Kconfig | 26

[PATCH v4 02/13] x86/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder --- arch/x86/Kconfig | 89

[PATCH v4 00/13] refactor Kconfig to consolidate KEXEC and CRASH options

2023-07-05 Thread Eric DeVolder
The Kconfig is refactored to consolidate KEXEC and CRASH options from various arch//Kconfig files into new file kernel/Kconfig.kexec. The Kconfig.kexec is now a submenu titled "Kexec and crash features" located under "General Setup". The following options are impacted: - KEXEC - KEXEC_FILE -

[PATCH v4 04/13] ia64/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder --- arch/ia64/Kconfig | 28

[PATCH v4 03/13] arm/kexec: refactor for kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The kexec and crash kernel options are provided in the common kernel/Kconfig.kexec. Utilize the common options and provide the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the equivalent set of KEXEC and CRASH options. Signed-off-by: Eric DeVolder --- arch/arm/Kconfig | 29

[PATCH v4 01/13] kexec: consolidate kexec and crash options into kernel/Kconfig.kexec

2023-07-05 Thread Eric DeVolder
The config options for kexec and crash features are consolidated into new file kernel/Kconfig.kexec. Under the "General Setup" submenu is a new submenu "Kexec and crash handling". All the kexec and crash options that were once in the arch-dependent submenu "Processor type and features" are now

[PATCH v2 15/92] spufs: convert to ctime accessor functions

2023-07-05 Thread Jeff Layton
In later patches, we're going to change how the inode's ctime field is used. Switch to using accessor functions instead of raw accesses of inode->i_ctime. Acked-by: Jeremy Kerr Reviewed-by: Jan Kara Signed-off-by: Jeff Layton --- arch/powerpc/platforms/cell/spufs/inode.c | 2 +- 1 file

Re: [PATCH 1/2] tools/perf/tests: perf all metrics test fails when perf_event access is restricted

2023-07-05 Thread Namhyung Kim
On Mon, Jul 3, 2023 at 10:04 PM Athira Rajeev wrote: > > > > > On 15-Jun-2023, at 1:08 PM, Athira Rajeev > > wrote: > > > > Perf all metrics test fails as below when perf_event access > > is restricted. > > > >./perf test -v "perf all metrics test" > >Metric 'Memory_RD_BW_Chip' not

Re: [PATCH] tools/perf/tests: Fix objdump in Object code reading test to look for all sections

2023-07-05 Thread Namhyung Kim
On Mon, Jul 3, 2023 at 10:04 PM Athira Rajeev wrote: > > Object code reading test fails intermittently with below logs: > >Reading object code for memory address: 0xc00801dd34fc >File is: /lib/modules/6.3.0-rc7+/kernel/fs/xfs/xfs.ko >On file address is: 0x11359c >Objdump

Re: [PATCH] tools/perf/tests: Fix Basic BPF llvm compile to check for libbpf support

2023-07-05 Thread Namhyung Kim
Hello, On Mon, Jul 3, 2023 at 10:03 PM Athira Rajeev wrote: > > Basic BPF llvm compile fails in systems with libbpf > that doesn't support BTF. Log shows below information. > > libbpf: BTF is required, but is missing or corrupted. > Failed to parse test case 'Basic BPF llvm

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-05 Thread Suren Baghdasaryan
On Wed, Jul 5, 2023 at 9:14 AM Suren Baghdasaryan wrote: > > On Wed, Jul 5, 2023 at 8:49 AM Andrew Morton > wrote: > > > > On Wed, 5 Jul 2023 10:51:57 +0200 "Linux regression tracking (Thorsten > > Leemhuis)" wrote: > > > > > >>> I'm in wait-a-few-days-mode on this. To see if we have a

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-05 Thread Suren Baghdasaryan
On Wed, Jul 5, 2023 at 8:49 AM Andrew Morton wrote: > > On Wed, 5 Jul 2023 10:51:57 +0200 "Linux regression tracking (Thorsten > Leemhuis)" wrote: > > > >>> I'm in wait-a-few-days-mode on this. To see if we have a backportable > > >>> fix rather than disabling the feature in -stable. > > > >

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-05 Thread Andrew Morton
On Wed, 5 Jul 2023 10:51:57 +0200 "Linux regression tracking (Thorsten Leemhuis)" wrote: > >>> I'm in wait-a-few-days-mode on this. To see if we have a backportable > >>> fix rather than disabling the feature in -stable. > > Andrew, how long will you remain in "wait-a-few-days-mode"? Given

[PATCH v4 02/10] cpu/SMT: Move SMT prototypes into cpu_smt.h

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman In order to export the cpuhp_smt_control enum as part of the interface between generic and architecture code, the architecture code needs to include asm/topology.h. But that leads to circular header dependencies. So split the enum and related declarations into a separate

[PATCH] powerpc: dts: add missing space before {

2023-07-05 Thread Krzysztof Kozlowski
Add missing whitespace between node name/label and opening {. Signed-off-by: Krzysztof Kozlowski --- arch/powerpc/boot/dts/fsl/c293si-post.dtsi | 12 ++-- arch/powerpc/boot/dts/fsl/p1022rdk.dts | 10 +- arch/powerpc/boot/dts/fsl/p1022si-post.dtsi | 2 +-

[PATCH v4 10/10] powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman Integrate with the generic SMT support, so that when a CPU is DLPAR onlined it is brought up with the correct SMT mode. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v4 09/10] powerpc: Add HOTPLUG_SMT support

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman Add support for HOTPLUG_SMT, which enables the generic sysfs SMT support files in /sys/devices/system/cpu/smt, as well as the "nosmt" boot parameter. Implement the recently added hooks to allow partial SMT states, allow any number of threads per core. Tie the config

[PATCH v4 07/10] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman Add support to the /sys/devices/system/cpu/smt/control interface for enabling a specified number of SMT threads per core, including partial SMT states where not all threads are brought online. The current interface accepts "on" and "off", to enable either 1 or all SMT

[PATCH v4 06/10] cpu/SMT: Create topology_smt_thread_allowed()

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman Some architectures allows partial SMT states, ie. when not all SMT threads are brought online. To support that, add an architecture helper which checks whether a given CPU is allowed to be brought online depending on how many SMT threads are currently enabled. Since this

[PATCH v4 08/10] powerpc/pseries: Initialise CPU hotplug callbacks earlier

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman As part of the generic HOTPLUG_SMT code, there is support for disabling secondary SMT threads at boot time, by passing "nosmt" on the kernel command line. The way that is implemented is the secondary threads are brought partly online, and then taken back offline again.

[PATCH v4 05/10] cpu/SMT: Remove topology_smt_supported()

2023-07-05 Thread Laurent Dufour
Since the maximum number of threads is now passed to cpu_smt_set_num_threads(), checking that value is enough to know if SMT is supported. Cc: Michael Ellerman Suggested-by: Thomas Gleixner Signed-off-by: Laurent Dufour --- arch/x86/include/asm/topology.h | 2 -- arch/x86/kernel/smpboot.c

[PATCH v4 03/10] cpu/SMT: Move smt/control simple exit cases earlier

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman Move the simple exit cases, ie. which don't depend on the value written, earlier in the function. That makes it clearer that regardless of the input those states can not be transitioned out of. That does have a user-visible effect, in that the error returned will now

[PATCH v4 00/10] Introduce SMT level and add PowerPC support

2023-07-05 Thread Laurent Dufour
I'm taking over the series Michael sent previously [1] which is smartly reviewing the initial series I sent [2]. This series is addressing the comments sent by Thomas and me on the Michael's one. Here is a short introduction to the issue this series is addressing: When a new CPU is added, the

[PATCH v4 04/10] cpu/SMT: Store the current/max number of threads

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman Some architectures allow partial SMT states at boot time, ie. when not all SMT threads are brought online. To support that the SMT code needs to know the maximum number of SMT threads, and also the currently configured number. The architecture code knows the max number

[PATCH v4 01/10] cpu/hotplug: remove dependancy against cpu_primary_thread_mask

2023-07-05 Thread Laurent Dufour
The commit 18415f33e2ac ("cpu/hotplug: Allow "parallel" bringup up to CPUHP_BP_KICK_AP_STATE") introduce a dependancy against a global variable cpu_primary_thread_mask exported by the X86 code. This variable is only used when CONFIG_HOTPLUG_PARALLEL is set. Since cpuhp_get_primary_thread_mask()

Re: [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-07-05 Thread Yu Zhang
> > @@ -883,7 +884,7 @@ static gpa_t FNAME(gva_to_gpa)(struct kvm_vcpu *vcpu, > > struct kvm_mmu *mmu, > > */ > > static int FNAME(sync_spte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page > > *sp, int i) > > { > > - bool host_writable; > > + bool host_writable, is_refcounted; > > gpa_t

Re: [PATCH v7 3/8] KVM: Make __kvm_follow_pfn not imply FOLL_GET

2023-07-05 Thread Zhi Wang
On Tue, 4 Jul 2023 16:50:48 +0900 David Stevens wrote: > From: David Stevens > > Make it so that __kvm_follow_pfn does not imply FOLL_GET. This allows > callers to resolve a gfn when the associated pfn has a valid struct page > that isn't being actively refcounted (e.g. tail pages of

Re: [PATCH v7 2/8] KVM: Introduce __kvm_follow_pfn function

2023-07-05 Thread Zhi Wang
On Tue, 4 Jul 2023 16:50:47 +0900 David Stevens wrote: > From: David Stevens > > Introduce __kvm_follow_pfn, which will replace __gfn_to_pfn_memslot. > __kvm_follow_pfn refactors the old API's arguments into a struct and, > where possible, combines the boolean arguments into a single flags >

Re: [06/12] arch: Declare screen_info in

2023-07-05 Thread Thomas Zimmermann
Hi Am 05.07.23 um 03:21 schrieb Sui Jingfeng: Hi, Thomas I love your patch, yet after applied your patch, the linux kernel fail to compile on my LoongArch machine. screen_info is missing. I think this should be solved with your update to patch 1. Best regards Thomas ```   CC 

Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page

2023-07-05 Thread Gerald Schaefer
On Tue, 4 Jul 2023 10:03:57 -0700 (PDT) Hugh Dickins wrote: > On Tue, 4 Jul 2023, Gerald Schaefer wrote: > > On Sat, 1 Jul 2023 21:32:38 -0700 (PDT) > > Hugh Dickins wrote: > > > On Thu, 29 Jun 2023, Hugh Dickins wrote: > > > > > > > > I've grown to dislike the (ab)use of pt_frag_refcount

Re: [PATCH v3 3/9] cpu/SMT: Store the current/max number of threads

2023-07-05 Thread Laurent Dufour
Le 05/07/2023 à 05:05, Zhang, Rui a écrit : On Thu, 2023-06-29 at 16:31 +0200, Laurent Dufour wrote: From: Michael Ellerman Some architectures allows partial SMT states at boot time, s/allows/allow. Thanks Rui !

Re: [PATCH v3 6/9] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-07-05 Thread Laurent Dufour
Le 05/07/2023 à 05:14, Zhang, Rui a écrit : On Thu, 2023-06-29 at 16:31 +0200, Laurent Dufour wrote: @@ -2580,6 +2597,17 @@ static ssize_t control_show(struct device *dev,  { const char *state = smt_states[cpu_smt_control]; +#ifdef CONFIG_HOTPLUG_SMT +   /* +    * If

Re: [PATCH v7 3/8] KVM: Make __kvm_follow_pfn not imply FOLL_GET

2023-07-05 Thread Yu Zhang
On Tue, Jul 04, 2023 at 04:50:48PM +0900, David Stevens wrote: > From: David Stevens > > Make it so that __kvm_follow_pfn does not imply FOLL_GET. This allows > callers to resolve a gfn when the associated pfn has a valid struct page > that isn't being actively refcounted (e.g. tail pages of

Re: [PATCH v3 0/9] Introduce SMT level and add PowerPC support

2023-07-05 Thread Laurent Dufour
Le 05/07/2023 à 05:04, Zhang, Rui a écrit : Hi, Laurent, I want to test this patch set and found that it does not apply on top of latest usptream git, because of some changes in this merge window, so better rebase. Hi Rui, Thanks for your interest for this series. The latest Thomas's changes

Re: [PATCH v7 2/8] KVM: Introduce __kvm_follow_pfn function

2023-07-05 Thread Yu Zhang
On Wed, Jul 05, 2023 at 06:22:59PM +0900, David Stevens wrote: > On Wed, Jul 5, 2023 at 12:10 PM Yu Zhang wrote: > > > > > @@ -2514,35 +2512,26 @@ static bool hva_to_pfn_fast(unsigned long addr, > > > bool write_fault, > > > * The slow path to get the pfn of the specified host virtual address,

Re: [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-07-05 Thread Yu Zhang
On Tue, Jul 04, 2023 at 04:50:50PM +0900, David Stevens wrote: > From: David Stevens > > Stop passing FOLL_GET to __kvm_follow_pfn. This allows the host to map > memory into the guest that is backed by un-refcounted struct pages - for > example, higher order non-compound pages allocated by the

Re: [PATCH] KVM: PPC: Update MAINTAINERS

2023-07-05 Thread Michael Ellerman
Sean Christopherson writes: > On Thu, Jun 08, 2023, Nicholas Piggin wrote: >> Michael is merging KVM PPC patches via the powerpc tree and KVM topic >> branches. He doesn't necessarily have time to be across all of KVM so >> is reluctant to call himself maintainer, but for the mechanics of how >>

Re: [RESEND PATCH v9 2/2] arm64: support batched/deferred tlb shootdown during page reclamation/migration

2023-07-05 Thread Yicong Yang
On 2023/7/5 16:43, Barry Song wrote: > On Tue, Jul 4, 2023 at 10:36 PM Yicong Yang wrote: >> >> On 2023/6/30 1:26, Catalin Marinas wrote: >>> On Thu, Jun 29, 2023 at 05:31:36PM +0100, Catalin Marinas wrote: On Thu, May 18, 2023 at 02:59:34PM +0800, Yicong Yang wrote: > From: Barry Song

Re: [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-07-05 Thread Yu Zhang
On Tue, Jul 04, 2023 at 04:50:50PM +0900, David Stevens wrote: > From: David Stevens > > Stop passing FOLL_GET to __kvm_follow_pfn. This allows the host to map > memory into the guest that is backed by un-refcounted struct pages - for > example, higher order non-compound pages allocated by the

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-05 Thread Greg KH
On Wed, Jul 05, 2023 at 10:51:57AM +0200, Linux regression tracking (Thorsten Leemhuis) wrote: > On 05.07.23 09:08, Greg KH wrote: > > On Tue, Jul 04, 2023 at 01:22:54PM -0700, Suren Baghdasaryan wrote: > >> On Tue, Jul 4, 2023 at 9:18 AM Andrew Morton > >> wrote: > >>> On Tue, 4 Jul 2023

Re: [PATCH v7 2/8] KVM: Introduce __kvm_follow_pfn function

2023-07-05 Thread David Stevens
On Wed, Jul 5, 2023 at 12:10 PM Yu Zhang wrote: > > > @@ -2514,35 +2512,26 @@ static bool hva_to_pfn_fast(unsigned long addr, > > bool write_fault, > > * The slow path to get the pfn of the specified host virtual address, > > * 1 indicates success, -errno is returned if error is detected. >

Re: [PATCH v7 2/8] KVM: Introduce __kvm_follow_pfn function

2023-07-05 Thread David Stevens
On Wed, Jul 5, 2023 at 5:47 PM Zhi Wang wrote: > > On Tue, 4 Jul 2023 16:50:47 +0900 > David Stevens wrote: > > > From: David Stevens > > > > Introduce __kvm_follow_pfn, which will replace __gfn_to_pfn_memslot. > > __kvm_follow_pfn refactors the old API's arguments into a struct and, > > where

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-05 Thread Linux regression tracking (Thorsten Leemhuis)
On 05.07.23 09:08, Greg KH wrote: > On Tue, Jul 04, 2023 at 01:22:54PM -0700, Suren Baghdasaryan wrote: >> On Tue, Jul 4, 2023 at 9:18 AM Andrew Morton >> wrote: >>> On Tue, 4 Jul 2023 09:00:19 +0100 Greg KH >>> wrote: Thanks! I'll investigate this later today. After discussing with

Re: [RESEND PATCH v9 2/2] arm64: support batched/deferred tlb shootdown during page reclamation/migration

2023-07-05 Thread Barry Song
On Tue, Jul 4, 2023 at 10:36 PM Yicong Yang wrote: > > On 2023/6/30 1:26, Catalin Marinas wrote: > > On Thu, Jun 29, 2023 at 05:31:36PM +0100, Catalin Marinas wrote: > >> On Thu, May 18, 2023 at 02:59:34PM +0800, Yicong Yang wrote: > >>> From: Barry Song > >>> > >>> on x86, batched and deferred

Re: [PATCH 07/12] arch/x86: Declare edid_info in

2023-07-05 Thread Thomas Zimmermann
Hi Arnd Am 30.06.23 um 13:53 schrieb Arnd Bergmann: On Fri, Jun 30, 2023, at 09:46, Thomas Zimmermann wrote: Am 29.06.23 um 15:21 schrieb Arnd Bergmann: On Thu, Jun 29, 2023, at 15:01, Thomas Zimmermann wrote: Am 29.06.23 um 14:35 schrieb Arnd Bergmann: On Thu, Jun 29, 2023, at 13:45,

Re: [PATCH v7 4/8] KVM: x86/mmu: Migrate to __kvm_follow_pfn

2023-07-05 Thread Yu Zhang
On Tue, Jul 04, 2023 at 04:50:49PM +0900, David Stevens wrote: > From: David Stevens > > Migrate from __gfn_to_pfn_memslot to __kvm_follow_pfn. > > Signed-off-by: David Stevens > --- > arch/x86/kvm/mmu/mmu.c | 35 +-- > 1 file changed, 25 insertions(+), 10

Re: [PATCH 10/12] fbdev/core: Use fb_is_primary_device() in fb_firmware_edid()

2023-07-05 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Detect the primary VGA device with fb_is_primary_device() in the > implementation of fb_firmware_edid(). Remove the existing code. > An explanation about why this is possible would be useful here. > Adapt the function to receive an instance of struct fb_info and >

Re: [01/12] efi: Do not include from EFI header

2023-07-05 Thread Thomas Zimmermann
Hi Am 05.07.23 um 03:40 schrieb Sui Jingfeng: Hi, Thomas I love your patch, LoongArch also have UEFI GOP support, Maybe the arch/loongarch/kernel/efi.c don't include the '#include ' explicitly. Oh, thank you for testing. I try to build arch/ changes on all of the affected platforms, but

Re: [RFC 1/1] sched/fair: Consider asymmetric scheduler groups in load balancer

2023-07-05 Thread Vincent Guittot
Le lundi 05 juin 2023 à 10:07:16 (+0200), Tobias Huschle a écrit : > On 2023-05-16 15:36, Vincent Guittot wrote: > > On Mon, 15 May 2023 at 13:46, Tobias Huschle > > wrote: > > > > > > The current load balancer implementation implies that scheduler > > > groups, > > > within the same domain, all

Re: [PATCH 08/12] drivers/firmware: Remove trailing whitespaces

2023-07-05 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Fix coding style. No functional changes. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [PATCH v7 3/8] KVM: Make __kvm_follow_pfn not imply FOLL_GET

2023-07-05 Thread Yu Zhang
> > +void kvm_set_page_accessed(struct page *page); > +void kvm_set_page_dirty(struct page *page); > + No one calls these 2 routines in this patch. How about move this change to [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn ? ... > @@ -2930,17 +2933,19 @@ static bool

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-05 Thread Greg KH
On Tue, Jul 04, 2023 at 01:22:54PM -0700, Suren Baghdasaryan wrote: > On Tue, Jul 4, 2023 at 9:18 AM Andrew Morton > wrote: > > > > On Tue, 4 Jul 2023 09:00:19 +0100 Greg KH > > wrote: > > > > > > > > > Thanks! I'll investigate this later today. After discussing with > > > > > > > Andrew, we

Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page

2023-07-05 Thread Alexander Gordeev
On Sat, Jul 01, 2023 at 09:32:38PM -0700, Hugh Dickins wrote: > On Thu, 29 Jun 2023, Hugh Dickins wrote: Hi Hugh, ... > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > +void pte_free_defer(struct mm_struct *mm, pgtable_t pgtable) > +{ > + struct page *page; If I got your and Claudio conversation

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-05 Thread Suren Baghdasaryan
On Tue, Jul 4, 2023 at 3:04 PM Suren Baghdasaryan wrote: > > On Tue, Jul 4, 2023 at 2:28 PM Andrew Morton > wrote: > > > > On Tue, 4 Jul 2023 13:22:54 -0700 Suren Baghdasaryan > > wrote: > > > > > On Tue, Jul 4, 2023 at 9:18 AM Andrew Morton > > > wrote: > > > > > > > > On Tue, 4 Jul 2023