On 19/06/25 1:12 AM, Lorenzo Stoakes wrote:
> The core kernel code is currently very inconsistent in its use of
> vm_flags_t vs. unsigned long. This prevents us from changing the type of
> vm_flags_t in the future and is simply not correct, so correct this.
>
> While this results in rather a lo
> - unsigned long end, unsigned long vm_flags);
> + unsigned long end, vm_flags_t vm_flags);
>
> bool current_is_ksgxd(void);
> void sgx_encl_release(struct kref *ref);
> diff --git a/tools/testing/vma/vma_internal.h
> b/tools/testing/vma/vma_internal.h
> index 7919d7141537..b9eb8c889f96 100644
> --- a/tools/testing/vma/vma_internal.h
> +++ b/tools/testing/vma/vma_internal.h
> @@ -1220,7 +1220,7 @@ static inline void vma_set_page_prot(struct
> vm_area_struct *vma)
> WRITE_ONCE(vma->vm_page_prot, vm_page_prot);
> }
>
> -static inline bool arch_validate_flags(unsigned long)
> +static inline bool arch_validate_flags(vm_flags_t)
> {
> return true;
> }
Reviewed-by: Anshuman Khandual
e 100644
> --- a/tools/testing/vma/vma_internal.h
> +++ b/tools/testing/vma/vma_internal.h
> @@ -581,7 +581,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot,
> pgprot_t newprot)
> return __pgprot(pgprot_val(oldprot) | pgprot_val(newprot));
> }
>
> -static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
> +static inline pgprot_t vm_get_page_prot(vm_flags_t vm_flags)
> {
> return __pgprot(vm_flags);
> }
LGTM
Reviewed-by: Anshuman Khandual
On 19/06/25 1:12 AM, Lorenzo Stoakes wrote:
> The VMA flags field vma->vm_flags is of type vm_flags_t. Right now this is
> exactly equivalent to unsigned long, but it should not be assumed to be.
>
> Much code that references vma->vm_flags already correctly uses vm_flags_t,
> but a fairly large ch
...@vger.kernel.org
Cc: linux-ri...@lists.infradead.org
Cc: linux...@kvack.org
Signed-off-by: Anshuman Khandual
---
arch/x86/mm/dump_pagetables.c | 32 +++-
include/linux/ptdump.h| 6 +-
mm/ptdump.c | 20 ++--
3 files changed, 46
values etc
which are used at all page table levels.
Cc: Catalin Marinas
Cc: Will Deacon
Cc: Ard Biesheuvel
Cc: Mark Rutland
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Suggested-by: Ryan Roberts
Signed-off-by: Anshuman Khandual
---
arch
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@kvack.org
Signed-off-by: Anshuman Khandual
---
arch/arm64/include/asm/ptdump.h | 16 +--
arch/arm64/mm
@lists.ozlabs.org
Cc: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@kvack.org
Anshuman Khandual (3):
mm/ptdump: Split note_page() into level specific callbacks
mm/ptdump: Split effective_prot() into level specific callbacks
arm64/mm: Define ptdesc_t
arch/arm64
On 3/31/25 14:29, Alexander Gordeev wrote:
> On Mon, Mar 17, 2025 at 11:48:17AM +0530, Anshuman Khandual wrote:
>
> Hi Anshuman,
>
> ...
>> --- a/include/linux/ptdump.h
>> +++ b/include/linux/ptdump.h
>> @@ -11,9 +11,12 @@ struct ptdump_range {
&g
On 3/17/25 11:48, Anshuman Khandual wrote:
> Last argument passed down in note_page() is u64 assuming pxd_val() returned
> value (all page table levels) is 64 bit - which might not be the case going
> ahead when D128 page tables is enabled on arm64 platform. Besides pxd_val()
> is v
On 3/17/25 14:58, Ryan Roberts wrote:
> On 17/03/2025 06:18, Anshuman Khandual wrote:
>> Page table entry's value, mask and protection are represented with pteval_t
>> data type format not u64 that has been assumed while dumping the page table
>> entries. Replace a
r
Cc: Andrew Morton
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@kvack.org
Anshuman Khandual (2):
mm/ptdump: Split note_page() into level specific call
x-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
---
arch/arm64/include/asm/ptdump.h | 8
arch/arm64/mm/ptdump.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/include/asm/ptdump.h b/arch/arm64/in
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@kvack.org
Signed-off-by: Anshuman Khandual
---
arch/arm64/include/asm/ptdump.h | 16 +--
arch/arm64/mm
...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@kvack.org
Signed-off-by: Anshuman Khandual
---
arch/arm64/include/asm/ptdump.h | 10
arch/arm64/mm/ptdump.c | 37 ++--
arch/powerpc/mm/ptdump/ptdump.c | 37 ++--
arch
x-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
---
arch/arm64/include/asm/ptdump.h | 12 ++--
arch/arm64/mm/ptdump.c | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/include/asm/ptdump.h b/arch/
r
Cc: Ingo Molnar
Cc: Andrew Morton
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@kvack.org
Anshuman Khandual (2):
mm/ptdump: Split note_page() into
On 2/27/25 01:23, Catalin Marinas wrote:
> On Wed, Feb 26, 2025 at 05:54:04PM +0530, Anshuman Khandual wrote:
>> diff --git a/arch/arm64/include/asm/ptdump.h
>> b/arch/arm64/include/asm/ptdump.h
>> index 6cf4aae05219..b2931d1ae0fb 100644
>> --- a/arch/arm64/include
k.org
Signed-off-by: Anshuman Khandual
---
arch/arm64/Kconfig | 2 +-
arch/arm64/include/asm/ptdump.h | 4 ++--
arch/arm64/kvm/Kconfig | 4 ++--
arch/arm64/mm/Makefile | 2 +-
arch/powerpc/Kconfig| 2 +-
arch/powerpc/mm/Makefile| 2 +-
arch/
Price
Signed-off-by: Anshuman Khandual
---
Documentation/arch/arm64/ptdump.rst | 2 --
1 file changed, 2 deletions(-)
diff --git a/Documentation/arch/arm64/ptdump.rst
b/Documentation/arch/arm64/ptdump.rst
index 5dcfc5d7cddf..51eb902ba41a 100644
--- a/Documentation/arch/arm64/ptdump.rst
+++ b
...@vger.kernel.org
Reviewed-by: Steven Price
Signed-off-by: Anshuman Khandual
---
mm/Kconfig.debug | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
index 41a58536531d..a51a1149909a 100644
--- a/mm/Kconfig.debug
+++ b/mm/Kconfig.debug
@@ -186,6 +186,7 @@ config
...@vger.kernel.org
Fixes: e084728393a5 ("powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP")
Suggested-by: Christophe Leroy
Signed-off-by: Anshuman Khandual
---
arch/powerpc/configs/mpc885_ads_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/power
x-ker...@vger.kernel.org
Reviewed-by: Steven Price
Signed-off-by: Anshuman Khandual
---
kernel/configs/debug.config | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/configs/debug.config b/kernel/configs/debug.config
index 20552f163930..8aafd050b754 100644
--- a/kernel/configs/debug.c
el.org/all/20250213040934.3245750-1-anshuman.khand...@arm.com/
Anshuman Khandual (5):
configs: Drop GENERIC_PTDUMP from debug.config
arch/powerpc: Drop GENERIC_PTDUMP from mpc885_ads_defconfig
docs: arm64: Drop PTDUMP config options from ptdump.rst
mm: Make DEBUG_WX depdendent on GENERIC_PTDUMP
On 2/24/25 17:31, Christophe Leroy wrote:
>
>
> Le 17/02/2025 à 05:22, Anshuman Khandual a écrit :
>> Platforms subscribe into generic ptdump implementation via GENERIC_PTDUMP.
>> But generic ptdump gets enabled via PTDUMP_CORE. These configs combination
>> is c
On 2/24/25 17:34, Christophe Leroy wrote:
>
>
> Le 17/02/2025 à 05:22, Anshuman Khandual a écrit :
>> GENERIC_PTDUMP gets selected on powerpc explicitly and hence can be dropped
>> off from mpc885_ads_defconfig.
>>
>> Cc: Madhavan Srinivasan
>> Cc: M
s
Co-developed-by: Anshuman Khandual
Signed-off-by: Anshuman Khandual
---
This patch applies on v6.14-rc3 and has been tested on arm64 platform.
Although it builds on multiple platforms here.
arch/arc/mm/ioremap.c | 6 ++
arch/arm64/include/asm/io.h | 6 +++---
arch/
k.org
Signed-off-by: Anshuman Khandual
---
arch/arm64/Kconfig | 2 +-
arch/arm64/include/asm/ptdump.h | 4 ++--
arch/arm64/kvm/Kconfig | 4 ++--
arch/arm64/mm/Makefile | 2 +-
arch/powerpc/Kconfig| 2 +-
arch/powerpc/mm/Makefile| 2 +-
arch/
...@vger.kernel.org
Reviewed-by: Steven Price
Signed-off-by: Anshuman Khandual
---
mm/Kconfig.debug | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug
index 41a58536531d..a51a1149909a 100644
--- a/mm/Kconfig.debug
+++ b/mm/Kconfig.debug
@@ -186,6 +186,7 @@ config
Price
Signed-off-by: Anshuman Khandual
---
Documentation/arch/arm64/ptdump.rst | 2 --
1 file changed, 2 deletions(-)
diff --git a/Documentation/arch/arm64/ptdump.rst
b/Documentation/arch/arm64/ptdump.rst
index 5dcfc5d7cddf..51eb902ba41a 100644
--- a/Documentation/arch/arm64/ptdump.rst
+++ b
GENERIC_PTDUMP gets selected on powerpc explicitly and hence can be dropped
off from mpc885_ads_defconfig.
Cc: Madhavan Srinivasan
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
x-ker...@vger.kernel.org
Reviewed-by: Steven Price
Signed-off-by: Anshuman Khandual
---
kernel/configs/debug.config | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/configs/debug.config b/kernel/configs/debug.config
index 20552f163930..8aafd050b754 100644
--- a/kernel/configs/debug.c
ptdump.rst
Changes in V1:
https://lore.kernel.org/all/20250213040934.3245750-1-anshuman.khand...@arm.com/
Anshuman Khandual (5):
configs: Drop GENERIC_PTDUMP from debug.config
arch/powerpc: Drop GENERIC_PTDUMP from mpc885_ads_defconfig
docs: arm64: Drop PTDUMP config options from ptdump.rst
On 2/13/25 17:19, Christophe Leroy wrote:
>
>
> Le 13/02/2025 à 12:23, Steven Price a écrit :
>> On 13/02/2025 04:09, Anshuman Khandual wrote:
>>> Platforms subscribe into generic ptdump implementation via GENERIC_PTDUMP.
>>> But generic ptdump gets enabl
On 2/13/25 16:53, Steven Price wrote:
> On 13/02/2025 04:09, Anshuman Khandual wrote:
>> Platforms subscribe into generic ptdump implementation via GENERIC_PTDUMP.
>> But generic ptdump gets enabled via PTDUMP_CORE. These configs combination
>> is confusing as they sound
On 2/13/25 13:08, Christophe Leroy wrote:
>
>
> Le 13/02/2025 à 05:09, Anshuman Khandual a écrit :
>> Platforms subscribe into generic ptdump implementation via GENERIC_PTDUMP.
>> But generic ptdump gets enabled via PTDUMP_CORE. These configs combination
>> is c
k.org
Signed-off-by: Anshuman Khandual
---
Documentation/arch/arm64/ptdump.rst | 4 ++--
arch/arm64/Kconfig| 2 +-
arch/arm64/include/asm/ptdump.h | 4 ++--
arch/arm64/kvm/Kconfig| 4 ++--
arch/arm64/mm/Makefile
: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@kvack.org
Cc: linux-ker...@vger.kernel.org
Anshuman Khandual (4):
configs: Drop GENERIC_PTDUMP from debug.config
mm: Make DEBUG_WX depdendent on GENERIC_PTDUMP
mm: Make GENERIC_PTDUMP dependent on MMU
mm: Rename
On 2/5/25 15:31, Mark Rutland wrote:
> On Wed, Feb 05, 2025 at 10:30:39AM +0530, Anshuman Khandual wrote:
>> GENERIC_PTDUMP does not guard any code but instead just used for platform's
>> subscription into core ptdump defined under PTDUMP_CORE, which is selected.
>
>
: kvm...@lists.linux.dev
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@kvack.org
Signed-off-by: Anshuman Khandual
---
This patch applies on v6.14-rc1
Changes in V2:
- Keep arch/powerpc/Kconfig alphabetically sorted per Christophe
Ch
On 12/17/24 13:17, Christophe Leroy wrote:
>
>
> Le 17/12/2024 à 04:48, Anshuman Khandual a écrit :
>> GENERIC_PTDUMP does not guard any code but instead just used for platform's
>> subscription into core ptdump defined under PTDUMP_CORE, which is selected.
>
: kvm...@lists.linux.dev
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@kvack.org
Signed-off-by: Anshuman Khandual
---
This patch applies on v6.13-rc3 and has been tested on arm64, although it
also clears build tests on impacted plat
return -EINVAL;
> + }
> +
> /* ensure minimal alignment required by mm core */
> if (!IS_ALIGNED(base | size, CMA_MIN_ALIGNMENT_BYTES))
> return -EINVAL;
> --
> 2.46.0
>
>
LGTM, hopefully this comment regarding CMA_MIN_ALIGNMENT_BYTES alignment
requi
On 5/3/24 18:31, Joey Gouly wrote:
> Implement the PKEYS interface, using the Permission Overlay Extension.
This commit message should contain some more details here considering
the amount of code change proposed in this patch.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Dea
On 5/3/24 18:31, Joey Gouly wrote:
> Add PKEY support to signals, by saving and restoring POR_EL0 from the
> stackframe.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Deacon
> Reviewed-by: Mark Brown
> Acked-by: Szabolcs Nagy
Review
On 7/9/24 18:37, Kevin Brodsky wrote:
> On 03/05/2024 15:01, Joey Gouly wrote:
>> @@ -267,6 +294,28 @@ static inline unsigned long mm_untag_mask(struct
>> mm_struct *mm)
>> return -1UL >> 8;
>> }
>>
>> +/*
>> + * We only want to enforce protection keys on the current process
>> + * beca
On 5/3/24 18:31, Joey Gouly wrote:
> Now that support for POE and Protection Keys has been implemented, add a
> config to allow users to actually enable it.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Deacon
Reviewed-by: Anshuman Khandual
> ---
On 5/3/24 18:31, Joey Gouly wrote:
> Now that PKEYs support has been implemented, enable it for CPUs that
> support S1POE.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Deacon
> Acked-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
> ---
&
On 5/3/24 18:31, Joey Gouly wrote:
> Set the EL0/userspace indirection encodings to be the overlay enabled
> variants of the permissions.
Could you please explain the rationale for this ? Should POE variants for
pte permissions be used (when available) instead of permission indirection
ones.
>
On 5/3/24 18:31, Joey Gouly wrote:
> Add a regset for POE containing POR_EL0.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Deacon
> Reviewed-by: Mark Brown
> Reviewed-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
> ---
> arch
On 5/3/24 18:31, Joey Gouly wrote:
> We do not want take POE into account when clearing the MTE tags.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Deacon
Reviewed-by: Anshuman Khandual
> ---
> arch/arm64/include/asm/pgtable.h | 11 +++
A minor nit. The fault is related to POE in terms of the HW rather than PKEY
which it is abstracted out in core MM. Hence it might be better to describe
the fault as POE one rather than PKEY related.
arm64/mm: Handle POE faults
On 5/3/24 18:31, Joey Gouly wrote:
> If a memory fault occurs that is
On 5/3/24 18:31, Joey Gouly wrote:
> When a PTE is modified, the POIndex must be masked off so that it can be
> modified.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Deacon
> Reviewed-by: Catalin Marinas
Reviewed-by: Anshuman Khandual
> ---
&
On 5/3/24 18:31, Joey Gouly wrote:
> Modify arch_calc_vm_prot_bits() and vm_get_page_prot() such that the pkey
> value is set in the vm_flags and then into the pgprot value.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Deacon
> ---
> arch/arm64/include/asm/mman.h | 8 +
On 5/3/24 18:31, Joey Gouly wrote:
> The 3-bit POIndex is stored in the PTE at bits 60..62.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Deacon
> ---
> arch/arm64/include/asm/pgtable-hwdef.h | 10 ++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm64/incl
On 5/3/24 18:31, Joey Gouly wrote:
> To make it easier to share the generic PKEYs flags, move the MTE flag.
The change looks good but too less details about it here. Please do consider
adding some more description, on how moving the VM flags down the arch range
helps going forward.
>
> Signed-
m64/kernel/cpuinfo.c
> index 09eeaa24d456..b9db812082b3 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -143,6 +143,7 @@ static const char *const hwcap_str[] = {
> [KERNEL_HWCAP_SME_SF8FMA] = "smesf8fma",
> [KERNEL_HWCAP_SME_SF8DP4] = "smesf8dp4",
> [KERNEL_HWCAP_SME_SF8DP2] = "smesf8dp2",
> + [KERNEL_HWCAP_POE] = "poe",
> };
>
> #ifdef CONFIG_COMPAT
This LGTM but as Joey mentioned earlier, what happens when another new
feature gets added later which needs to be exposed to userspace, add
HWCAP3 ?
Reviewed-by: Anshuman Khandual
if (!ret)
> tmp = read_sysreg_par();
> else
> tmp = SYS_PAR_EL1_F; /* back to the guest */
Since the idea is to get the IPA, using OP_AT_S1E1A instead, makes sense
when POE is enabled.
Reviewed-by: Anshuman Khandual
On 5/3/24 18:31, Joey Gouly wrote:
> To allow using newer instructions that current assemblers don't know about,
> replace the `at` instruction with the underlying SYS instruction.
>
> Signed-off-by: Joey Gouly
> Cc: Marc Zyngier
> Cc: Oliver Upton
> Cc: Catalin Marinas
> Cc: Will Deacon
>
On 5/3/24 18:31, Joey Gouly wrote:
> POR_EL0 is a register that can be modified by userspace directly,
> so it must be context switched.
>
> Signed-off-by: Joey Gouly
> Cc: Catalin Marinas
> Cc: Will Deacon
> ---
> arch/arm64/include/asm/cpufeature.h | 6 ++
> arch/arm64/include/asm/pr
+#if CONFIG_ARCH_PKEY_BITS > 4
> # define VM_PKEY_BIT4 VM_HIGH_ARCH_4
> #else
> # define VM_PKEY_BIT4 0
Agree with Dave that this is not very clean but does the job i.e getting
rid of the platform #ifdef which in itself is an improvement.
Reviewed-by: Anshuman Khandual
> @@ -45,6 +45,7 @@ HAS_MOPS
> HAS_NESTED_VIRT
> HAS_PAN
> HAS_S1PIE
> +HAS_S1POE
> HAS_RAS_EXTN
> HAS_RNG
> HAS_SB
Reviewed-by: Anshuman Khandual
ng of POR_EL0 */
> + orr x0, x0, #HFGxTR_EL2_nPOR_EL0
> +
> .Lset_fgt_\@:
> msr_s SYS_HFGRTR_EL2, x0
> msr_s SYS_HFGWTR_EL2, x0
Reviewed-by: Anshuman Khandual
m-ker...@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux...@kvack.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
---
This applies on v6.8-rc3
arch/arm64/mm/hugetlbpage.c | 7 ---
arch/powerpc/mm/hugetlbpage.c | 4 +---
mm/hugetlb.c
On 1/29/24 11:56, Aneesh Kumar K.V wrote:
> On 1/29/24 11:52 AM, Anshuman Khandual wrote:
>>
>>
>> On 1/29/24 11:30, Aneesh Kumar K.V (IBM) wrote:
>>> Architectures like powerpc add debug checks to ensure we find only devmap
>>> PUD pte entries
On 1/29/24 11:30, Aneesh Kumar K.V (IBM) wrote:
> Architectures like powerpc add debug checks to ensure we find only devmap
> PUD pte entries. These debug checks are only done with CONFIG_DEBUG_VM.
> This patch marks the ptes used for PUD advanced test devmap pte entries
> so that we don't hit o
Hello Daniel,
This test just ensures that PFN is preserved during pte <--> swap pte
transformations
, and the warning here seems to have been caused by powerpc platform specific
helpers
and/or its pte_t representation. Adding powerpc folks and platform mailing list
here.
- Anshuman
On 11/4/23
On 7/18/23 13:26, Alistair Popple wrote:
> The main change is to move secondary TLB invalidation mmu notifier
> callbacks into the architecture specific TLB flushing functions. This
> makes secondary TLB invalidation mostly match CPU invalidation while
> still allowing efficient range based inva
On 3/1/23 12:26, Christophe Leroy wrote:
> Hi,
>
> Le 03/02/2022 à 04:57, Anshuman Khandual a écrit :
>> Each call into pte_mkhuge() is invariably followed by arch_make_huge_pte().
>> Instead arch_make_huge_pte() can accommodate pte_mkhuge() at the beginning.
>> Th
On 11/30/22 07:53, Yicong Yang wrote:
> On 2022/11/30 7:23, Andrew Morton wrote:
>> On Thu, 17 Nov 2022 16:26:47 +0800 Yicong Yang wrote:
>>
>>> From: Anshuman Khandual
>>>
>>> The entire scheme of deferred TLB flush in reclaim path rests on the
>&
HED_TLB.
>
> This patch extends arch_tlbbatch_add_mm() to take an address of the
> target page to support the feature on arm64. Also rename it to
> arch_tlbbatch_add_pending() to better match its function since we
> don't need to handle the mm on arm64 and add_mm is not proper.
>
On 11/16/22 07:26, Nadav Amit wrote:
> On Nov 15, 2022, at 5:50 PM, Yicong Yang wrote:
>
>> !! External Email
>>
>> On 2022/11/16 7:38, Nadav Amit wrote:
>>> On Nov 14, 2022, at 7:14 PM, Yicong Yang wrote:
>>>
diff --git a/arch/x86/include/asm/tlbflush.h
b/arch/x86/include/asm/tlbf
On 11/14/22 14:16, Yicong Yang wrote:
> On 2022/11/14 11:29, Anshuman Khandual wrote:
>>
>> On 10/28/22 13:42, Yicong Yang wrote:
>>> +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm)
>>> +{
>>> + /*
>>> +* TLB batche
On 10/28/22 13:42, Yicong Yang wrote:
> +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm)
> +{
> + /*
> + * TLB batched flush is proved to be beneficial for systems with large
> + * number of CPUs, especially system with more than 8 CPUs. TLB shutdown
> + *
On 10/28/22 03:25, Barry Song wrote:
> On Fri, Oct 28, 2022 at 3:19 AM Punit Agrawal
> wrote:
>>
>> [ Apologies for chiming in late in the conversation ]
>>
>> Anshuman Khandual writes:
>>
>>> On 9/28/22 05:53, Barry Song wrote:
>>>
On 10/28/22 03:37, Barry Song wrote:
> On Thu, Oct 27, 2022 at 11:42 PM Anshuman Khandual
> wrote:
>>
>>
>>
>> On 9/28/22 05:53, Barry Song wrote:
>>> On Tue, Sep 27, 2022 at 10:15 PM Yicong Yang wrote:
>>>>
>>>> On 2022/9/27 14:
On 9/28/22 05:53, Barry Song wrote:
> On Tue, Sep 27, 2022 at 10:15 PM Yicong Yang wrote:
>>
>> On 2022/9/27 14:16, Anshuman Khandual wrote:
>>> [...]
>>>
>>> On 9/21/22 14:13, Yicong Yang wrote:
>>>> +static inline bool arch_tlbbatch_shoul
[...]
On 9/21/22 14:13, Yicong Yang wrote:
> +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm)
> +{
> + /* for small systems with small number of CPUs, TLB shootdown is cheap
> */
> + if (num_online_cpus() <= 4)
It would be great to have some more inputs from others, w
On 9/21/22 12:47, Nadav Amit wrote:
> On Sep 20, 2022, at 11:53 PM, Anshuman Khandual
> wrote:
>
>> ⚠ External Email
>>
>> On 8/22/22 13:51, Yicong Yang wrote:
>>> +static inline void arch_tlbbatch_add_mm(struct a
On 8/22/22 13:51, Yicong Yang wrote:
> +static inline void arch_tlbbatch_add_mm(struct arch_tlbflush_unmap_batch
> *batch,
> + struct mm_struct *mm,
> + unsigned long uaddr)
> +{
> + __flush_tlb_page_nosync(mm, uaddr);
>
On 9/21/22 07:21, Barry Song wrote:
> On Wed, Sep 21, 2022 at 1:50 PM Barry Song <21cn...@gmail.com> wrote:
>>
>> On Tue, Sep 20, 2022 at 8:45 PM Anshuman Khandual
>> wrote:
>>>
>>>
>>>
>>> On 9/20/22 09:09, Barry Song wrote:
>
On 9/20/22 09:09, Barry Song wrote:
> On Tue, Sep 20, 2022 at 3:00 PM Anshuman Khandual
> wrote:
>>
>>
>> On 8/22/22 13:51, Yicong Yang wrote:
>>> +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm)
>>> +{
>>> + return
On 8/22/22 13:51, Yicong Yang wrote:
> +static inline bool arch_tlbbatch_should_defer(struct mm_struct *mm)
> +{
> + return true;
> +}
This needs to be conditional on systems, where there will be performance
improvements, and should not just be enabled all the time on all systems.
num_online
On 9/15/22 12:12, Barry Song wrote:
> On Thu, Sep 15, 2022 at 6:07 PM Anshuman Khandual
> wrote:
>>
>>
>>
>> On 9/9/22 11:05, Barry Song wrote:
>>> On Fri, Sep 9, 2022 at 5:24 PM Anshuman Khandual
>>> wrote:
>>>>
>>>&g
On 9/15/22 20:01, Nadav Amit wrote:
>
>
>> On Sep 14, 2022, at 11:42 PM, Barry Song <21cn...@gmail.com> wrote:
>>
>>>
>>> The very idea behind TLB deferral is the opportunity it (might) provide
>>> to accumulate address ranges and cpu masks so that individual TLB flush
>>> can be replaced with
On 9/9/22 11:05, Barry Song wrote:
> On Fri, Sep 9, 2022 at 5:24 PM Anshuman Khandual
> wrote:
>>
>>
>>
>> On 8/22/22 13:51, Yicong Yang wrote:
>>> From: Barry Song
>>>
>>> on x86, batched and deferred tlb shootdown has lead to 90%
&g
On 8/22/22 13:51, Yicong Yang wrote:
> From: Barry Song
>
> on x86, batched and deferred tlb shootdown has lead to 90%
> performance increase on tlb shootdown. on arm64, HW can do
> tlb shootdown without software IPI. But sync tlbi is still
> quite expensive.
>
> Even running a simplest progr
On 8/22/22 13:51, Yicong Yang wrote:
> From: Barry Song
>
> Add uaddr to tlbbatch APIs so that platforms like ARM64 are
I guess 'uaddr' refers to a virtual address from the process address
space itself ? Please be more specific.
> able to apply this on their specific hardware features. For
>
On 8/22/22 13:51, Yicong Yang wrote:
> From: Barry Song
>
> This reverts commit 6bfef171d0d74cb050112e0e49feb20bfddf7f42.
>
> I was wrong. Though ARM64 has hardware TLB flush, but it is not free
> and it is still expensive.
> We still have a good chance to enable batched and deferred TLB flus
On 8/22/22 13:51, Yicong Yang wrote:
> From: Anshuman Khandual
>
> The entire scheme of deferred TLB flush in reclaim path rests on the
> fact that the cost to refill TLB entries is less than flushing out
> individual entries by sending IPI to remote CPUs. But architecture
>
On 7/12/22 01:44, Andrew Morton wrote:
> On Mon, 11 Jul 2022 12:35:34 +0530 Anshuman Khandual
> wrote:
>
>> This series drops __SXXX/__PXXX macros from across platforms in the tree.
>
> I've updated mm-unstable to this version, thanks. I skipped the added-to-mm
: Andrew Morton
Cc: linux...@kvack.org
Cc: linux-ker...@vger.kernel.org
Reviewed-by: Geert Uytterhoeven
Reviewed-by: Christoph Hellwig
Reviewed-by: Christophe Leroy
Acked-by: Geert Uytterhoeven
Signed-off-by: Anshuman Khandual
---
arch/alpha/Kconfig | 1 -
arch/arc/Kconfig| 1
: Yoshinori Sato
Cc: Rich Felker
Cc: linux...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
---
arch/sh/Kconfig | 1 +
arch/sh/include/asm/pgtable.h | 17 -
arch/sh/mm/mmap.c | 20
3 files changed, 21
Dike
Cc: linux...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
---
arch/um/Kconfig | 1 +
arch/um/include/asm/pgtable.h | 17 -
arch/um/kernel/mem.c | 20
arch/x86/um/mem_32.c | 2 +-
4
King
Cc: Arnd Bergmann
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
---
arch/arm/Kconfig | 1 +
arch/arm/include/asm/pgtable.h | 17 -
arch/arm/lib/uaccess_with_memcpy.c | 2 +-
arch/arm/mm
...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
---
arch/ia64/Kconfig | 1 +
arch/ia64/include/asm/pgtable.h | 18 --
arch/ia64/mm/init.c | 28 +++-
3 files changed, 28 insertions(+), 19
Gupta
Cc: linux-snps-...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
---
arch/arc/Kconfig | 1 +
arch/arc/include/asm/pgtable-bits-arcv2.h | 18 --
arch/arc/mm/mmap.c| 20
Carstens
Cc: Vasily Gorbik
Cc: linux-s...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Anshuman Khandual
---
arch/s390/Kconfig | 1 +
arch/s390/include/asm/pgtable.h | 17 -
arch/s390/mm/mmap.c | 20
3 files changed
Bogendoerfer
Cc: linux-m...@lists.linux-m68k.org
Cc: linux-ker...@vger.kernel.org
Reviewed-by: Geert Uytterhoeven
Acked-by: Geert Uytterhoeven
Signed-off-by: Anshuman Khandual
---
arch/m68k/Kconfig| 1 +
arch/m68k/include/asm/mcf_pgtable.h | 59
Uytterhoeven
Cc: linux-c...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Acked-by: Guo Ren
Signed-off-by: Anshuman Khandual
---
arch/csky/Kconfig | 1 +
arch/csky/include/asm/pgtable.h | 18 --
arch/csky/mm/init.c | 20
3 files
1 - 100 of 1319 matches
Mail list logo