Re: [RFC PATCH v2 09/26] KVM: arm64: Allow using kvm_nvhe_sym() in hyp code

2021-02-01 Thread Will Deacon
off-by: Quentin Perret > --- > arch/arm64/include/asm/hyp_image.h | 4 > 1 file changed, 4 insertions(+) Acked-by: Will Deacon Will

Re: [RFC PATCH v2 08/26] KVM: arm64: Make kvm_call_hyp() a function call at Hyp

2021-02-01 Thread Will Deacon
and in this case a simple function call is needed. > > Add ifdefery to kvm_host.h to symplify kvm_call_hyp() in .hyp.text. > > Signed-off-by: Quentin Perret > --- > arch/arm64/include/asm/kvm_host.h | 6 ++ > 1 file changed, 6 insertions(+) Acked-by: Will Deacon Will

Re: [RFC PATCH v2 06/26] KVM: arm64: Factor memory allocation out of pgtable.c

2021-02-01 Thread Will Deacon
On Mon, Feb 01, 2021 at 06:32:52PM +, Quentin Perret wrote: > On Monday 01 Feb 2021 at 18:16:08 (+), Will Deacon wrote: > > On Fri, Jan 08, 2021 at 12:15:04PM +, Quentin Perret wrote: > > > +static struct kvm_pgtable_mm_ops kvm_s2_mm_ops = { &g

Re: [RFC PATCH v2 07/26] KVM: arm64: Introduce a BSS section for use at Hyp

2021-02-01 Thread Will Deacon
On Fri, Jan 08, 2021 at 12:15:05PM +, Quentin Perret wrote: > Currently, the hyp code cannot make full use of a bss, as the kernel > section is mapped read-only. > > While this mapping could simply be changed to read-write, it would > intermingle even more the hyp and kernel state than they cu

Re: [RFC PATCH v2 06/26] KVM: arm64: Factor memory allocation out of pgtable.c

2021-02-01 Thread Will Deacon
On Fri, Jan 08, 2021 at 12:15:04PM +, Quentin Perret wrote: > In preparation for enabling the creation of page-tables at EL2, factor > all memory allocation out of the page-table code, hence making it > re-usable with any compatible memory allocator. > > No functional changes intended. > > Si

Re: [RFC PATCH v2 05/26] KVM: arm64: Avoid free_page() in page-table allocator

2021-02-01 Thread Will Deacon
in Perret > --- > arch/arm64/kvm/hyp/pgtable.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Acked-by: Will Deacon Will

Re: [RFC PATCH v2 04/26] KVM: arm64: Initialize kvm_nvhe_init_params early

2021-02-01 Thread Will Deacon
On Fri, Jan 08, 2021 at 12:15:02PM +, Quentin Perret wrote: > Move the initialization of kvm_nvhe_init_params in a dedicated function > that is run early, and only once during KVM init, rather than every time > the KVM vectors are set and reset. > > This also opens the opportunity for the hype

Re: [RFC PATCH v2 03/26] arm64: kvm: Add standalone ticket spinlock implementation for use at hyp

2021-02-01 Thread Will Deacon
On Fri, Jan 08, 2021 at 12:15:01PM +, Quentin Perret wrote: > From: Will Deacon > > We will soon need to synchronise multiple CPUs in the hyp text at EL2. > The qspinlock-based locking used by the host is overkill for this purpose > and relies on the kernel's "percp

Re: [PATCH 0/1] arm64/hibernate: sparse warnings fix

2021-02-01 Thread Will Deacon
On Mon, 1 Feb 2021 10:03:05 -0500, Pavel Tatashin wrote: > This is against for-next/kexec, fix for sparse warning that was reported by > kernel test robot [1]. > > [1] > https://lore.kernel.org/linux-arm-kernel/202101292143.c6tckvvx-...@intel.com > > Pavel Tatashin (1): > arm64: hibernate: add

Re: [PATCH v5 0/1] perf/smmuv3: Don't reserve the PMCG register spaces

2021-02-01 Thread Will Deacon
On Mon, Feb 01, 2021 at 09:27:49PM +0800, Zhen Lei wrote: > v4 --> v5: > 1. Give up doing the mapping for the entire SMMU register space. > 2. Fix some compile warnings. Sorry. So sorry. That's alright, these things happen. However, this came in slightly too late for 5.12, so please resend at -rc1

[GIT PULL] iommu/arm-smmu: Updates for 5.12

2021-02-01 Thread Will Deacon
Koul (2): dt-bindings: arm-smmu: Add sm8350 compatible string iommu: arm-smmu-impl: Add SM8350 qcom iommu implementation Will Deacon (1): Merge branch 'for-joerg/mtk' into for-joerg/arm-smmu/updates Yong Wu (38): iommu: Move iotlb_sync_map out from __iommu_map

Re: [PATCH v6 00/33] MT8192 IOMMU support

2021-02-01 Thread Will Deacon
On Mon, Jan 11, 2021 at 07:18:41PM +0800, Yong Wu wrote: > This patch mainly adds support for mt8192 Multimedia IOMMU and SMI. > > mt8192 also is MTK IOMMU gen2 which uses ARM Short-Descriptor translation > table format. The M4U-SMI HW diagram is as below: > > EMI >

Re: [PATCH] driver/perf: Remove ARM_SMMU_V3_PMU dependency on ARM_SMMU_V3

2021-02-01 Thread Will Deacon
On Mon, 1 Feb 2021 18:24:02 +0800, John Garry wrote: > The ARM_SMMU_V3_PMU dependency on ARM_SMMU_V3_PMU was added with the idea > that a SMMUv3 PMCG would only exist on a system with an associated SMMUv3. > > However it is not the job of Kconfig to make these sorts of decisions (even > if it were

Re: [PATCH v4 1/2] perf/smmuv3: Don't reserve the PMCG register spaces

2021-02-01 Thread Will Deacon
On Sat, Jan 30, 2021 at 03:14:13PM +0800, Zhen Lei wrote: > According to the SMMUv3 specification: > Each PMCG counter group is represented by one 4KB page (Page 0) with one > optional additional 4KB page (Page 1), both of which are at IMPLEMENTATION > DEFINED base addresses. > > This means that t

[tip: core/mm] mm: proc: Invalidate TLB after clearing soft-dirty page state

2021-02-01 Thread tip-bot2 for Will Deacon
The following commit has been merged into the core/mm branch of tip: Commit-ID: 912efa17e5121693dfbadae29768f4144a3f9e62 Gitweb: https://git.kernel.org/tip/912efa17e5121693dfbadae29768f4144a3f9e62 Author:Will Deacon AuthorDate:Wed, 27 Jan 2021 23:53:42 Committer

[tip: core/mm] tlb: mmu_gather: Introduce tlb_gather_mmu_fullmm()

2021-02-01 Thread tip-bot2 for Will Deacon
The following commit has been merged into the core/mm branch of tip: Commit-ID: d8b450530b90f8845ab962af18b8a10ed77fc889 Gitweb: https://git.kernel.org/tip/d8b450530b90f8845ab962af18b8a10ed77fc889 Author:Will Deacon AuthorDate:Wed, 27 Jan 2021 23:53:44 Committer

[tip: core/mm] tlb: mmu_gather: Remove start/end arguments from tlb_gather_mmu()

2021-02-01 Thread tip-bot2 for Will Deacon
The following commit has been merged into the core/mm branch of tip: Commit-ID: a72afd873089c697053e9daa85ff343b3140d2e7 Gitweb: https://git.kernel.org/tip/a72afd873089c697053e9daa85ff343b3140d2e7 Author:Will Deacon AuthorDate:Wed, 27 Jan 2021 23:53:45 Committer

[tip: core/mm] tlb: mmu_gather: Remove unused start/end arguments from tlb_finish_mmu()

2021-02-01 Thread tip-bot2 for Will Deacon
The following commit has been merged into the core/mm branch of tip: Commit-ID: ae8eba8b5d723a4ca543024b6e51f4d0f4fb6b6b Gitweb: https://git.kernel.org/tip/ae8eba8b5d723a4ca543024b6e51f4d0f4fb6b6b Author:Will Deacon AuthorDate:Wed, 27 Jan 2021 23:53:43 Committer

[tip: core/mm] x86/ldt: Use tlb_gather_mmu_fullmm() when freeing LDT page-tables

2021-02-01 Thread tip-bot2 for Will Deacon
The following commit has been merged into the core/mm branch of tip: Commit-ID: 8cf55f24ce6cf90eb8828421e15e9efcd508bd2c Gitweb: https://git.kernel.org/tip/8cf55f24ce6cf90eb8828421e15e9efcd508bd2c Author:Will Deacon AuthorDate:Wed, 27 Jan 2021 23:53:47 Committer

[tip: core/mm] tlb: arch: Remove empty __tlb_remove_tlb_entry() stubs

2021-02-01 Thread tip-bot2 for Will Deacon
The following commit has been merged into the core/mm branch of tip: Commit-ID: c7bd8010a335260927e3643e79360272f9aca266 Gitweb: https://git.kernel.org/tip/c7bd8010a335260927e3643e79360272f9aca266 Author:Will Deacon AuthorDate:Wed, 27 Jan 2021 23:53:46 Committer

Re: [PATCH 2/3] iommu/io-pgtable-arm: Add IOMMU_LLC page protection flag

2021-02-01 Thread Will Deacon
On Fri, Jan 29, 2021 at 03:12:59PM +0530, Sai Prakash Ranjan wrote: > On 2021-01-29 14:35, Will Deacon wrote: > > On Mon, Jan 11, 2021 at 07:45:04PM +0530, Sai Prakash Ranjan wrote: > > > Add a new page protection flag IOMMU_LLC which can be used > > > by non-cohere

Re: [PATCH v6 07/33] iommu: Avoid reallocate default domain for a group

2021-01-28 Thread Will Deacon
On Thu, Jan 28, 2021 at 09:10:20PM +, Will Deacon wrote: > On Wed, Jan 27, 2021 at 05:39:16PM +0800, Yong Wu wrote: > > On Tue, 2021-01-26 at 22:23 +0000, Will Deacon wrote: > > > On Mon, Jan 11, 2021 at 07:18:48PM +0800, Yong Wu wrote: > > > > If group->defaul

Re: [PATCH v6 07/33] iommu: Avoid reallocate default domain for a group

2021-01-28 Thread Will Deacon
On Wed, Jan 27, 2021 at 05:39:16PM +0800, Yong Wu wrote: > On Tue, 2021-01-26 at 22:23 +0000, Will Deacon wrote: > > On Mon, Jan 11, 2021 at 07:18:48PM +0800, Yong Wu wrote: > > > If group->default_domain exists, avoid reallocate it. > > > > > > In some iomm

Re: [PATCH v3 0/3] perf/smmuv3: Don't reserve the PMCG register spaces

2021-01-28 Thread Will Deacon
On Wed, Jan 27, 2021 at 07:32:55PM +0800, Zhen Lei wrote: > v2 --> v3: > Patch 3 is updated because https://lkml.org/lkml/2021/1/22/532 has been > queued in advance. > > v1 --> v2: > According to Robin Murphy's suggestion: https://lkml.org/lkml/2021/1/20/470 > Don't reserve the PMCG register spac

Re: [PATCH v2 4/4] arm64: kaslr: support randomized module area with KASAN_VMALLOC

2021-01-28 Thread Will Deacon
On Thu, Jan 28, 2021 at 04:53:26PM +0800, Lecopzer Chen wrote: > > > On Sat, Jan 09, 2021 at 06:32:52PM +0800, Lecopzer Chen wrote: > > > After KASAN_VMALLOC works in arm64, we can randomize module region > > > into vmalloc area now. > > > > > > Test: > > > VMALLOC area ffc01000 ff

Re: [PATCH v2 0/4] perf vendor events arm64: Some tidy-up/refactoring

2021-01-28 Thread Will Deacon
vendor events arm64: Reference common and uarch events for A76 For the series: Acked-by: Will Deacon Will

Re: [PATCH -next] mm/nommu: Fix return type of filemap_map_pages()

2021-01-28 Thread Will Deacon
On Thu, 28 Jan 2021 11:06:26 +0100, Geert Uytterhoeven wrote: > If CONFIG_MMU is not set (e.g. m68k/m5272c3_defconfig): > > mm/nommu.c:1671:6: error: conflicting types for ‘filemap_map_pages’ > 1671 | void filemap_map_pages(struct vm_fault *vmf, > | ^ > In

Re: [next] mm/nommu.c:1671:6: error: conflicting types for 'filemap_map_pages'

2021-01-28 Thread Will Deacon
On Thu, Jan 28, 2021 at 04:26:09PM +0100, Geert Uytterhoeven wrote: > Hi Naresh, > > On Thu, Jan 28, 2021 at 3:25 PM Naresh Kamboju > wrote: > > arm, sh and riscv architecture build failed on today's Linux next tag > > 20210128. > > > > FYI, > > # CONFIG_MMU is not set on these failed configs. >

[PATCH v3 4/6] tlb: mmu_gather: Remove start/end arguments from tlb_gather_mmu()

2021-01-27 Thread Will Deacon
: Linus Torvalds Link: https://lore.kernel.org/r/CAHk-=wjQWa14_4UpfDf=fiinenp+rh74kzedmo_f1d35xnz...@mail.gmail.com Signed-off-by: Will Deacon --- arch/ia64/include/asm/tlb.h | 2 +- arch/x86/kernel/ldt.c | 2 +- fs/exec.c | 2 +- include/linux/mm_types.h| 3 +-- mm

[PATCH v3 1/6] mm: proc: Invalidate TLB after clearing soft-dirty page state

2021-01-27 Thread Will Deacon
ether: managing both the 'tlb_flush_pending' flag on the 'mm_struct' and explicit TLB invalidation for the sort-dirty path, much like mprotect() does already. Fixes: 0758cd830494 ("asm-generic/tlb: avoid potential double flush”) Acked-by: Peter Zijlstra (Intel) Rev

[PATCH v3 6/6] x86/ldt: Use tlb_gather_mmu_fullmm() when freeing LDT page-tables

2021-01-27 Thread Will Deacon
range starting at TASK_SIZE. Such a large range will be converted into a 'fullmm' flush by the low-level invalidation code, so change the caller to invoke tlb_gather_mmu_fullmm() directly. Cc: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Reviewed-by: Yu Zhao Signed-off-by: W

[PATCH v3 5/6] tlb: arch: Remove empty __tlb_remove_tlb_entry() stubs

2021-01-27 Thread Will Deacon
If __tlb_remove_tlb_entry() is not defined by the architecture then we provide an empty definition in asm-generic/tlb.h. Remove the redundant empty definitions for sparc64 and x86. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Yu Zhao Suggested-by: Peter Zijlstra Signed-off-by: Will Deacon

[PATCH v3 2/6] tlb: mmu_gather: Remove unused start/end arguments from tlb_finish_mmu()

2021-01-27 Thread Will Deacon
all callers. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Yu Zhao Signed-off-by: Will Deacon --- arch/ia64/include/asm/tlb.h | 2 +- arch/x86/kernel/ldt.c | 2 +- fs/exec.c | 2 +- include/linux/mm_types.h| 3 +-- mm/hugetlb.c| 2 +- mm/madvise.c

[PATCH v3 3/6] tlb: mmu_gather: Introduce tlb_gather_mmu_fullmm()

2021-01-27 Thread Will Deacon
y: Peter Zijlstra (Intel) Reviewed-by: Yu Zhao Signed-off-by: Will Deacon --- include/asm-generic/tlb.h | 6 -- include/linux/mm_types.h | 1 + mm/mmap.c | 2 +- mm/mmu_gather.c | 16 ++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff

[PATCH v3 0/6] tlb: Fix (soft-)dirty bit management & clean up API

2021-01-27 Thread Will Deacon
homas Gleixner Cc: Linus Torvalds Cc: Andrew Morton Cc: Mohamed Alzayat Cc: "Aneesh Kumar K.V" Cc: Nadav Amit Cc: Andrea Arcangeli Cc: linux...@kvack.org --->8 Will Deacon (6): mm: proc: Invalidate TLB after clearing soft-dirty page state tlb: mmu_gather: Remove unused start/

Re: [PATCH v2 4/4] arm64: kaslr: support randomized module area with KASAN_VMALLOC

2021-01-27 Thread Will Deacon
On Sat, Jan 09, 2021 at 06:32:52PM +0800, Lecopzer Chen wrote: > After KASAN_VMALLOC works in arm64, we can randomize module region > into vmalloc area now. > > Test: > VMALLOC area ffc01000 fffdf000 > > before the patch: > module_alloc_base/end ffc00

Re: [PATCH v15 10/10] arm64: Add IMA log information in kimage used for kexec

2021-01-27 Thread Will Deacon
On Wed, Jan 27, 2021 at 01:31:02PM -0500, Mimi Zohar wrote: > On Wed, 2021-01-27 at 10:24 -0800, Lakshmi Ramasubramanian wrote: > > On 1/27/21 10:02 AM, Will Deacon wrote: > > > On Wed, Jan 27, 2021 at 09:56:53AM -0800, Lakshmi Ramasubramanian wrote: > > >> On 1/27

Re: [PATCH 2/2] ARM: mcs_spinlock: Drop smp_wmb in arch_mcs_spin_lock_contended()

2021-01-27 Thread Will Deacon
On Wed, Jan 27, 2021 at 09:01:09PM +0100, Alexander A Sverdlin wrote: > From: Alexander Sverdlin > > Drop smp_wmb in arch_mcs_spin_lock_contended() after adding in into > ARCH-independent code. > > Signed-off-by: Alexander Sverdlin > --- > arch/arm/include/asm/mcs_spinlock.h | 2 -- > 1 file c

Re: [PATCH 1/2] qspinlock: Ensure writes are pushed out of core write buffer

2021-01-27 Thread Will Deacon
On Wed, Jan 27, 2021 at 09:01:08PM +0100, Alexander A Sverdlin wrote: > From: Alexander Sverdlin > > Ensure writes are pushed out of core write buffer to prevent waiting code > on another cores from spinning longer than necessary. > > 6 threads running tight spinlock loop competing for the same

Re: [PATCH v9 0/4] arm64: ARMv8.5-A: MTE: Add async mode support

2021-01-27 Thread Will Deacon
rror. > > > > The series is based on linux-next/akpm. > > > > To simplify the testing a tree with the new patches on top has been made > > available at [1]. > > > > [1] https://git.gitlab.arm.com/linux-arm/linux-vf.git mte/v10.async.akpm > > > > Cc: Andrew

Re: [PATCH v15 09/10] arm64: Call kmalloc() to allocate DTB buffer

2021-01-27 Thread Will Deacon
On Wed, Jan 27, 2021 at 09:59:38AM -0800, Lakshmi Ramasubramanian wrote: > On 1/27/21 8:52 AM, Will Deacon wrote: > > Hi Will, > > > On Fri, Jan 15, 2021 at 09:30:16AM -0800, Lakshmi Ramasubramanian wrote: > > > create_dtb() function allocates kernel virtual memory for

Re: [PATCH v15 10/10] arm64: Add IMA log information in kimage used for kexec

2021-01-27 Thread Will Deacon
On Wed, Jan 27, 2021 at 09:56:53AM -0800, Lakshmi Ramasubramanian wrote: > On 1/27/21 8:54 AM, Will Deacon wrote: > > On Fri, Jan 15, 2021 at 09:30:17AM -0800, Lakshmi Ramasubramanian wrote: > > > Address and size of the buffer containing the IMA measurement log need > >

Re: WARNING in __do_kernel_fault

2021-01-27 Thread Will Deacon
On Wed, Jan 27, 2021 at 06:24:22PM +0100, Dmitry Vyukov wrote: > On Wed, Jan 27, 2021 at 6:15 PM Will Deacon wrote: > > > > On Wed, Jan 27, 2021 at 06:00:30PM +0100, Dmitry Vyukov wrote: > > > On Wed, Jan 27, 2021 at 5:56 PM syzbot > > > wrote: > > > >

Re: [PATCH v4 0/8] Create 'old' ptes for faultaround mappings on arm64 with hardware access flag

2021-01-27 Thread Will Deacon
On Tue, Jan 26, 2021 at 03:28:22PM -0800, Hugh Dickins wrote: > On Tue, 26 Jan 2021, Will Deacon wrote: > > On Wed, Jan 20, 2021 at 05:36:04PM +0000, Will Deacon wrote: > > > Hi all, > > > > > > This is version four of the patches I previously p

Re: WARNING in __do_kernel_fault

2021-01-27 Thread Will Deacon
On Wed, Jan 27, 2021 at 06:00:30PM +0100, Dmitry Vyukov wrote: > On Wed, Jan 27, 2021 at 5:56 PM syzbot > wrote: > > > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:2ab38c17 mailmap: remove the "repo-abbrev" comment > > git tree: upstream > > console output: h

Re: [PATCH v15 10/10] arm64: Add IMA log information in kimage used for kexec

2021-01-27 Thread Will Deacon
On Fri, Jan 15, 2021 at 09:30:17AM -0800, Lakshmi Ramasubramanian wrote: > Address and size of the buffer containing the IMA measurement log need > to be passed from the current kernel to the next kernel on kexec. > > Add address and size fields to "struct kimage_arch" for ARM64 platform > to hold

Re: [PATCH v15 09/10] arm64: Call kmalloc() to allocate DTB buffer

2021-01-27 Thread Will Deacon
On Fri, Jan 15, 2021 at 09:30:16AM -0800, Lakshmi Ramasubramanian wrote: > create_dtb() function allocates kernel virtual memory for > the device tree blob (DTB). This is not consistent with other > architectures, such as powerpc, which calls kmalloc() for allocating > memory for the DTB. > > Cal

Re: (subset) [PATCH v10 00/18] arm64: MMU enabled kexec relocation

2021-01-27 Thread Will Deacon
On Mon, 25 Jan 2021 14:19:05 -0500, Pavel Tatashin wrote: > Changelog: > v10: > - Addressed a lot of comments form James Morse and from Marc Zyngier > - Added review-by's > - Synchronized with mainline > > [...] Applied the first 12 patches to arm64 (for-next/kexec), thanks! [

Re: [PATCH] iommu/arm-smmu-qcom: Fix mask extraction for bootloader programmed SMRs

2021-01-27 Thread Will Deacon
On Mon, 25 Jan 2021 13:52:25 -0800, Isaac J. Manjarres wrote: > When extracting the mask for a SMR that was programmed by the > bootloader, the SMR's valid bit is also extracted and is treated > as part of the mask, which is not correct. Consider the scenario > where an SMMU master whose context is

Re: [PATCH v4 0/7] MediaTek IOMMU improve tlb flush performance in map/unmap

2021-01-27 Thread Will Deacon
On Thu, 7 Jan 2021 20:29:02 +0800, Yong Wu wrote: > This patchset is to improve tlb flushing performance in iommu_map/unmap > for MediaTek IOMMU. > > For iommu_map, currently MediaTek IOMMU use IO_PGTABLE_QUIRK_TLBI_ON_MAP > to do tlb_flush for each a memory chunk. this is so unnecessary. we could

Re: [PATCH] arm64: PCI: Enable SMC conduit

2021-01-27 Thread Will Deacon
On Tue, Jan 26, 2021 at 11:08:31AM -0600, Vikram Sethi wrote: > On 1/22/2021 1:48 PM, Will Deacon wrote: > > On Fri, Jan 08, 2021 at 10:32:16AM +, Lorenzo Pieralisi wrote: > >> On Thu, Jan 07, 2021 at 04:05:48PM -0500, Jon Masters wrote: > >>> On 1/7/21 1:14 PM

Re: [PATCH] arm64: PCI: Enable SMC conduit

2021-01-27 Thread Will Deacon
On Tue, Jan 26, 2021 at 10:46:04AM -0600, Jeremy Linton wrote: > On 1/22/21 1:48 PM, Will Deacon wrote: > > This isn't like the usual fragmentation problems, where firmware swoops in > > to save the day; CPU onlining, spectre mitigations, early entropy etc. All > > of th

Re: [PATCH v10 00/18] arm64: MMU enabled kexec relocation

2021-01-27 Thread Will Deacon
Hi Pavel, On Mon, Jan 25, 2021 at 02:19:05PM -0500, Pavel Tatashin wrote: > Changelog: > v10: > - Addressed a lot of comments form James Morse and from Marc Zyngier > - Added review-by's > - Synchronized with mainline This series has been doing the rounds for a while, but still

Re: [RFC PATCH v0] mm/slub: Let number of online CPUs determine the slub page order

2021-01-27 Thread Will Deacon
On Mon, Jan 25, 2021 at 12:20:14PM +0100, Vlastimil Babka wrote: > On 1/23/21 1:32 PM, Vincent Guittot wrote: > >> PowerPC PowerNV Host: (160 cpus) > >> num_online_cpus 1 num_present_cpus 160 num_possible_cpus 160 nr_cpu_ids 160 > >> > >> PowerPC pseries KVM guest: (-smp 16,maxcpus=160) > >> num_on

Re: [PATCH v4 0/8] Create 'old' ptes for faultaround mappings on arm64 with hardware access flag

2021-01-27 Thread Will Deacon
On Wed, Jan 20, 2021 at 05:36:04PM +, Will Deacon wrote: > Hi all, > > This is version four of the patches I previously posted here: > > v1: https://lore.kernel.org/r/20201209163950.8494-1-w...@kernel.org > v2: https://lore.kernel.org/r/20210108171517.5290-1-w...@kernel

Re: [PATCH 1/1] iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code

2021-01-27 Thread Will Deacon
On Wed, Jan 27, 2021 at 10:05:50AM +0800, Leizhen (ThunderTown) wrote: > I've sent another set of patches. https://lkml.org/lkml/2021/1/26/1065 > If those patches are acceptable, then this one should be ignored. I've already queued this one, so if you want me to drop it then you need to send me a

Re: [PATCH v10 00/18] arm64: MMU enabled kexec relocation

2021-01-27 Thread Will Deacon
On Tue, Jan 26, 2021 at 06:05:10PM -0500, Pavel Tatashin wrote: > On Tue, Jan 26, 2021 at 5:58 PM Will Deacon wrote: > > > > Hi Pavel, > > > > On Mon, Jan 25, 2021 at 02:19:05PM -0500, Pavel Tatashin wrote: > > > Changelog: > > > v10: > > >

Re: [PATCH v6 00/33] MT8192 IOMMU support

2021-01-26 Thread Will Deacon
On Mon, Jan 11, 2021 at 07:18:41PM +0800, Yong Wu wrote: > This patch mainly adds support for mt8192 Multimedia IOMMU and SMI. > > mt8192 also is MTK IOMMU gen2 which uses ARM Short-Descriptor translation > table format. The M4U-SMI HW diagram is as below: > > EMI >

Re: [PATCH v6 07/33] iommu: Avoid reallocate default domain for a group

2021-01-26 Thread Will Deacon
On Mon, Jan 11, 2021 at 07:18:48PM +0800, Yong Wu wrote: > If group->default_domain exists, avoid reallocate it. > > In some iommu drivers, there may be several devices share a group. Avoid > realloc the default domain for this case. > > Signed-off-by: Yong Wu > --- > drivers/iommu/iommu.c | 3

Re: [PATCH v5] arm64: Enable perf events based hard lockup detector

2021-01-26 Thread Will Deacon
Hi Sumit, On Fri, Jan 15, 2021 at 05:31:41PM +0530, Sumit Garg wrote: > With the recent feature added to enable perf events to use pseudo NMIs > as interrupts on platforms which support GICv3 or later, its now been > possible to enable hard lockup detector (or NMI watchdog) on arm64 > platforms. S

Re: [RFC PATCH 2/2] arm64: kpti: Update arm64_use_ng_mappings before pagetable mapping

2021-01-26 Thread Will Deacon
On Wed, Jan 13, 2021 at 09:40:47AM +0800, Jia He wrote: > There is a 10s stall in idmap_kpti_install_ng_mappings when kernel boots > on a Ampere EMAG server. > > Commit f992b4dfd58b ("arm64: kpti: Add ->enable callback to remap > swapper using nG mappings") updates the nG bit runtime if kpti is re

Re: [RFC PATCH 1/2] arm64/cpuinfo: Move init_cpu_features() ahead of setup.c::early_fixmap_init()

2021-01-26 Thread Will Deacon
On Wed, Jan 13, 2021 at 09:40:46AM +0800, Jia He wrote: > Move init_cpu_features() ahead of setup_arch()->early_fixmap_init(), which > is the preparation work for checking the condition to assign > arm64_use_ng_mappings as cpus_have_const_cap(ARM64_UNMAP_KERNEL_AT_EL0). > > Besides, jump_label_ini

Re: [PATCH v2] locking/rwsem: Remove empty rwsem.h

2021-01-26 Thread Will Deacon
gt; > kernel/locking/rwsem.h | 0 > 1 file changed, 0 insertions(+), 0 deletions(-) > delete mode 100644 kernel/locking/rwsem.h > > diff --git a/kernel/locking/rwsem.h b/kernel/locking/rwsem.h > deleted file mode 100644 > index e69de29bb2d1.. Acked-by: Will Deacon Will

Re: [PATCH 1/1] iommu/arm-smmu-v3: add support for BBML

2021-01-26 Thread Will Deacon
On Mon, Jan 25, 2021 at 08:23:40PM +, Robin Murphy wrote: > Now we probably will need some degreee of BBML feature awareness for the > sake of SVA if and when we start using it for CPU pagetables, but I still > cannot see any need to consider it in io-pgtable. Agreed; I don't think this is som

[STABLE BACKPORT v2 4.4.y, 4.9.y and 4.14.y] compiler.h: Raise minimum version of GCC to 5.1 for arm64

2021-01-25 Thread Will Deacon
el.org/r/CA+G9fYuzE9WMSB7uGjV4gTzK510SHEdJb_UXQCzsQ5MqA=h...@mail.gmail.com Signed-off-by: Will Deacon --- include/linux/compiler-gcc.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index af8b4a879934..9485abe76b68 100644 --- a/include/linux/compiler-gcc.h +++ b/in

Re: [PATCH] arm64: PCI: Enable SMC conduit

2021-01-22 Thread Will Deacon
Hi Lorenzo, On Fri, Jan 08, 2021 at 10:32:16AM +, Lorenzo Pieralisi wrote: > On Thu, Jan 07, 2021 at 04:05:48PM -0500, Jon Masters wrote: > > On 1/7/21 1:14 PM, Will Deacon wrote: > > > > > On Mon, Jan 04, 2021 at 10:57:35PM -0600, Jeremy Linton wrote: >

Re: [PATCH v4 0/7] MediaTek IOMMU improve tlb flush performance in map/unmap

2021-01-22 Thread Will Deacon
mu: Move iotlb_sync_map out from __iommu_map > iommu: Add iova and size as parameters in iotlb_sync_map > iommu/mediatek: Add iotlb_sync_map to sync whole the iova range > iommu: Switch gather->end to the inclusive end > iommu/io-pgtable: Allow io_pgtable_tlb ops optional > iom

Re: [PATCH v4 8/8] mm: Mark anonymous struct field of 'struct vm_fault' as 'const'

2021-01-22 Thread Will Deacon
Hey Nick, On Fri, Jan 22, 2021 at 11:10:50AM -0800, Nick Desaulniers wrote: > On Thu, Jan 21, 2021 at 1:28 PM Will Deacon wrote: > > On Thu, Jan 21, 2021 at 11:24:36AM -0800, Nick Desaulniers wrote: > > > On Thu, Jan 21, 2021 at 5:11 AM Will Deacon wrote: > > Sure, but

Re: [PATCH v2 0/4] arm64: kasan: support CONFIG_KASAN_VMALLOC

2021-01-22 Thread Will Deacon
On Thu, Jan 21, 2021 at 06:44:14PM +0100, Andrey Konovalov wrote: > On Sat, Jan 9, 2021 at 11:33 AM Lecopzer Chen wrote: > > > > Linux supports KAsan for VMALLOC since commit 3c5c3cfb9ef4da9 > > ("kasan: support backing vmalloc space with real shadow memory") > > > > Acroding to how x86 ported it

Re: [PATCH] arm64: kprobes: Fix Uexpected kernel BRK exception at EL1

2021-01-22 Thread Will Deacon
signed long)&cur->ainsn.api.insn[1] == addr)) { > kprobes_restore_local_irqflag(kcb, regs); > post_kprobe_handler(cur, kcb, regs); Acked-by: Will Deacon Catalin can pick this up for 5.11. Will

Re: [PATCH 4.14 00/50] 4.14.217-rc1 review

2021-01-22 Thread Will Deacon
table-rc.git > > > > linux-4.14.y > > > > and the diffstat can be found below. > > > > > > > > thanks, > > > > > > > > greg k-h > > > > > > arm64 clang-10 builds breaks due to this patch on > > >- stable-rc

Re: [PATCH 1/2] dt-bindings: arm-smmu: Add sm8350 compatible string

2021-01-22 Thread Will Deacon
On Fri, 15 Jan 2021 14:33:21 +0530, Vinod Koul wrote: > Add compatible string for sm8350 iommu to documentation. Applied to will (for-joerg/arm-smmu/updates), thanks! [1/2] dt-bindings: arm-smmu: Add sm8350 compatible string https://git.kernel.org/will/c/70b5b6a6daea [2/2] iommu: arm-smmu-i

Re: [PATCH 1/1] iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code

2021-01-22 Thread Will Deacon
On Fri, 22 Jan 2021 21:14:48 +0800, Zhen Lei wrote: > No functional change. Applied to will (for-joerg/arm-smmu/updates), thanks! [1/1] iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code https://git.kernel.org/will/c/932bc8c7d742 Cheers, -- Will https://fixes.arm64.dev https://next

Re: [PATCH 1/2] dt-bindings: arm-smmu-qcom: Add Qualcomm SC8180X compatible

2021-01-22 Thread Will Deacon
On Wed, 20 Jan 2021 17:40:04 -0800, Bjorn Andersson wrote: > Add compatible for the ARM SMMU found in the Qualcomm SC8180x platform. Applied to will (for-joerg/arm-smmu/updates), thanks! [1/2] dt-bindings: arm-smmu-qcom: Add Qualcomm SC8180X compatible https://git.kernel.org/will/c/9cde12ba

Re: [PATCH 1/1] iommu/arm-smmu-v3: add support for BBML

2021-01-22 Thread Will Deacon
On Fri, Jan 22, 2021 at 09:21:20PM +0800, Leizhen (ThunderTown) wrote: > On 2021/1/22 21:00, Robin Murphy wrote: > > On 2021-01-22 12:51, Will Deacon wrote: > >> On Thu, Nov 26, 2020 at 11:42:30AM +0800, Zhen Lei wrote: > >>>   -    tblp = ptep - AR

Re: [PATCH 2/2] dt-bindings: arm-smmu: Add binding for Qcom SDX55 SMMU

2021-01-22 Thread Will Deacon
On Tue, Jan 12, 2021 at 09:22:23PM -0600, Rob Herring wrote: > On Thu, 07 Jan 2021 20:01:18 +0530, Manivannan Sadhasivam wrote: > > Add devicetree binding for Qualcomm SDX55 SMMU. > > > > Cc: Will Deacon > > Cc: Robin Murphy > > Cc: Joerg Roedel > &g

Re: [PATCH 6/6] mm: Forbid splitting special mappings

2021-01-22 Thread Will Deacon
On Fri, Jan 22, 2021 at 12:58:58PM +, Will Deacon wrote: > On Tue, Oct 13, 2020 at 02:34:16AM +0100, Dmitry Safonov wrote: > > Don't allow splitting of vm_special_mapping's. > > It affects vdso/vvar areas. Uprobes have only one page in xol_area so > > they

Re: [PATCH 6/6] mm: Forbid splitting special mappings

2021-01-22 Thread Will Deacon
390/kernel/vdso.c | 11 +-- > arch/x86/entry/vdso/vma.c | 17 > mm/mmap.c | 12 > 6 files changed, 16 insertions(+), 78 deletions(-) For arm64: Acked-by: Will Deacon Will

Re: [PATCH 1/1] iommu/arm-smmu-v3: add support for BBML

2021-01-22 Thread Will Deacon
On Thu, Nov 26, 2020 at 11:42:30AM +0800, Zhen Lei wrote: > When changing from a set of pages/smaller blocks to a larger block for an > address, the software should follow the sequence of BBML processing. > > When changing from a block to a set of pages/smaller blocks for an > address, there's no

Re: [PATCH v2 1/3] iommu/arm-smmu: Add support for driver IOMMU fault handlers

2021-01-22 Thread Will Deacon
On Tue, Nov 24, 2020 at 12:15:58PM -0700, Jordan Crouse wrote: > Call report_iommu_fault() to allow upper-level drivers to register their > own fault handlers. > > Signed-off-by: Jordan Crouse > --- > > drivers/iommu/arm/arm-smmu/arm-smmu.c | 16 +--- > 1 file changed, 13 insertions

Re: rcu-torture: Internal error: Oops: 96000006

2021-01-21 Thread Will Deacon
On Thu, Jan 21, 2021 at 10:55:21AM -0800, Paul E. McKenney wrote: > On Thu, Jan 21, 2021 at 10:37:21PM +0530, Naresh Kamboju wrote: > > While running rcu-torture test on qemu_arm64 and arm64 Juno-r2 device > > the following kernel crash noticed. This started happening from Linux next > > next-20210

Re: [PATCH v4 8/8] mm: Mark anonymous struct field of 'struct vm_fault' as 'const'

2021-01-21 Thread Will Deacon
On Thu, Jan 21, 2021 at 11:24:36AM -0800, Nick Desaulniers wrote: > On Thu, Jan 21, 2021 at 5:11 AM Will Deacon wrote: > > > > On Wed, Jan 20, 2021 at 11:02:06AM -0800, Linus Torvalds wrote: > > > On Wed, Jan 20, 2021 at 10:27 AM Nick Desaulniers > > >

Re: [PATCH 0/1] arm64/sparsemem: reduce SECTION_SIZE_BITS

2021-01-21 Thread Will Deacon
On Wed, 20 Jan 2021 21:29:12 -0800, Sudarshan Rajagopalan wrote: > This patch is the follow-up from the discussions in the thread [1]. > Reducing the section size has the merit of reducing wastage of reserved memory > for vmmemmap mappings for sections with large memory holes. Also with smaller > s

Re: [RFC PATCH 3/7] arm64: mm: use nGnRnE instead of nGnRE on Apple processors

2021-01-21 Thread Will Deacon
On Thu, Jan 21, 2021 at 06:15:06PM +, Marc Zyngier wrote: > On 2021-01-21 17:55, Will Deacon wrote: > > On Thu, Jan 21, 2021 at 04:25:54PM +, Marc Zyngier wrote: > > > On 2021-01-21 15:12, Mohamed Mediouni wrote: > > > > Please ignore that patch. > > &g

Re: [PATCH v6 0/5] ARM: arm64: Add SMCCC TRNG entropy service

2021-01-21 Thread Will Deacon
On Wed, Jan 20, 2021 at 02:15:59PM +0100, Ard Biesheuvel wrote: > On Wed, 20 Jan 2021 at 14:01, Will Deacon wrote: > > > > On Wed, 6 Jan 2021 10:34:48 +, Andre Przywara wrote: > > > a fix to v5, now *really* fixing the wrong priority of SMCCC vs. RNDR > > > i

Re: [RFC PATCH 3/7] arm64: mm: use nGnRnE instead of nGnRE on Apple processors

2021-01-21 Thread Will Deacon
On Thu, Jan 21, 2021 at 04:25:54PM +, Marc Zyngier wrote: > On 2021-01-21 15:12, Mohamed Mediouni wrote: > > Please ignore that patch. > > > > It turns out that the PCIe controller on Apple M1 expects posted > > writes and so the memory range for it ought to be set nGnRE. > > So, we need to us

Re: [PATCH] random: avoid arch_get_random_seed_long() when collecting IRQ randomness

2021-01-21 Thread Will Deacon
On Thu, 5 Nov 2020 16:29:44 +0100, Ard Biesheuvel wrote: > When reseeding the CRNG periodically, arch_get_random_seed_long() is > called to obtain entropy from an architecture specific source if one > is implemented. In most cases, these are special instructions, but in > some cases, such as on ARM

Re: [PATCH 0/1] mm: Optimizing hugepage zeroing in arm64

2021-01-21 Thread Will Deacon
On Thu, Jan 21, 2021 at 10:21:50PM +0530, Prathu Baronia wrote: > This patch removes the unnecessary kmap calls in the hugepage zeroing path and > improves the timing by 62%. > > I had proposed a similar change in Apr-May'20 timeframe in memory.c where I > proposed to clear out a hugepage by direc

Re: [PATCH 1/1] arm64/sparsemem: reduce SECTION_SIZE_BITS

2021-01-21 Thread Will Deacon
onstraints, lets just reduce the section size to 128MB for 4K > and 16K base page size configs, and to 512MB for 64K base page size config. > > Signed-off-by: Sudarshan Rajagopalan > Suggested-by: Anshuman Khandual > Suggested-by: David Hildenbrand > Cc: Catalin Marinas &

Re: [PATCH v4 8/8] mm: Mark anonymous struct field of 'struct vm_fault' as 'const'

2021-01-21 Thread Will Deacon
On Wed, Jan 20, 2021 at 11:02:06AM -0800, Linus Torvalds wrote: > On Wed, Jan 20, 2021 at 10:27 AM Nick Desaulniers > wrote: > > > > Is there a difference between: [ const unnamed struct and individual const > > members ] > > Semantically? No. > > Syntactically the "group the const members toge

Re: [PATCH v4 7/8] mm: Use static initialisers for immutable fields of 'struct vm_fault'

2021-01-21 Thread Will Deacon
On Wed, Jan 20, 2021 at 10:21:33AM -0800, Nick Desaulniers wrote: > On Wed, Jan 20, 2021 at 9:36 AM Will Deacon wrote: > > > > In preparation for const-ifying the anonymous struct field of > > 'struct vm_fault', ensure that it is initialised using static > &

Re: [PATCH v4 4/8] mm: Move immutable fields of 'struct vm_fault' into anonymous struct

2021-01-21 Thread Will Deacon
On Wed, Jan 20, 2021 at 10:13:37AM -0800, Nick Desaulniers wrote: > On Wed, Jan 20, 2021 at 9:36 AM Will Deacon wrote: > > > > 'struct vm_fault' contains both information about the fault being > > serviced alongside mutable fields contributing to the state

Re: [RFC PATCH 3/7] arm64: mm: use nGnRnE instead of nGnRE on Apple processors

2021-01-21 Thread Will Deacon
On Thu, Jan 21, 2021 at 11:44:23AM +, Marc Zyngier wrote: > On 2021-01-21 11:27, Will Deacon wrote: > > On Wed, Jan 20, 2021 at 02:27:13PM +0100, Mohamed Mediouni wrote: > > > Use nGnRnE instead of nGnRE on Apple SoCs to workaround a serious > > > hardware q

Re: [RFC PATCH 3/7] arm64: mm: use nGnRnE instead of nGnRE on Apple processors

2021-01-21 Thread Will Deacon
On Wed, Jan 20, 2021 at 02:27:13PM +0100, Mohamed Mediouni wrote: > Use nGnRnE instead of nGnRE on Apple SoCs to workaround a serious hardware > quirk. > > On Apple processors, writes using the nGnRE device memory type get dropped in > flight, > getting to nowhere. > > Signed-off-by: Stan Skowr

Re: [PATCH v6 0/5] ARM: arm64: Add SMCCC TRNG entropy service

2021-01-20 Thread Will Deacon
On Wed, Jan 20, 2021 at 01:45:24PM +, Andre Przywara wrote: > On Wed, 20 Jan 2021 13:26:26 + > Marc Zyngier wrote: > > Hi, > > > On 2021-01-20 13:01, Will Deacon wrote: > > > On Wed, 6 Jan 2021 10:34:48 +, Andre Przywara wrote: > > >>

[PATCH v4 4/8] mm: Move immutable fields of 'struct vm_fault' into anonymous struct

2021-01-20 Thread Will Deacon
s Link: https://lore.kernel.org/r/CAHk-=whYs9XsO88iqJzN6NC=D-dp2m0oYXuOoZ=eWnvv=5o...@mail.gmail.com Signed-off-by: Will Deacon --- include/linux/mm.h | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 251a2339befb..

[PATCH v4 1/8] mm: Cleanup faultaround and finish_fault() codepaths

2021-01-20 Thread Will Deacon
re.kernel.org/r/20201229132819.najtavneutnf7ajp@box Signed-off-by: Kirill A. Shutemov [will: s/from from/from/ in comment; spotted by willy] Signed-off-by: Will Deacon --- fs/xfs/xfs_file.c | 6 +- include/linux/mm.h | 12 ++- include/linux/pgtable.h | 11 +++ mm/filemap.c

[PATCH v4 2/8] mm: Allow architectures to request 'old' entries when prefaulting

2021-01-20 Thread Will Deacon
c: Andrew Morton Cc: Kirill A. Shutemov Cc: Linus Torvalds Reported-by: Vinayak Menon Signed-off-by: Will Deacon --- include/linux/mm.h | 5 - mm/filemap.c | 14 ++ mm/memory.c| 20 +++- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git

[PATCH v4 0/8] Create 'old' ptes for faultaround mappings on arm64 with hardware access flag

2021-01-20 Thread Will Deacon
c: --->8 Kirill A. Shutemov (1): mm: Cleanup faultaround and finish_fault() codepaths Will Deacon (7): mm: Allow architectures to request 'old' entries when prefaulting arm64: mm: Implement arch_wants_old_prefaulted_pte() mm: Move immutable fields of 'struct v

[PATCH v4 3/8] arm64: mm: Implement arch_wants_old_prefaulted_pte()

2021-01-20 Thread Will Deacon
e extended in future based on MIDR matching if necessary. Cc: Catalin Marinas Signed-off-by: Will Deacon --- arch/arm64/include/asm/pgtable.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.

<    1   2   3   4   5   6   7   8   9   10   >