Re: [PATCH 2/2] radix/kfence: support late __kfence_pool allocation

2024-05-01 Thread IBM
Hari Bathini writes: > With commit b33f778bba5ef ("kfence: alloc kfence_pool after system > startup"), KFENCE pool can be allocated after system startup via the > page allocator. This can lead to problems as all memory is not mapped > at page granularity anymore with CONFIG_KFENCE. Address this

Re: [PATCH 1/2] radix/kfence: map __kfence_pool at page granularity

2024-04-30 Thread IBM
Hari Bathini writes: > When KFENCE is enabled, total system memory is mapped at page level > granularity. But in radix MMU mode, ~3GB additional memory is needed > to map 100GB of system memory at page level granularity when compared > to using 2MB direct mapping. This is not desired considering

[PATCH] powerpc/ptdump: Fix walk_vmemmap to also print first vmemmap entry

2024-04-17 Thread Ritesh Harjani (IBM)
by: Ritesh Harjani (IBM) --- arch/powerpc/mm/ptdump/hashpagetable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/ptdump/hashpagetable.c b/arch/powerpc/mm/ptdump/hashpagetable.c index 9a601587836b..a6baa6166d94 100644 --- a/arch/powerpc/mm/ptdump/hashpagetab

[PATCH 3/3] powerpc/mm: Update the memory limit based on direct mapping restrictions

2024-04-03 Thread Aneesh Kumar K.V (IBM)
the new aligned value of the memory limit. Signed-off-by: Aneesh Kumar K.V (IBM) --- arch/powerpc/kernel/prom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 7451bedad1f4..b8f764453eaa 100644 --- a/arch

[PATCH 2/3] powerpc/fadump: Don't update the user-specified memory limit

2024-04-03 Thread Aneesh Kumar K.V (IBM)
. Cc: Mahesh Salgaonkar Signed-off-by: Aneesh Kumar K.V (IBM) --- arch/powerpc/kernel/fadump.c | 16 1 file changed, 16 deletions(-) diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index d14eda1e8589..4e768d93c6d4 100644 --- a/arch/powerpc/kernel

[PATCH 1/3] powerpc/mm: Align memory_limit value specified using mem= kernel parameter

2024-04-03 Thread Aneesh Kumar K.V (IBM)
. This alignment value will work for both hash and radix translations. Signed-off-by: Aneesh Kumar K.V (IBM) --- arch/powerpc/kernel/prom.c | 7 +-- arch/powerpc/kernel/prom_init.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch

[PATCH] mm/debug_vm_pgtable: Fix BUG_ON with pud advanced test

2024-01-28 Thread Aneesh Kumar K.V (IBM)
+0x1b4/0x334 [c4a2fa40] [c206db34] debug_vm_pgtable+0xcbc/0x1c48 [c4a2fc10] [c000fd28] do_one_initcall+0x60/0x388 Fixes: 27af67f35631 ("powerpc/book3s64/mm: enable transparent pud hugepage") Signed-off-by: Aneesh Kumar K.V (IBM) --- mm/debug_vm_pgt

Re: [PATCH] MAINTAINERS: powerpc: Add Aneesh & Naveen

2023-12-13 Thread IBM
Michael Ellerman writes: > Aneesh and Naveen are helping out with some aspects of upstream > maintenance, add them as reviewers. > Acked-by: Aneesh Kumar K.V (IBM) > Signed-off-by: Michael Ellerman > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > >

Re: [PATCH 09/12] KVM: PPC: Book3S HV nestedv2: Do not call H_COPY_TOFROM_GUEST

2023-12-08 Thread IBM
Vaibhav Jain writes: > From: Jordan Niethe > > H_COPY_TOFROM_GUEST is part of the nestedv1 API and so should not be > called by a nestedv2 host. Do not attempt to call it. > May be we should use firmware_has_feature(FW_FEATURE_H_COPY_TOFROM_GUEST))? the nestedv2 can end up using the above

Re: [PATCH 01/12] KVM: PPC: Book3S HV nestedv2: Invalidate RPT before deleting a guest

2023-12-07 Thread IBM
Vaibhav Jain writes: > From: Jordan Niethe > > An L0 must invalidate the L2's RPT during H_GUEST_DELETE if this has not > already been done. This is a slow operation that means H_GUEST_DELETE > must return H_BUSY multiple times before completing. Invalidating the > tables before deleting the

Re: [PATCH v3] powerpc/pseries/vas: Use usleep_range() to support HCALL delay

2023-12-04 Thread IBM
Haren Myneni writes: > VAS allocate, modify and deallocate HCALLs returns > H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy > delay and expects OS to reissue HCALL after that delay. But using > msleep() will often sleep at least 20 msecs even though the > hypervisor suggests OS

Re: [PATCH v2] powerpc/book3s/hash: Drop _PAGE_PRIVILEGED from PAGE_NONE

2023-12-04 Thread IBM
Michael Ellerman writes: > "Aneesh Kumar K.V" writes: >> There used to be a dependency on _PAGE_PRIVILEGED with pte_savedwrite. >> But that got dropped by >> commit 6a56ccbcf6c6 ("mm/autonuma: use can_change_(pte|pmd)_writable() to >> replace savedwrite") >> >> With the change in this patch

Re: [PATCH v4 06/13] powerpc/rtas: Serialize firmware activation sequences

2023-11-28 Thread IBM
Nathan Lynch writes: > "Aneesh Kumar K.V (IBM)" writes: >> Nathan Lynch via B4 Relay >> writes: >> >>> >>> Use the function lock API to prevent interleaving call sequences of >>> the ibm,activate-firmware RTAS function, which typically

Re: [PATCH RFC 06/12] mm/gup: Drop folio_fast_pin_allowed() in hugepd processing

2023-11-23 Thread IBM
Peter Xu writes: > On Thu, Nov 23, 2023 at 06:22:33PM +, Christophe Leroy wrote: >> > For fast-gup I think the hugepd code is in use, however for walk_page_* >> > apis hugepd code shouldn't be reached iiuc as we have the hugetlb specific >> > handling (walk_hugetlb_range()), so anything

Re: [PATCH] powerpc: add crtsavres.o to always-y instead of extra-y

2023-11-21 Thread IBM
"Nicholas Piggin" writes: > On Tue Nov 21, 2023 at 9:23 AM AEST, Masahiro Yamada wrote: >> crtsavres.o is linked to modules. However, as explained in commit >> d0e628cd817f ("kbuild: doc: clarify the difference between extra-y >> and always-y"), 'make modules' does not build extra-y. >> >> For

Re: [PATCH v4 07/13] powerpc/rtas: Warn if per-function lock isn't held

2023-11-20 Thread IBM
t; isn't satisfied. > > __do_enter_rtas_trace() gets reorganized a bit as a result of > performing the function descriptor lookup unconditionally now. > Reviewed-by: Aneesh Kumar K.V (IBM) > Signed-off-by: Nathan Lynch > --- > arch/powerpc/kernel/rtas.c | 21 +

Re: [PATCH v4 06/13] powerpc/rtas: Serialize firmware activation sequences

2023-11-20 Thread IBM
Nathan Lynch via B4 Relay writes: > From: Nathan Lynch > > Use the function lock API to prevent interleaving call sequences of > the ibm,activate-firmware RTAS function, which typically requires > multiple calls to complete the update. While the spec does not > specifically pr

Re: [PATCH v4 05/13] powerpc/rtas: Facilitate high-level call sequences

2023-11-20 Thread IBM
> kernel is concerned. User space is responsible for appropriately > serializing its call sequences. (Whether user space code actually > takes measures to prevent sequence interleaving is another matter.) > Examples of such functions currently include ibm,platform-dump and > ibm,get-vpd. &

Re: [PATCH v4 04/13] powerpc/rtas: Factor out function descriptor lookup

2023-11-20 Thread IBM
Nathan Lynch via B4 Relay writes: > From: Nathan Lynch > > Move the function descriptor table lookup out of rtas_function_token() > into a separate routine for use in new code to follow. No functional > change. > Reviewed-by: Aneesh Kumar K.V (IBM) > Signed

Re: [PATCH v4 03/13] powerpc/rtas: Add function return status constants

2023-11-20 Thread IBM
ing the formatting. > Reviewed-by: Aneesh Kumar K.V (IBM) > Signed-off-by: Nathan Lynch > --- > arch/powerpc/include/asm/rtas.h | 25 +++-- > 1 file changed, 19 insertions(+), 6 deletions(-) > > diff --git a/arch/powerpc/include/asm/rtas.h b/

Re: [PATCH v4 02/13] powerpc/rtas: Fall back to linear search on failed token->function lookup

2023-11-20 Thread IBM
x20 > > (This is preceded by a warning for the failed lookup in > rtas_token_to_function().) > > This happens when __do_enter_rtas_trace() attempts a token to function > descriptor lookup before the xarray containing the mappings has been > set up. > > Fall back to linear scan of the t

Re: [PATCH v4 01/13] powerpc/rtas: Add for_each_rtas_function() iterator

2023-11-20 Thread IBM
: Aneesh Kumar K.V (IBM) > Signed-off-by: Nathan Lynch > --- > arch/powerpc/kernel/rtas.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c > index eddc031c4b95..1ad1869e2e96 100644 >

Re: [PATCH v2 14/16] powerpc/book3s64/vmemmap: Switch radix to use a different vmemmap handling function

2023-06-27 Thread IBM
"Aneesh Kumar K.V" writes: > This is in preparation to update radix to implement vmemmap optimization > for devdax. Below are the rules w.r.t radix vmemmap mapping > > 1. First try to map things using PMD (2M) > 2. With altmap if altmap cross-boundary check returns true, fall back to >

Re: [PATCH v2 13/16] powerpc/book3s64/mm: Enable transparent pud hugepage

2023-06-27 Thread IBM
"Aneesh Kumar K.V" writes: These are just some minor nits in case you are going to send another revision. > This is enabled only with radix translation and 1G hugepage size. This will > be used with devdax device memory with a namespace alignment of 1G. > > Anon transparent hugepage is not

Re: [PATCH v2 12/16] mm/vmemmap optimization: Split hugetlb and devdax vmemmap optimization

2023-06-27 Thread IBM
"Aneesh Kumar K.V" writes: > Arm disabled hugetlb vmemmap optimization [1] because hugetlb vmemmap > optimization includes an update of both the permissions (writeable to > read-only) and the output address (pfn) of the vmemmap ptes. That is not > supported without unmapping of pte(marking it

Re: [PATCH 2/4] fs: define a firmware security filesystem named fwsecurityfs

2022-11-19 Thread Ritesh Harjani (IBM)
Hello Nayna, On 22/11/09 03:10PM, Nayna wrote: > > On 11/9/22 08:46, Greg Kroah-Hartman wrote: > > On Sun, Nov 06, 2022 at 04:07:42PM -0500, Nayna Jain wrote: > > > securityfs is meant for Linux security subsystems to expose policies/logs > > > or any other information. However, there are

[PATCH] powerpc: declare unmodified attribute_group usages const

2022-02-28 Thread IBM IMAP
>From ec1a16a15a86c6224cc0129ab3c2ae9f69f2c7c5 Mon Sep 17 00:00:00 2001 From: Rohan McLure Date: Mon, 28 Feb 2022 10:19:19 +1100 Subject: [PATCH] powerpc: declare unmodified attribute_group usages const To: linuxppc-dev@lists.ozlabs.org Inspired by (bd75b4ef4977: Constify static attribute_group