[PATCH 1/2] x86: mm: ptdump: Calculate effective permissions correctly

2020-05-21 Thread Steven Price
o use walk_page_range") Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 31 +++ include/linux/ptdump.h| 1 + mm/ptdump.c | 17 - 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/a

[PATCH 2/2] mm: ptdump: Expand type of 'val' in note_page()

2020-05-21 Thread Steven Price
to ensure that it is always big enough. Reported-by: Jan Beulich Signed-off-by: Steven Price --- arch/arm64/mm/dump.c | 2 +- arch/x86/mm/dump_pagetables.c | 2 +- include/linux/ptdump.h| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/dump.c b/arch/arm64

[PATCH 0/2] Fix W+X debug feature on x86

2020-05-21 Thread Steven Price
[1] https://lore.kernel.org/lkml/d573dc7e-e742-84de-473d-f971142fa...@suse.com/ [2] 2ae27137b2db ("x86: mm: convert dump_pagetables to use walk_page_range") Steven Price (2): x86: mm: ptdump: Calculate effective permissions correctly mm: ptdump: Expand type of 'val' in note_page()

Re: [PATCH] drm/panfrost: fix runtime pm imbalance on error

2020-05-20 Thread Steven Price
On 20/05/2020 12:05, Dinghao Liu wrote: pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Actually I think we have the

Re: [PATCH 1/2] firmware: arm-smccc: define identifier for Arm SMCCC v1.2

2020-05-14 Thread Steven Price
On 14/05/2020 09:21, Etienne Carriere wrote: Define identifier value reported by secure firmware when its supports Arm SMCCC specification v1.2. Signed-off-by: Etienne Carriere FYI Sudeep has already posted a patch to do this[1]. Steve [1]

Re: your "x86: mm: convert dump_pagetables to use walk_page_range" change

2020-05-12 Thread Steven Price
On 12/05/2020 10:39, Jan Beulich wrote: Steven, Hi Jan, in the description of this change you say: "The effective permissions are passed down the chain using new fields in struct pg_state." I don't see how this works, and I suppose this part of the change is (part of) the reason why a

Re: [PATCH v3 10/25] drm: panfrost: fix common struct sg_table related issues

2020-05-11 Thread Steven Price
on dma-mapping wrappers operating directly on the struct sg_table objects and adjust references to the nents and orig_nents respectively. Signed-off-by: Marek Szyprowski The change looks good to me: Reviewed-by: Steven Price Although I would have appreciated the commit message being modified to

Re: [PATCH 2/2] drm/panfrost: add devfreq regulator support

2020-05-07 Thread Steven Price
On 02/05/2020 23:07, Clément Péron wrote: Hi Steven, On Tue, 14 Apr 2020 at 15:10, Steven Price wrote: Hi Clément, On 13/04/2020 18:28, Clément Péron wrote: Hi Steven, Getting a backtrace from the two occurrences, I see one added from: (debugfs_create_dir) from

Re: [PATCH v2 4/5] firmware: psci: Add function to fetch SMCCC version

2020-05-04 Thread Steven Price
there is a good reason for this patch... ;) Reviewed-by: Steven Price Steve Signed-off-by: Sudeep Holla --- drivers/firmware/psci/psci.c | 5 + include/linux/arm-smccc.h| 9 + 2 files changed, 14 insertions(+) diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci

Re: [PATCH v2 5/5] arm/arm64: smccc: Add ARCH_SOC_ID support

2020-05-04 Thread Steven Price
custom sysfs for the vendor ID as JEP-106 bank and identification code. Signed-off-by: Sudeep Holla Some minor things below, but with those fixed: Reviewed-by: Steven Price --- drivers/firmware/psci/Kconfig | 9 ++ drivers/firmware/psci/Makefile | 1 + drivers/firmware/psci/soc_id.c

Re: [PATCH v2 09/21] drm: panfrost: fix sg_table nents vs. orig_nents misuse

2020-05-04 Thread Steven Price
ing: Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Even better would be the wrappers you mention in the cover letter! ;) Reviewed-by: Steven Price Signed-off-by: Marek Szyprowski --- For more information, see '[PATCH v2 00/21] DRM: fix struct sg_table nents vs. orig

Re: [PATCH 5/5] arm/arm64: smccc: Add ARCH_SOC_ID support

2020-05-01 Thread Steven Price
On 30/04/2020 12:48, Sudeep Holla wrote: SMCCC v1.2 adds a new optional function SMCCC_ARCH_SOC_ID to obtain a SiP defined SoC identification value. Add support for the same. Also using the SoC bus infrastructure, let us expose the platform specific SoC atrributes under sysfs. We also provide

Re: [PATCH 3/5] arm/arm64: smccc: Drop smccc_version enum and use ARM_SMCCC_VERSION_1_x instead

2020-05-01 Thread Steven Price
On 30/04/2020 12:48, Sudeep Holla wrote: Instead of maintaining 2 sets of enums/macros for tracking SMCCC version, let us drop smccc_version enum and use ARM_SMCCC_VERSION_1_x directly instead. Signed-off-by: Sudeep Holla Reviewed-by: Steven Price --- arch/arm64/kernel/paravirt.c | 2

Re: [PATCH 1/5] arm/arm64: smccc: Update link to latest SMCCC specification

2020-05-01 Thread Steven Price
. Currently it points to v1.2 published in s/stal/stale/ otherwise: Reviewed-by: Steven Price March 2020. Signed-off-by: Sudeep Holla --- include/linux/arm-smccc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index

Re: [PATCH 2/5] arm/arm64: smccc: Add the definition for SMCCCv1.2 version/error codes

2020-05-01 Thread Steven Price
On 30/04/2020 12:48, Sudeep Holla wrote: Add the definition for SMCCC v1.2 version and new error code added. While at it, also add a note that ARM DEN 0070A is deprecated and is now merged into the main SMCCC specification(ARM DEN 0028C). Signed-off-by: Sudeep Holla Reviewed-by: Steven Price

Re: [PATCH v7 00/10] arm64: Stolen time support

2019-10-23 Thread Steven Price
On 23/10/2019 13:39, Marc Zyngier wrote: > Hi Steven, > > On 2019-10-21 16:28, Steven Price wrote: >> This series add support for paravirtualized time for arm64 guests and >> KVM hosts following the specification in Arm's document DEN 0057A: >> >> https

[PATCH v7 09/10] arm/arm64: Make use of the SMCCC 1.1 wrapper

2019-10-21 Thread Steven Price
Rather than directly choosing which function to use based on psci_ops.conduit, use the new arm_smccc_1_1 wrapper instead. In some cases we still need to do some operations based on the conduit, but the code duplication is removed. No functional change. Signed-off-by: Steven Price --- arch/arm

[PATCH v7 00/10] arm64: Stolen time support

2019-10-21 Thread Steven Price
up Documentation/{virt->virtual} change * Bunch of typo fixes Christoffer Dall (1): KVM: arm/arm64: Factor out hypercall handling from PSCI code Steven Price (9): KVM: arm64: Document PV-time interface KVM: arm64: Implement PV_TIME_FEATURES call KVM: Implement kvm_put_guest() KVM: arm64: S

Re: [PATCH v6 01/10] KVM: arm64: Document PV-time interface

2019-10-21 Thread Steven Price
On 18/10/2019 18:10, Mark Rutland wrote: > On Tue, Oct 15, 2019 at 06:56:51PM +0100, Mark Rutland wrote: [...] >>> +PV_TIME_ST >>> += == >>> +Function ID: (uint32)0xC521 >>> +Return value: (int64) IPA of the stolen time data structure for

Re: [PATCH] drm/panfrost: fix -Wmissing-prototypes warnings

2019-10-21 Thread Steven Price
e panfrost_perfcnt.c, include head file can fix this. Nit: s/head/header/ > > Signed-off-by: Yi Wang Looks good, just a few minor style issues (below), with those fixed: Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_mmu.c | 5 +++-- > drivers

Re: [PATCH v6 10/10] arm64: Retrieve stolen time as paravirtualized guest

2019-10-21 Thread Steven Price
On 19/10/2019 21:28, Marc Zyngier wrote: > On Fri, 11 Oct 2019 13:59:30 +0100, > Steven Price wrote: >> >> Enable paravirtualization features when running under a hypervisor >> supporting the PV_TIME_ST hypercall. >> >> For each (v)CPU, we ask the hypervisor

Re: [PATCH v12 07/22] riscv: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
On 18/10/2019 16:57, Christoph Hellwig wrote: >> +return pud_present(pud) >> +&& (pud_val(pud) & (_PAGE_READ | _PAGE_WRITE | _PAGE_EXEC)); >> +} > > The operators always need to go before the line break, not after it > per linux coding style. There are a few more spots like this,

[PATCH v12 15/22] x86: mm: Point to struct seq_file from struct pg_state

2019-10-18 Thread Steven Price
-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 69 ++- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index ab67822fd2f4..4dc6f4df40af 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch

[PATCH v12 05/22] mips: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
not defined we can be confident that there are no leaf pages in existence and fall back on the generic implementation (added in a later patch) which returns 0. CC: Ralf Baechle CC: Paul Burton CC: James Hogan CC: linux-m...@vger.kernel.org Signed-off-by: Steven Price Acked-by: Paul Burton

[PATCH v12 13/22] mm: pagewalk: Add test_p?d callbacks

2019-10-18 Thread Steven Price
It is useful to be able to skip parts of the page table tree even when walking without VMAs. Add test_p?d callbacks similar to test_walk but which are called just before a table at that level is walked. If the callback returns non-zero then the entire table is skipped. Signed-off-by: Steven Price

[PATCH v12 07/22] riscv: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
or execute bit set on it. CC: Palmer Dabbelt CC: Albert Ou CC: linux-ri...@lists.infradead.org Reviewed-by: Alexandre Ghiti Acked-by: Paul Walmsley # for arch/riscv Signed-off-by: Steven Price --- arch/riscv/include/asm/pgtable-64.h | 7 +++ arch/riscv/include/asm/pgtable.h| 7

[PATCH v12 11/22] mm: pagewalk: Add p4d_entry() and pgd_entry()

2019-10-18 Thread Steven Price
ll entries, not just transparent huge pages. Signed-off-by: Steven Price --- include/linux/pagewalk.h | 19 +-- mm/pagewalk.c| 27 --- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/include/linux/pagewalk.h b/include/li

[PATCH v12 18/22] x86: mm: Convert ptdump_walk_pgd_level_core() to take an mm_struct

2019-10-18 Thread Steven Price
page tables. This fake_mm structure is initialised with the minimum necessary for the generic page walk code. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 36 --- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/arch/x86/mm

[PATCH v12 19/22] mm: Add generic ptdump

2019-10-18 Thread Steven Price
Add a generic version of page table dumping that architectures can opt-in to Signed-off-by: Steven Price --- include/linux/ptdump.h | 21 ++ mm/Kconfig.debug | 21 ++ mm/Makefile| 1 + mm/ptdump.c| 150 + 4 files

[PATCH v12 09/22] sparc: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
provided, so add macros to provide the p?d_leaf names required by the generic code. CC: "David S. Miller" CC: sparcli...@vger.kernel.org Signed-off-by: Steven Price --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/include/asm/pg

[PATCH v12 21/22] arm64: mm: Convert mm/dump.c to use walk_page_range()

2019-10-18 Thread Steven Price
Now walk_page_range() can walk kernel page tables, we can switch the arm64 ptdump code over to using it, simplifying the code. Signed-off-by: Steven Price --- arch/arm64/Kconfig | 1 + arch/arm64/Kconfig.debug | 19 + arch/arm64/include/asm/ptdump.h| 8

[PATCH v12 20/22] x86: mm: Convert dump_pagetables to use walk_page_range

2019-10-18 Thread Steven Price
callbacks which can decide to skip an entire tree of entries Signed-off-by: Steven Price --- arch/x86/Kconfig | 1 + arch/x86/Kconfig.debug| 20 +-- arch/x86/mm/Makefile | 4 +- arch/x86/mm/dump_pagetables.c | 289 +++--- 4 files changed, 66

[PATCH v12 14/22] mm: pagewalk: Add 'depth' parameter to pte_hole

2019-10-18 Thread Steven Price
that is reported is the actual level where the entry is missing (ignoring any folding that is in place), i.e. any levels where PTRS_PER_P?D is set to 1 are ignored. Note that depth starts at 0 for a PGD so that PUD/PMD/PTE retain their natural numbers as levels 2/3/4. Signed-off-by: Steven Price --- fs

[PATCH v12 12/22] mm: pagewalk: Allow walking without vma

2019-10-18 Thread Steven Price
r. Remove the requirement to have a vma except when trying to split huge pages. Signed-off-by: Steven Price --- mm/pagewalk.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/mm/pagewalk.c b/mm/pagewalk.c index fc4d98a3a5a0..4139e9163aee 10064

[PATCH v12 17/22] x86: mm: Convert ptdump_walk_pgd_level_debugfs() to take an mm_struct

2019-10-18 Thread Steven Price
To enable x86 to use the generic walk_page_range() function, the callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct. This means that ptdump_walk_pgd_level_core() is now always passed a valid pgd, so drop the support for pgd==NULL. Signed-off-by: Steven Price --- arch/x86

[PATCH v12 22/22] arm64: mm: Display non-present entries in ptdump

2019-10-18 Thread Steven Price
. Signed-off-by: Steven Price --- arch/arm64/mm/dump.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c index 9d9b740a86d2..3203dd8e6d0a 100644 --- a/arch/arm64/mm/dump.c +++ b/arch/arm64/mm/dump.c @@ -269,21

[PATCH v12 10/22] x86: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
add macros to provide the generic p?d_leaf() names for the generic code. Signed-off-by: Steven Price --- arch/x86/include/asm/pgtable.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 0bc530c4eb13..6986a451619e 100644

[PATCH v12 03/22] arm: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
. So simply provide the generic pmd_leaf() name. CC: Russell King CC: linux-arm-ker...@lists.infradead.org Signed-off-by: Steven Price --- arch/arm/include/asm/pgtable-2level.h | 1 + arch/arm/include/asm/pgtable-3level.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/include/asm

[PATCH v12 02/22] arc: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
() is needed. CC: Vineet Gupta CC: linux-snps-...@lists.infradead.org Acked-by: Vineet Gupta Signed-off-by: Steven Price --- arch/arc/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h index 7addd0301c51

[PATCH v12 00/22] Generic page walk and ptdump

2019-10-18 Thread Steven Price
/x86 to that instead. * Rebased to v5.3-rc1 Steven Price (22): mm: Add generic p?d_leaf() macros arc: mm: Add p?d_leaf() definitions arm: mm: Add p?d_leaf() definitions arm64: mm: Add p?d_leaf() definitions mips: mm: Add p?d_leaf() definitions powerpc: mm: Add p?d_leaf() definitions ris

[PATCH v12 01/22] mm: Add generic p?d_leaf() macros

2019-10-18 Thread Steven Price
the entry is a leaf (for example it may be a set of contiguous entries that only take 1 TLB slot). For the purpose of walking the page tables we don't need to know how it will be represented in the TLB, but we do need to know for sure if it is a leaf of the tree. Signed-off-by: Steven Price Ac

[PATCH v12 06/22] powerpc: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
-by: Steven Price --- arch/powerpc/include/asm/book3s/64/pgtable.h | 30 ++-- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index b01624e5c467..3dd7b6f5edd0 100644 --- a/arch

[PATCH v12 16/22] x86: mm+efi: Convert ptdump_walk_pgd_level() to take a mm_struct

2019-10-18 Thread Steven Price
Signed-off-by: Steven Price --- arch/x86/include/asm/pgtable.h | 2 +- arch/x86/mm/dump_pagetables.c | 4 ++-- arch/x86/platform/efi/efi_32.c | 2 +- arch/x86/platform/efi/efi_64.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/i

[PATCH v12 04/22] arm64: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
ing macros is implicitly relying on the page size/number of levels being the same as the kernel. So it is safe to reuse this for p?d_leaf() as it is an architectural restriction. CC: Catalin Marinas CC: Will Deacon Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 f

[PATCH v12 08/22] s390: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
implemented as static inline functions. Add a macro to provide the p?d_leaf names for the generic code to use. CC: Heiko Carstens CC: Vasily Gorbik CC: Christian Borntraeger CC: linux-s...@vger.kernel.org Signed-off-by: Steven Price --- arch/s390/include/asm/pgtable.h | 2 ++ 1 file changed, 2

Re: [PATCH v6 01/10] KVM: arm64: Document PV-time interface

2019-10-17 Thread Steven Price
On 15/10/2019 18:56, Mark Rutland wrote: > Hi Steven, > > On Fri, Oct 11, 2019 at 01:59:21PM +0100, Steven Price wrote: >> Introduce a paravirtualization interface for KVM/arm64 based on the >> "Arm Paravirtualized Time for Arm-Base Systems" specifi

Re: [PATCH v11 14/22] mm: pagewalk: Add 'depth' parameter to pte_hole

2019-10-09 Thread Steven Price
On 07/10/2019 19:11, Jason Gunthorpe wrote: > On Mon, Oct 07, 2019 at 05:20:30PM +0100, Steven Price wrote: >> On 07/10/2019 17:10, Jason Gunthorpe wrote: >>> On Mon, Oct 07, 2019 at 04:38:14PM +0100, Steven Price wrote: >>>> diff --git a/mm/hmm.c b/mm/hmm.c >>

Re: [PATCH v11 07/22] riscv: mm: Add p?d_leaf() definitions

2019-10-09 Thread Steven Price
On 08/10/2019 22:33, Paul Walmsley wrote: > On Mon, 7 Oct 2019, Steven Price wrote: > >> walk_page_range() is going to be allowed to walk page tables other than >> those of user space. For this it needs to know when it has reached a >> 'leaf' entry in the page tables. This

Re: [PATCH v11 14/22] mm: pagewalk: Add 'depth' parameter to pte_hole

2019-10-07 Thread Steven Price
On 07/10/2019 17:10, Jason Gunthorpe wrote: > On Mon, Oct 07, 2019 at 04:38:14PM +0100, Steven Price wrote: >> diff --git a/mm/hmm.c b/mm/hmm.c >> index 902f5fa6bf93..34fe904dd417 100644 >> +++ b/mm/hmm.c >> @@ -376,7 +376,7 @@ static void hmm_range_need_fault(co

[PATCH v11 15/22] x86: mm: Point to struct seq_file from struct pg_state

2019-10-07 Thread Steven Price
-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 69 ++- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index ab67822fd2f4..4dc6f4df40af 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch

[PATCH v11 14/22] mm: pagewalk: Add 'depth' parameter to pte_hole

2019-10-07 Thread Steven Price
that is reported is the actual level where the entry is missing (ignoring any folding that is in place), i.e. any levels where PTRS_PER_P?D is set to 1 are ignored. Note that depth starts at 0 for a PGD so that PUD/PMD/PTE retain their natural numbers as levels 2/3/4. Signed-off-by: Steven Price --- fs

[PATCH v11 17/22] x86: mm: Convert ptdump_walk_pgd_level_debugfs() to take an mm_struct

2019-10-07 Thread Steven Price
To enable x86 to use the generic walk_page_range() function, the callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct. This means that ptdump_walk_pgd_level_core() is now always passed a valid pgd, so drop the support for pgd==NULL. Signed-off-by: Steven Price --- arch/x86

[PATCH v11 18/22] x86: mm: Convert ptdump_walk_pgd_level_core() to take an mm_struct

2019-10-07 Thread Steven Price
page tables. This fake_mm structure is initialised with the minimum necessary for the generic page walk code. Signed-off-by: Steven Price --- arch/x86/mm/dump_pagetables.c | 36 --- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/arch/x86/mm

[PATCH v11 19/22] mm: Add generic ptdump

2019-10-07 Thread Steven Price
Add a generic version of page table dumping that architectures can opt-in to Signed-off-by: Steven Price --- include/linux/ptdump.h | 21 ++ mm/Kconfig.debug | 21 ++ mm/Makefile| 1 + mm/ptdump.c| 150 + 4 files

[PATCH v11 22/22] arm64: mm: Display non-present entries in ptdump

2019-10-07 Thread Steven Price
. Signed-off-by: Steven Price --- arch/arm64/mm/dump.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c index 9d9b740a86d2..3203dd8e6d0a 100644 --- a/arch/arm64/mm/dump.c +++ b/arch/arm64/mm/dump.c @@ -269,21

[PATCH v11 21/22] arm64: mm: Convert mm/dump.c to use walk_page_range()

2019-10-07 Thread Steven Price
Now walk_page_range() can walk kernel page tables, we can switch the arm64 ptdump code over to using it, simplifying the code. Signed-off-by: Steven Price --- arch/arm64/Kconfig | 1 + arch/arm64/Kconfig.debug | 19 + arch/arm64/include/asm/ptdump.h| 8

[PATCH v11 20/22] x86: mm: Convert dump_pagetables to use walk_page_range

2019-10-07 Thread Steven Price
callbacks which can decide to skip an entire tree of entries Signed-off-by: Steven Price --- arch/x86/Kconfig | 1 + arch/x86/Kconfig.debug| 20 +-- arch/x86/mm/Makefile | 4 +- arch/x86/mm/dump_pagetables.c | 289 +++--- 4 files changed, 66

[PATCH v11 10/22] x86: mm: Add p?d_leaf() definitions

2019-10-07 Thread Steven Price
add macros to provide the generic p?d_leaf() names for the generic code. Signed-off-by: Steven Price --- arch/x86/include/asm/pgtable.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 0bc530c4eb13..6986a451619e 100644

[PATCH v11 13/22] mm: pagewalk: Add test_p?d callbacks

2019-10-07 Thread Steven Price
It is useful to be able to skip parts of the page table tree even when walking without VMAs. Add test_p?d callbacks similar to test_walk but which are called just before a table at that level is walked. If the callback returns non-zero then the entire table is skipped. Signed-off-by: Steven Price

[PATCH v11 16/22] x86: mm+efi: Convert ptdump_walk_pgd_level() to take a mm_struct

2019-10-07 Thread Steven Price
Signed-off-by: Steven Price --- arch/x86/include/asm/pgtable.h | 2 +- arch/x86/mm/dump_pagetables.c | 4 ++-- arch/x86/platform/efi/efi_32.c | 2 +- arch/x86/platform/efi/efi_64.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/i

[PATCH v11 12/22] mm: pagewalk: Allow walking without vma

2019-10-07 Thread Steven Price
r. Remove the requirement to have a vma except when trying to split huge pages. Signed-off-by: Steven Price --- mm/pagewalk.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/mm/pagewalk.c b/mm/pagewalk.c index fc4d98a3a5a0..4139e9163aee 10064

[PATCH v11 11/22] mm: pagewalk: Add p4d_entry() and pgd_entry()

2019-10-07 Thread Steven Price
ll entries, not just transparent huge pages. Signed-off-by: Steven Price --- include/linux/pagewalk.h | 19 +-- mm/pagewalk.c| 27 --- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/include/linux/pagewalk.h b/include/li

[PATCH v11 09/22] sparc: mm: Add p?d_leaf() definitions

2019-10-07 Thread Steven Price
provided, so add macros to provide the p?d_leaf names required by the generic code. CC: "David S. Miller" CC: sparcli...@vger.kernel.org Signed-off-by: Steven Price --- arch/sparc/include/asm/pgtable_64.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/include/asm/pg

[PATCH v11 07/22] riscv: mm: Add p?d_leaf() definitions

2019-10-07 Thread Steven Price
or execute bit set on it. CC: Palmer Dabbelt CC: Albert Ou CC: linux-ri...@lists.infradead.org Signed-off-by: Steven Price --- arch/riscv/include/asm/pgtable-64.h | 7 +++ arch/riscv/include/asm/pgtable.h| 7 +++ 2 files changed, 14 insertions(+) diff --git a/arch/riscv/include/asm

[PATCH v11 08/22] s390: mm: Add p?d_leaf() definitions

2019-10-07 Thread Steven Price
implemented as static inline functions. Add a macro to provide the p?d_leaf names for the generic code to use. CC: Heiko Carstens CC: Vasily Gorbik CC: Christian Borntraeger CC: linux-s...@vger.kernel.org Signed-off-by: Steven Price --- arch/s390/include/asm/pgtable.h | 2 ++ 1 file changed, 2

[PATCH v11 01/22] mm: Add generic p?d_leaf() macros

2019-10-07 Thread Steven Price
the entry is a leaf (for example it may be a set of contiguous entries that only take 1 TLB slot). For the purpose of walking the page tables we don't need to know how it will be represented in the TLB, but we do need to know for sure if it is a leaf of the tree. Signed-off-by: Steven Price Ac

[PATCH v11 06/22] powerpc: mm: Add p?d_leaf() definitions

2019-10-07 Thread Steven Price
-by: Steven Price --- arch/powerpc/include/asm/book3s/64/pgtable.h | 30 ++-- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index b01624e5c467..3dd7b6f5edd0 100644 --- a/arch

[PATCH v11 03/22] arm: mm: Add p?d_leaf() definitions

2019-10-07 Thread Steven Price
. So simply provide the generic pmd_leaf() name. CC: Russell King CC: linux-arm-ker...@lists.infradead.org Signed-off-by: Steven Price --- arch/arm/include/asm/pgtable-2level.h | 1 + arch/arm/include/asm/pgtable-3level.h | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/include/asm

[PATCH v11 04/22] arm64: mm: Add p?d_leaf() definitions

2019-10-07 Thread Steven Price
ing macros is implicitly relying on the page size/number of levels being the same as the kernel. So it is safe to reuse this for p?d_leaf() as it is an architectural restriction. CC: Catalin Marinas CC: Will Deacon Signed-off-by: Steven Price --- arch/arm64/include/asm/pgtable.h | 2 ++ 1 f

[PATCH v11 05/22] mips: mm: Add p?d_leaf() definitions

2019-10-07 Thread Steven Price
not defined we can be confident that there are no leaf pages in existence and fall back on the generic implementation (added in a later patch) which returns 0. CC: Ralf Baechle CC: Paul Burton CC: James Hogan CC: linux-m...@vger.kernel.org Signed-off-by: Steven Price Acked-by: Paul Burton

[PATCH v11 02/22] arc: mm: Add p?d_leaf() definitions

2019-10-07 Thread Steven Price
() is needed. CC: Vineet Gupta CC: linux-snps-...@lists.infradead.org Signed-off-by: Steven Price --- arch/arc/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h index 7addd0301c51..5ec798e50836 100644 --- a/arch

[PATCH v11 00/22] Generic page walk and ptdump

2019-10-07 Thread Steven Price
migrating arm64/x86 to that instead. * Rebased to v5.3-rc1 Steven Price (22): mm: Add generic p?d_leaf() macros arc: mm: Add p?d_leaf() definitions arm: mm: Add p?d_leaf() definitions arm64: mm: Add p?d_leaf() definitions mips: mm: Add p?d_leaf() definitions powerpc: mm: Ad

Re: drm_sched with panfrost crash on T820

2019-10-07 Thread Steven Price
On 04/10/2019 17:33, Koenig, Christian wrote: > > > Am 04.10.2019 18:02 schrieb Steven Price : > On 04/10/2019 16:34, Koenig, Christian wrote: >> Am 04.10.19 um 17:27 schrieb Steven Price: >>> On 04/10/2019 16:03, Neil Armstrong wrote: >>>> On 04/

Re: [PATCH] arm64/mm: Poison initmem while freeing with free_reserved_area()

2019-10-04 Thread Steven Price
On 04/10/2019 11:48, Anshuman Khandual wrote: > > > On 10/04/2019 03:49 PM, Steven Price wrote: >> On 04/10/2019 05:23, Anshuman Khandual wrote: >>> Platform implementation for free_initmem() should poison the memory while >>> freeing it up. Hence pass across

Re: [PATCH] arm64/mm: Poison initmem while freeing with free_reserved_area()

2019-10-04 Thread Steven Price
logic seems to apply. However this change looks fine to me. Reviewed-by: Steven Price > --- > arch/arm64/mm/init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index 45c00a54909c..ea7d38011e83 100644 > ---

Re: [PATCH v5 01/10] KVM: arm64: Document PV-time interface

2019-10-04 Thread Steven Price
On 03/10/2019 13:19, Andrew Jones wrote: > On Wed, Oct 02, 2019 at 03:50:28PM +0100, Steven Price wrote: >> Introduce a paravirtualization interface for KVM/arm64 based on the >> "Arm Paravirtualized Time for Arm-Base Systems" specification DEN 0057A. >> >> Thi

[PATCH v5 04/10] KVM: Implement kvm_put_guest()

2019-10-02 Thread Steven Price
kvm_put_guest() is analogous to put_user() - it writes a single value to the guest physical address. The implementation is built upon put_user() and so it has the same single copy atomic properties. Signed-off-by: Steven Price --- include/linux/kvm_host.h | 22 ++ 1 file

[PATCH v5 02/10] KVM: arm/arm64: Factor out hypercall handling from PSCI code

2019-10-02 Thread Steven Price
this functionality into a separate hypercall handler file. Signed-off-by: Christoffer Dall [steven.pr...@arm.com: rebased] Signed-off-by: Steven Price --- arch/arm/kvm/Makefile| 2 +- arch/arm/kvm/handle_exit.c | 2 +- arch/arm64/kvm/Makefile | 1 + arch/arm64/kvm/handle_exit.c | 4

[PATCH v5 05/10] KVM: arm64: Support stolen time reporting via shared structure

2019-10-02 Thread Steven Price
structure maintained by the Linux scheduler code. We enable SCHEDSTATS when selecting KVM Kconfig to ensure this value is meaningful. Signed-off-by: Steven Price --- arch/arm/include/asm/kvm_host.h | 20 +++ arch/arm64/include/asm/kvm_host.h | 21 +++- arch/arm64/kvm/Kconfig

[PATCH v5 08/10] arm/arm64: Provide a wrapper for SMCCC 1.1 calls

2019-10-02 Thread Steven Price
the conduit used for the call. This allow us to remove some duplicated code and will be useful later when adding paravirtualized time hypervisor calls. Signed-off-by: Steven Price Acked-by: Will Deacon --- include/linux/arm-smccc.h | 44 +++ 1 file changed, 44

[PATCH v5 09/10] arm/arm64: Make use of the SMCCC 1.1 wrapper

2019-10-02 Thread Steven Price
Rather than directly choosing which function to use based on psci_ops.conduit, use the new arm_smccc_1_1 wrapper instead. In some cases we still need to do some operations based on the conduit, but the code duplication is removed. No functional change. Signed-off-by: Steven Price --- arch/arm

[PATCH v5 00/10] arm64: Stolen time support

2019-10-02 Thread Steven Price
ndling from PSCI code Steven Price (9): KVM: arm64: Document PV-time interface KVM: arm64: Implement PV_FEATURES call KVM: Implement kvm_put_guest() KVM: arm64: Support stolen time reporting via shared structure KVM: Allow kvm_device_ops to be const KVM: arm64: Provide VCPU attributes for

Re: [PATCH] drm: Don't free jobs in wait_event_interruptible()

2019-09-26 Thread Steven Price
On 26/09/2019 08:07, Koenig, Christian wrote: > Am 25.09.19 um 17:14 schrieb Steven Price: >> drm_sched_cleanup_jobs() attempts to free finished jobs, however because >> it is called as the condition of wait_event_interruptible() it must not >> sleep. Unfortunately some fr

Re: [PATCH] arm64: dts: mt8183: Add node for the Mali GPU

2019-09-23 Thread Steven Price
On 19/09/2019 13:32, Alyssa Rosenzweig wrote: >>> By the time MT8183 shows up in more concrete devices, it will, certainly >>> in kernel-space and likely in userspace as well. At present, the DDK can >>> be modified to run on top of the in-tree Mali drivers, i.e. "Bifrost on >>> mainline

Re: [PATCH v2 04/11] drm/shmem: drop VM_IO

2019-09-23 Thread Steven Price
On 17/09/2019 10:23, Gerd Hoffmann wrote: > VM_IO is wrong here, shmem uses normal ram not io memory. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Steven Price > --- > drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > &

Re: [PATCH] drm/panfrost: Fix regulator_get_optional() misuse

2019-09-09 Thread Steven Price
On 09/09/2019 16:41, Rob Herring wrote: > On Fri, Sep 6, 2019 at 4:23 PM Steven Price wrote: >> >> On 04/09/2019 13:30, Mark Brown wrote: >>> The panfrost driver requests a supply using regulator_get_optional() >>> but both the name of the supply and the usage pat

Re: [PATCH] drm/panfrost: Fix regulator_get_optional() misuse

2019-09-06 Thread Steven Price
(+CC Rob - I'm not sure why he was dropped) On 05/09/2019 17:34, Mark Brown wrote: > On Thu, Sep 05, 2019 at 02:02:38PM +0100, Steven Price wrote: >> On 05/09/2019 13:40, Mark Brown wrote: > >>> Is that safe? You can't rely on being able to change voltages even if &

Re: [PATCH v4 10/10] arm64: Retrieve stolen time as paravirtualized guest

2019-09-04 Thread Steven Price
On 03/09/2019 09:47, Andrew Jones wrote: > On Fri, Aug 30, 2019 at 09:42:55AM +0100, Steven Price wrote: >> Enable paravirtualization features when running under a hypervisor >> supporting the PV_TIME_ST hypercall. >> >> For each (v)CPU, we ask the hypervisor for the l

Re: [PATCH v4 01/10] KVM: arm64: Document PV-time interface

2019-08-30 Thread Steven Price
On 30/08/2019 15:47, Andrew Jones wrote: > On Fri, Aug 30, 2019 at 09:42:46AM +0100, Steven Price wrote: >> Introduce a paravirtualization interface for KVM/arm64 based on the >> "Arm Paravirtualized Time for Arm-Base Systems" specification DEN 0057A. >> >> Thi

Re: [PATCH v4 05/10] KVM: arm64: Support stolen time reporting via shared structure

2019-08-30 Thread Steven Price
On 30/08/2019 10:42, Christoffer Dall wrote: > On Fri, Aug 30, 2019 at 09:42:50AM +0100, Steven Price wrote: >> Implement the service call for configuring a shared structure between a >> VCPU and the hypervisor in which the hypervisor can write the time >> stolen from the

Re: [PATCH 1/3] mm: split out a new pagewalk.h header from mm.h

2019-08-29 Thread Steven Price
On 29/08/2019 10:05, Mike Rapoport wrote: > On Wed, Aug 28, 2019 at 04:19:53PM +0200, Christoph Hellwig wrote: [...] >> diff --git a/include/linux/pagewalk.h b/include/linux/pagewalk.h >> new file mode 100644 >> index ..df278a94086d >> --- /dev/null >> +++ b/include/linux/pagewalk.h >>

Re: cleanup the walk_page_range interface

2019-08-28 Thread Steven Price
On 28/08/2019 00:36, Jason Gunthorpe wrote: > On Tue, Aug 27, 2019 at 04:34:31PM -0700, Andrew Morton wrote: >> On Tue, 27 Aug 2019 01:34:13 + Jason Gunthorpe wrote: >> >>> On Sat, Aug 24, 2019 at 03:26:55PM -0700, Christoph Hellwig wrote: On Fri, Aug 23, 2019 at 01:43:12PM +, Jason

Re: cleanup the walk_page_range interface

2019-08-23 Thread Steven Price
ow. >> >> So what is the plan forward? Probably a little late for 5.3, >> so queue it up in -mm for 5.4 and deal with the conflicts in at least >> hmm? Queue it up in the hmm tree even if it doesn't 100% fit? > > Did we make a decision on this? Due to travel & LPC I'd like to > finalize the hmm tree next week. I was planning on rebasing my series on this and posting it for 5.4 - I hadn't actually realised this hasn't been picked up yet. I haven't had much time to look at this recently. FWIW you can add for the series: Acked-by: Steven Price Steve

Re: [PATCH v3 10/10] arm64: Retrieve stolen time as paravirtualized guest

2019-08-23 Thread Steven Price
On 23/08/2019 12:45, Zenghui Yu wrote: > Hi Steven, > > On 2019/8/21 23:36, Steven Price wrote: >> Enable paravirtualization features when running under a hypervisor >> supporting the PV_TIME_ST hypercall. >> >> For each (v)CPU, we ask the hypervisor for the l

Re: [PATCH v3 05/10] KVM: arm64: Support stolen time reporting via shared structure

2019-08-23 Thread Steven Price
On 23/08/2019 13:07, Zenghui Yu wrote: > Hi Steven, > > Only one comment, at the bottom. > > On 2019/8/21 23:36, Steven Price wrote: >> Implement the service call for configuring a shared structure between a >> VCPU and the hypervisor in which the hypervisor can wr

Re: [PATCH v3 04/10] KVM: Implement kvm_put_guest()

2019-08-23 Thread Steven Price
On 22/08/2019 17:24, Sean Christopherson wrote: > On Thu, Aug 22, 2019 at 04:46:10PM +0100, Steven Price wrote: >> On 22/08/2019 16:28, Sean Christopherson wrote: >>> On Wed, Aug 21, 2019 at 04:36:50PM +0100, Steven Price wrote: >>>> kvm_put_guest() is analogous to p

Re: [PATCH] drm/panfrost: Add missing check for pfdev->regulator

2019-08-23 Thread Steven Price
On 23/08/2019 02:52, Rob Herring wrote: > On Thu, Aug 22, 2019 at 4:32 AM Steven Price wrote: >> >> When modifying panfrost_devfreq_target() to support a device without a >> regulator defined I missed the check on the error path. Let's add it. >> >> Rep

Re: [PATCH v3 04/10] KVM: Implement kvm_put_guest()

2019-08-22 Thread Steven Price
On 22/08/2019 16:28, Sean Christopherson wrote: > On Wed, Aug 21, 2019 at 04:36:50PM +0100, Steven Price wrote: >> kvm_put_guest() is analogous to put_user() - it writes a single value to >> the guest physical address. The implementation is built upon put_user() >> and so i

Re: [PATCH v3 07/10] KVM: arm64: Provide a PV_TIME device to user space

2019-08-22 Thread Steven Price
On 22/08/2019 11:57, Jonathan Cameron wrote: > On Wed, 21 Aug 2019 16:36:53 +0100 > Steven Price wrote: > >> Allow user space to inform the KVM host where in the physical memory >> map the paravirtualized time structures should be located. >> >> A device i

[PATCH v3 07/10] KVM: arm64: Provide a PV_TIME device to user space

2019-08-21 Thread Steven Price
of memory available at this location. The address is given in terms of the physical address visible to the guest and must be page aligned. The guest will discover the address via a hypercall. Signed-off-by: Steven Price --- arch/arm/include/asm/kvm_host.h | 4 ++ arch/arm64/include/asm/kvm_host.h

<    1   2   3   4   5   6   7   >