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 v4 02/13] powerpc/rtas: Fall back to linear search on failed token->function lookup

2023-11-20 Thread IBM
+0x1c/0x20 > > (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 sca

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 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 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 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 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] 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 ex

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 inv

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 suppo

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 >PAGE_SI

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 withi

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 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 num

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 rei

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 gue

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 hcal

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 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

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 b

Re: [PATCH 2/3] powerpc/pseries: Export hardware trace macro dump via debugfs

2024-06-22 Thread IBM
dump.o > obj-$(CONFIG_IO_EVENT_IRQ) += io_event_irq.o > obj-$(CONFIG_LPARCFG)+= lparcfg.o > obj-$(CONFIG_IBMVIO) += vio.o > diff --git a/arch/powerpc/platforms/pseries/htmdump.c > b/arch/powerpc/platforms/pseries/htmdump.c > new file mode 100644 > i

Re: [PATCH 3/3] powerpc: Document details on H_HTM hcall

2024-06-22 Thread IBM
Madhavan Srinivasan writes: > Add documentation to 'papr_hcalls.rst' describing the > input, output and return values of the H_HTM hcall as > per the internal specification. > > Signed-off-by: Madhavan Srinivasan > --- > Documentation/arch/powerpc/papr_hcalls.rst | 11 +++ > 1 file chan

Re: linux-next: boot warning after merge of the vfs-brauner tree

2024-08-26 Thread IBM
Luis Chamberlain writes: > On Mon, Aug 26, 2024 at 02:10:49PM -0700, Darrick J. Wong wrote: >> On Mon, Aug 26, 2024 at 01:52:54PM -0700, Luis Chamberlain wrote: >> > On Mon, Aug 26, 2024 at 07:43:20PM +0200, Christophe Leroy wrote: >> > > >> > > >> > > Le 26/08/2024 à 17:48, Pankaj Raghav (Sams

Re: [PATCH] powerpc: Use printk instead of WARN in change_memory_attr

2024-08-27 Thread IBM
Christophe Leroy writes: > Le 27/08/2024 à 11:12, Ritesh Harjani (IBM) a écrit : >> [Vous ne recevez pas souvent de courriers de ritesh.l...@gmail.com. >> Découvrez pourquoi ceci est important à >> https://aka.ms/LearnAboutSenderIdentification ] >> >> Use pr_

Re: [RFC v1 01/10] book3s64/hash: Remove kfence support temporarily

2024-09-04 Thread IBM
Sorry for the delayed response. Was pulled into something else. Christophe Leroy writes: > Le 31/07/2024 à 09:56, Ritesh Harjani (IBM) a écrit : >> [Vous ne recevez pas souvent de courriers de ritesh.l...@gmail.com. >> Découvrez pourquoi ceci est important à &g

Re: [RFC v1 09/10] book3s64/radix: Refactoring common kfence related functions

2024-09-04 Thread IBM
Christophe Leroy writes: > Le 31/07/2024 à 09:56, Ritesh Harjani (IBM) a écrit : >> [Vous ne recevez pas souvent de courriers de ritesh.l...@gmail.com. >> Découvrez pourquoi ceci est important à >> https://aka.ms/LearnAboutSenderIdentification ] >> >> Both rad

Re: [RFC v1 10/10] book3s64/hash: Disable kfence if not early init

2024-09-04 Thread IBM
Christophe Leroy writes: > Le 31/07/2024 à 09:56, Ritesh Harjani (IBM) a écrit : >> [Vous ne recevez pas souvent de courriers de ritesh.l...@gmail.com. >> Découvrez pourquoi ceci est important à >> https://aka.ms/LearnAboutSenderIdentification ] >> >> Enable

Re: [RFC v3 1/3] fadump: Refactor and prepare fadump_cma_init for late init

2024-10-14 Thread IBM
Madhavan Srinivasan writes: > On 10/11/24 8:30 PM, Ritesh Harjani (IBM) wrote: >> We anyway don't use any return values from fadump_cma_init(). Since >> fadump_reserve_mem() from where fadump_cma_init() gets called today, >> already has the required checks. >>

Re: [RFC RESEND v2 02/13] powerpc: mm: Fix kfence page fault reporting

2024-10-15 Thread IBM
Christophe Leroy writes: > Le 15/10/2024 à 03:33, Ritesh Harjani (IBM) a écrit : >> copy_from_kernel_nofault() can be called when doing read of /proc/kcore. >> /proc/kcore can have some unmapped kfence objects which when read via >> copy_from_kernel_nofault() can cau

Re: [RFC v3 1/3] fadump: Refactor and prepare fadump_cma_init for late init

2024-10-18 Thread IBM
Madhavan Srinivasan writes: > > Patchset looks fine to me. > > Reviewed-by: Madhavan Srinivasan for the series. > Thanks Maddy for the reviews! I will spin PATCH v4 with these minor suggested changes (No code changes) -ritesh

Re: [PATCH v3 01/12] powerpc: mm/fault: Fix kfence page fault reporting

2024-10-21 Thread IBM
Michael Ellerman writes: > Hi Ritesh, > > "Ritesh Harjani (IBM)" writes: >> copy_from_kernel_nofault() can be called when doing read of /proc/kcore. >> /proc/kcore can have some unmapped kfence objects which when read via >> copy_from_kernel_nofault() c

Re: [RFC 1/2] cma: Fix CMA_MIN_ALIGNMENT_BYTES during early_init

2024-10-09 Thread IBM
David Hildenbrand writes: > On 08.10.24 15:27, Ritesh Harjani (IBM) wrote: >> During early init CMA_MIN_ALIGNMENT_BYTES can be PAGE_SIZE, >> since pageblock_order is still zero and it gets initialized >> later during paging_init() e.g. >> paging_init() -> free_area

Re: [PATCH v2] selftests/powerpc: Remove the path after initialization.

2024-10-01 Thread IBM
the path after initialization. > > tools/testing/selftests/powerpc/mm/tlbie_test.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Thanks for the fix. Looks good to me. Please feel free to add - Reviewed-by: Ritesh Harjani (IBM)

Re: [RFC v2 0/4] cma: powerpc fadump fixes

2024-10-11 Thread IBM
Michael Ellerman writes: > "Ritesh Harjani (IBM)" writes: >> Please find the v2 of cma related powerpc fadump fixes. >> >> Patch-1 is a change in mm/cma.c to make sure we return an error if someone >> uses >> cma_init_reserved_mem() before the pageblo

Re: drivers/nx: Invalid wait context issue when rebooting

2024-10-14 Thread IBM
amp;xibm->lock){}-{3:3}, at: xive_spapr_put_ipi+0xb8/0x120 > other info that might help us debug this: > context-{2:2} > no locks held by swapper/2/0. > stack backtrace: > CPU: 2 UID: 0 PID: 0 Comm: swapper/2 Not tainted > 6.12.0-rc2-fix-invalid-wait-context-00222-g7d2

Re: [PATCH] powerpc: Use str_enabled_disabled() helper function

2024-10-27 Thread IBM
.c: flags & HT_MSI_FLAGS_ENABLE ? "enabled" : "disabled", addr); > Signed-off-by: Thorsten Blum > --- > arch/powerpc/kernel/secure_boot.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > For this patch it looks good to me. P

Re: [PATCH v3] mm/kfence: Add a new kunit test test_use_after_free_read_nofault()

2024-11-12 Thread IBM
Marco Elver writes: > On Fri, 18 Oct 2024 at 19:46, Ritesh Harjani (IBM) > wrote: >> >> From: Nirjhar Roy >> >> Faults from copy_from_kernel_nofault() needs to be handled by fixup >> table and should not be handled by kfence. Otherwise whi

Re: [RFC v3 -next] cma: Enforce non-zero pageblock_order during cma_init_reserved_mem()

2024-11-12 Thread IBM
"Ritesh Harjani (IBM)" writes: > cma_init_reserved_mem() checks base and size alignment with > CMA_MIN_ALIGNMENT_BYTES. However, some users might call this during > early boot when pageblock_order is 0. That means if base and size does > not have pageblock_order a

Re: [PATCH v2 2/2] fadump: reserve param area if below boot_mem_top

2024-11-12 Thread IBM
Sourabh Jain writes: > Hello Ritesh, > > > On 12/11/24 17:23, Ritesh Harjani (IBM) wrote: >> Ritesh Harjani (IBM) writes: >> >>> Sourabh Jain writes: >>> >>>> Hello Ritesh, >>>> >>>> >>>> On 12/11/24 11:

Re: [PATCH v2 2/2] fadump: reserve param area if below boot_mem_top

2024-11-12 Thread IBM
Sourabh Jain writes: > Hello Ritesh, > > > On 12/11/24 11:51, Ritesh Harjani (IBM) wrote: >> Sourabh Jain writes: >> >>> The param area is a memory region where the kernel places additional >>> command-line arguments for fadump kernel. Currently, the p

Re: [PATCH v2 2/2] fadump: reserve param area if below boot_mem_top

2024-11-12 Thread IBM
Ritesh Harjani (IBM) writes: > Sourabh Jain writes: > >> Hello Ritesh, >> >> >> On 12/11/24 11:51, Ritesh Harjani (IBM) wrote: >>> Sourabh Jain writes: >>> >>>> The param area is a memory region where the kernel places additional &

Re: [RFC PATCH] powerpc/tlb: enable arch want batched unmap tlb flush

2024-09-22 Thread IBM
Luming Yu writes: > On Sun, Sep 22, 2024 at 04:39:53PM +0530, Ritesh Harjani wrote: >> Luming Yu writes: >> >> > From: Yu Luming >> > >> > ppc always do its own tracking for batch tlb. By trivially enabling >> > the ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH in ppc, ppc arch can re-use >> > common code

Re: [RFC PATCH] powerpc/tlb: enable arch want batched unmap tlb flush

2024-09-22 Thread IBM
Luming Yu writes: > From: Yu Luming > > ppc always do its own tracking for batch tlb. By trivially enabling > the ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH in ppc, ppc arch can re-use > common code in rmap and reduce overhead and do optimization it could not > have without a tlb flushing context at low

Re: [PATCH v3] powerpc/pseries/eeh: Fix pseries_eeh_err_inject

2024-09-23 Thread IBM
Guenter Roeck writes: > Hi, > > On Mon, Sep 09, 2024 at 09:02:20AM -0500, Narayana Murty N wrote: >> VFIO_EEH_PE_INJECT_ERR ioctl is currently failing on pseries >> due to missing implementation of err_inject eeh_ops for pseries. >> This patch implements pseries_eeh_err_inject in eeh_ops/pseries

Re: [PATCH v2] powerpc/xive: Use cpumask_intersects()

2024-09-27 Thread IBM
ects() has to only check if any of the bits is set hence does fewer operations. Looks good to me. Please feel free to add - Reviewed-by: Ritesh Harjani (IBM) > Signed-off-by: Costa Shulyupin > Reviewed-by: Ming Lei > > --- > > v2: add comparison between cpumask_any_and() a

Re: [PATCH] selftests/powerpc: Rm the unnecessary remove function.

2024-09-27 Thread IBM
zhangjiao2 writes: > From: zhang jiao > > Path is not initialized before use, > remove the unnecessary remove function. > > Signed-off-by: zhang jiao > --- > tools/testing/selftests/powerpc/mm/tlbie_test.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/tools/testing/selftests/powerpc/

Re: [PATCH] powerpc: remove dead config options for MPC85xx platform support

2024-09-27 Thread IBM
e changed, 21 deletions(-) I couldn't find any relevant reference of MPC8540_ADS, MPC8560_ADS or MPC85xx_CDS after this patch So please feel free to add - Reviewed-by: Ritesh Harjani (IBM) > > diff --git a/arch/powerpc/platforms/85xx/Kconfig > b/arch/powerpc/platforms/85xx/Kconfi

Re: [PATCH] powerpc/pseries/eeh: move pseries_eeh_err_inject() outside CONFIG_DEBUG_FS block

2024-09-17 Thread IBM
Narayana Murty N writes: > Makes pseries_eeh_err_inject() available even when debugfs > is disabled (CONFIG_DEBUG_FS=n). It moves eeh_debugfs_break_device() > and eeh_pe_inject_mmio_error() out of the CONFIG_DEBUG_FS block > and renames it as eeh_break_device(). > > Reported-by: kernel test robot

Re: [RFC v2 02/13] powerpc: mm: Fix kfence page fault reporting

2024-09-18 Thread IBM
Christophe Leroy writes: > Le 19/09/2024 à 04:56, Ritesh Harjani (IBM) a écrit : >> copy_from_kernel_nofault() can be called when doing read of /proc/kcore. >> /proc/kcore can have some unmapped kfence objects which when read via >> copy_from_kernel_nofault() can cau

Re: [PATCH v3 2/3] powerpc/pseries: Export hardware trace macro dump via debugfs

2024-09-20 Thread IBM
IG_HTMDUMP)+= htmdump.o > obj-$(CONFIG_IO_EVENT_IRQ) += io_event_irq.o > obj-$(CONFIG_LPARCFG)+= lparcfg.o > obj-$(CONFIG_IBMVIO) += vio.o > diff --git a/arch/powerpc/platforms/pseries/htmdump.c > b/arch/powerpc/platforms/ps

Re: [PATCH] powerpc/kvm: Fix typo in the kvm functions

2024-09-20 Thread IBM
es changed, 5 insertions(+), 5 deletions(-) Not an expert in kvm area. But the change looks very straight forward to me. Searching for "kmv" string in arch/powerpc/ after applying this patch indeed resulted in zero hits. Please feel free to add - Reviewed-by: Ritesh Harjani (IBM)

Re: [RFC v2 03/13] book3s64/hash: Remove kfence support temporarily

2024-09-18 Thread IBM
Christophe Leroy writes: > Le 19/09/2024 à 04:56, Ritesh Harjani (IBM) a écrit : >> Kfence on book3s Hash on pseries is anyways broken. It fails to boot >> due to RMA size limitation. That is because, kfence with Hash uses >> debug_pagealloc infrastructure. debug_pagealloc

Re: [PATCH] powerpc/pseries/eeh: move pseries_eeh_err_inject() outside CONFIG_DEBUG_FS block

2024-09-19 Thread IBM
Vaibhav Jain writes: > Hi Ritesh, > > Thanks for looking into this patch. My responses your review inline > below: > > Ritesh Harjani (IBM) writes: > >> Narayana Murty N writes: >> >>> Makes pseries_eeh_err_inject() available even when debugfs >

Re: [RFC v2 01/13] mm/kfence: Add a new kunit test test_use_after_free_read_nofault()

2024-10-02 Thread IBM
ave a kunit test for the same to make sure all architectures handles this properly. Thoughts? [1]: https://lore.kernel.org/all/20230213183858.1473681-1-...@linux.ibm.com/ -ritesh "Ritesh Harjani (IBM)" writes: > From: Nirjhar Roy > > Faults from copy_from_kernel_nofault(

Re: [PATCH] selftests/mount_setattr: Fix failures on 64K PAGE_SIZE kernels

2024-11-16 Thread IBM
/run/ext4 # 4k kernel du -sh /run/ext4 84K /run/ext4 > > It seems fraught to rely on the ext4.img taking less space on disk than > the allocated size, so instead create the tmpfs with a size of 2MB. With > that all 21 tests pass on 64K PAGE_SIZE kernels. That looks like the right th

Re: [bug report from fstests] WARNING: CPU: 1 PID: 0 at arch/powerpc/mm/mmu_context.c:106 switch_mm_irqs_off+0x220/0x270

2024-11-16 Thread IBM
mod > fuse loop nfnetlink xfs sd_mod nvme nvme_core ibmvscsi scsi_transport_srp > nvme_auth [last unloaded: scsi_debug] > [16631.058617] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Kdump: loaded Tainted: G > W 6.12.0-rc6+ #1 > [16631.058623] Tainted: [W]=WARN > [16631.05862

Re: [PATCH] powerpc/book3s64/hugetlb: Fix disabling hugetlb when fadump is active

2024-12-16 Thread IBM
gt; CC: Hari Bathini > CC: Madhavan Srinivasan > Cc: Mahesh Salgaonkar > Cc: Michael Ellerman > CC: Ritesh Harjani (IBM) > Signed-off-by: Sourabh Jain > --- > > Note: Even with this fix included, it is possible to enable gigantic > pages in the fadump kernel. IIUC

Re: [PATCH] powerpc/book3s64/hugetlb: Fix disabling hugetlb when fadump is active

2024-12-16 Thread IBM
Ritesh Harjani (IBM) writes: > Sourabh Jain writes: > >> Commit 8597538712eb ("powerpc/fadump: Do not use hugepages when fadump >> is active") disabled hugetlb support when fadump is active by returning >> early from hugetlbpage_init():arch/powerpc/mm/h

Re: [PATCH 2/3] selftest/powerpc/ptrace/ptrace-pkey: Remove duplicate macros

2024-12-16 Thread IBM
y.c | 14 +- > 1 file changed, 1 insertion(+), 13 deletions(-) > Similar to previous patch. Cleanup looks good to me. Please feel free to add - Reviewed-by: Ritesh Harjani (IBM) -ritesh

Re: [PATCH 3/3] selftest/powerpc/ptrace: Cleanup duplicate macro definitions

2024-12-16 Thread IBM
Madhavan Srinivasan writes: > Both core-pkey.c and ptrace-pkey.c tests have similar macro > definitions, move them to "pkeys.h" and remove the macro > definitions from the C file. > > Signed-off-by: Madhavan Srinivasan > --- > tools/testing/selftests/powerpc/include/pkeys.h | 8 >

Re: [PATCH v2 3/3] selftest/powerpc/ptrace: Cleanup duplicate macro definitions

2024-12-16 Thread IBM
ional macros pointed out by Ritesh >which are duplicates and are avilable in "pkeys.h" Thanks! The changes looks good to me. Please feel free to add - Reviewed-by: Ritesh Harjani (IBM) Gave a quick run on my lpar too - # selftests: powerpc/ptrace: core-pkey # test:

Re: [PATCH] powerpc/pseries/eeh: Fix get PE state translation

2024-11-21 Thread IBM
Vaibhav Jain writes: > Hi Ritesh, > > Thanks for looking into this patch. My responses on behalf of Narayana > below: > > "Ritesh Harjani (IBM)" writes: > >> Narayana Murty N writes: >> >>> The PE Reset State "0" obtained from RT

Re: [RESEND PATCH] powerpc: Use str_on_off() helper in check_cache_coherency()

2024-12-22 Thread IBM
uot;off"); > + str_on_off(KERNEL_COHERENCY), > + str_on_off(devtree_coherency)); > BUG(); > } Looks good to me. Please feel free to add - Reviewed-by: Ritesh Harjani (IBM) -ritesh

Re: [PATCH] powerpc/64s: Rewrite __real_pte() as a static inline

2025-01-11 Thread IBM
Christophe Leroy writes: > Rewrite __real_pte() as a static inline in order to avoid > following warning/error when building with 4k page size: > > CC arch/powerpc/mm/book3s64/hash_tlb.o > arch/powerpc/mm/book3s64/hash_tlb.c: In function 'hpte_need_flush': > arch/powerpc/

Re: [PATCH v2] powerpc/64s: Rewrite __real_pte() and __rpte_to_hidx() as static inline

2025-01-12 Thread IBM
lot information at the > right offset for hugetlb") > Signed-off-by: Christophe Leroy > --- > v2: Also inline __rpte_to_hidx() for the same reason Thanks for addressing the other warning too in v2. I also tested the changes on my system and this fixes both the reported warnings.

Re: [PATCH] fadump: Use str_yes_no() helper in fadump_show_config()

2025-01-13 Thread IBM
ring_choices.h i.e. include/linux/seq_file.h -> linux/string_helpers.h -> linux/string_choices.h Directly having string_choices include could be better. #include However no hard preferences. The patch functionally looks correct to me. Please feel free to add - Reviewed

Re: [RFC PATCH] powerpc: Add check to select PPC_RADIX_BROADCAST_TLBIE

2025-04-08 Thread IBM
Christophe Leroy writes: > Le 07/04/2025 à 21:10, Ritesh Harjani (IBM) a écrit : >> Madhavan Srinivasan writes: >> >>> Commit 3d45a3d0d2e6 ("powerpc: Define config option for processors with >>> broadcast TLBIE") >> >> We may need to add

Re: kexec failing with KVM on Power8 baremetal host

2025-04-07 Thread IBM
Stefan Berger writes: > I bisected Linux between 6.13.0 and 6.12.0 due to failing kexec on a > Power8 baremetal host on 6.13.0: > > 8fec58f503b296af87ffca3898965e3054f2b616 is the first bad commit > commit 8fec58f503b296af87ffca3898965e3054f2b616 > Author: Ritesh Harjani (I

Re: [BUG][powerpc] OOPs: Kernel access of bad area during zram swap write - kswapd0 crash

2025-04-20 Thread IBM
but by > cumulative > operations during the test sequence. > > > Environment Details: > Kernel: 6.15.0-rc1-g521d54901f98 > Reproducible with: 6.15.0-rc2-gf3a2e2a79c9d Looks like the issue is happening on 6.15-rc2. Did git bisect revealed a faulty commit? >

Re: early soft lockup in 6.15-rc2 on PowerNV

2025-04-16 Thread IBM
Dan Horák writes: > Hi, > > after updating to Fedora built 6.15-rc2 kernel from 6.14 I am getting a > soft lockup early in the boot and NVME related timeout/crash later > (could it be related?). I am first checking if this is a known issue > as I have not started bisecting yet. > > [2.866399]

Re: [PATCH for-next 1/2] book3s64/radix : Handle error conditions properly in radix_vmemmap_populate

2025-05-05 Thread IBM
reate mappings for vmemmap area. In this, we first try to allocate pmd entry using vmemmap_alloc_block_buf() of PMD_SIZE. If we couldn't allocate, we should definitely fallback to base page mapping. Looks good to me. Feel free to add: Reviewed-by: Ritesh Harjani (IBM) -ritesh > Signed-off-by

Re: [PATCH] powerpc/iommu: Memory leak in TCE table userspace view

2025-05-02 Thread IBM
ore calling vfree(). nitpick: I might have re-pharsed the commit msg as: powerpc/pseries/iommu: Fix kmemleak in TCE table userspace view The patch looks good to me purely from the kmemleak bug perspective. So feel free to take: Reviewed-by: Ritesh Harjani (IBM) -ritesh

Re: [PATCH v4] powerpc/hugetlb: Disable gigantic hugepages if fadump is active

2025-03-01 Thread IBM
0.00] HugeTLB: hugepages=1 does not follow a valid hugepagesz, > ignoring > [0.706375] HugeTLB support is disabled! > [0.773530] hugetlbfs: disabling because there are no supported hugepage > sizes > > $ cat /proc/meminfo | grep -i "hugetlb" > -

Re: [PATCH v4] powerpc/hugetlb: Disable gigantic hugepages if fadump is active

2025-03-03 Thread IBM
Sourabh Jain writes: > Hello Ritesh, > > Thanks for the review. > > On 02/03/25 12:05, Ritesh Harjani (IBM) wrote: >> Sourabh Jain writes: >> >>> The fadump kernel boots with limited memory solely to collect the kernel >>> core dump. Having giganti

Re: [PATCH v3 1/2] book3s64/radix: Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n

2025-03-10 Thread IBM
Christophe Leroy writes: > Le 10/03/2025 à 13:44, Donet Tom a écrit : >> From: "Ritesh Harjani (IBM)" >> >> Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n > > I don't understand your patch. > > As far as I can see, CONFIG_AR

Re: vmalloc_node_range for size 4198400 failed: Address range restricted to 0xf1000000 - 0xf5110000 (kernel 6.14-rc4, ppc32)

2025-02-26 Thread IBM
Erhard Furtner writes: > Greetings! > > At boot with a KASAN-enabled v6.14-rc4 kernel on my PowerMac G4 DP I get: > > [...] > vmalloc_node_range for size 4198400 failed: Address range restricted to > 0xf100 - 0xf511 > swapon: vmalloc error: size 4194304, vm_struct allocation failed, > m

Re: [PATCH v4] powerpc/hugetlb: Disable gigantic hugepages if fadump is active

2025-03-05 Thread IBM
Sourabh Jain writes: > Hello Ritesh, > > > On 04/03/25 10:27, Ritesh Harjani (IBM) wrote: >> Sourabh Jain writes: >> >>> Hello Ritesh, >>> >>> Thanks for the review. >>> >>> On 02/03/25 12:05, Ritesh Harjani (IBM) wrote: >&

Re: [PATCH] powerpc/mm: Switch MMU context on hash MMU if SLB preload cache is aged

2025-07-31 Thread IBM
dd this new entry into the HW SLB of cpu-0, * we hit a SLB multi-hit error. */ WARNING: CPU: 0 PID: 1810970 at arch/powerpc/mm/book3s64/slb.c:62 assert_slb_presence+0x2c/0x50(48 results) 02:47:29 [20157/42149] Modules linked in: CPU: 0 UID: 0 PID: 1810970 Comm: dd Not tainted 6.16.0-rc3-dirt

Re: [PATCH v2] powerpc/mm: Fix SLB multihit issue during SLB preload

2025-08-01 Thread IBM
into the HW SLB of cpu-0, > * we hit a SLB multi-hit error. > */ > > WARNING: CPU: 0 PID: 1810970 at arch/powerpc/mm/book3s64/slb.c:62 > assert_slb_presence+0x2c/0x50(48 results) 02:47:29 [20157/42149] > Modules linked in: > CPU: 0 UID: 0 PID: 1810970 Co

Re: [PATCH v2] powerpc/mm: Fix SLB multihit issue during SLB preload

2025-08-04 Thread IBM
etting up the mmu context properly. But we didn't do >> * that since the prev mm_struct running on cpu-0 was same as the >> * next mm_struct (which is true for swapper / kernel threads). So >> * now when we try to add this new entry into the HW SLB of cpu-0,

Re: [PATCH] KVM: PPC: Book3S HV: Add H_VIRT mapping for tracing exits

2025-05-17 Thread IBM
o me. Please feel free to add: Reviewed-by: Ritesh Harjani (IBM) > Signed-off-by: Gautam Menghani > --- > arch/powerpc/kvm/trace_book3s.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/powerpc/kvm/trace_book3s.h b/arch/powerpc/kvm/trace_book3s.h > index 372

Re: [PATCH v2 08/14] powerpc: Handle KCOV __init vs inline mismatches

2025-05-24 Thread IBM
olved. For > s390 this requires forcing a couple functions to be inline with > __always_inline. > > Signed-off-by: Kees Cook > --- > Cc: Madhavan Srinivasan > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe Leroy > Cc: Naveen N Rao > Cc: "Ritesh

Re: [PATCH] powerpc: Remove duplicate definition for ppc_msgsnd_sync()

2025-08-18 Thread IBM
def CONFIG_PPC_BOOK3S and #else block. This patch takes those duplicate definitions out and move it to a common place. BTW, there is nothing sndmsg specific in this, so this could be open coded as well. But as far as this patch is concerned, it looks good. So please feel free to add: Reviewe

Re: [PATCH] powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure

2025-09-06 Thread IBM
Christophe Leroy writes: > Le 05/09/2025 à 05:55, Ritesh Harjani a écrit : >> Christophe Leroy writes: >> >>> PAGE_KERNEL_TEXT is an old macro that is used to tell kernel whether >>> kernel text has to be mapped read-only or read-write based on build >>> time options. >>> >>> But nowadays, with

Re: [PATCH RFC] powerpc: Panic on jump label code patching failure

2025-09-05 Thread IBM
Andrew Donnellan writes: > If patch_branch() or patch_instruction() fails while updating a jump > label, we presently fail silently, leading to unpredictable behaviour > later on. > > Change arch_jump_label_transform() to panic on a code patching failure, > matching the existing behaviour of arch

Re: [PATCH] powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure

2025-09-07 Thread IBM
Christophe Leroy writes: > PAGE_KERNEL_TEXT is an old macro that is used to tell kernel whether > kernel text has to be mapped read-only or read-write based on build > time options. > > But nowadays, with functionnalities like jump_labels, static links, > etc ... more only less all kernels need t

Re: [PATCH v2 5/7] powerpc: Stop calling page_address() in free_pages()

2025-08-31 Thread IBM
ress() here and then free_pages() doing virt_to_page() internally.. The change looks good to me. Please feel free to add: Reviewed-by: Ritesh Harjani (IBM) > > diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c > b/arch/powerpc/mm/book3s64/radix_pgtable.c > index be523e5fe9c5..

Re: [PATCH v6 1/2] kasan: introduce ARCH_DEFER_KASAN and unify static key across modes

2025-09-03 Thread IBM
> #include > #include > > -DEFINE_STATIC_KEY_FALSE(powerpc_kasan_enabled_key); > - > static void __init kasan_init_phys_region(void *start, void *end) > { > unsigned long k_start, k_end, k_cur; > @@ -92,11 +90,9 @@ void __init kasan_init(void) >*/ >

Re: [PATCH RFC] powerpc: Panic on jump label code patching failure

2025-09-08 Thread IBM
Christophe Leroy writes: > Le 06/09/2025 à 05:52, Ritesh Harjani a écrit : >> [Vous ne recevez pas souvent de courriers de rite...@linux.ibm.com. >> Découvrez pourquoi ceci est important à >> https://aka.ms/LearnAboutSenderIdentification ] >> >> Andrew Donnellan writes: >> >>> If patch_branc

Re: [PATCH v3 06/11] powerpc/ptdump: rename "struct pgtable_level" to "struct ptdump_pglevel"

2025-08-26 Thread IBM
my book3s64 and ppc32 platform. I think we should fix the subject line.. s/ptdump_pglevel/ptdump_pg_level Otherwise the changes looks good to me. So please feel free to add - Reviewed-by: Ritesh Harjani (IBM) > > diff --git a/arch/powerpc/mm/ptdump/8xx.c b/arch/powerpc/mm/ptdump/8xx.c >

Re: [RFC 8/8] powerpc/book3s64/slb: Add slb faults to vmstat

2025-08-29 Thread IBM
Stephen Rothwell writes: > Hi Ritesh, > > On Sat, 30 Aug 2025 09:21:47 +0530 "Ritesh Harjani (IBM)" > wrote: >> >> diff --git a/mm/vmstat.c b/mm/vmstat.c >> index 71cd1ceba191..8cd17a5fc72b 100644 >> --- a/mm/vmstat.c >> +++ b/mm/v

Re: [RFC 5/8] powerpc/ptdump: Dump PXX level info for kernel_page_tables

2025-08-30 Thread IBM
Christophe Leroy writes: > Le 30/08/2025 à 05:51, Ritesh Harjani (IBM) a écrit : >> This patch adds PGD/PUD/PMD/PTE level information while dumping kernel >> page tables. Before this patch it was hard to identify which entries >> belongs to which page table level e.g. >

Re: [RFC 6/8] powerpc/book3s64/slb: Make preload_add return type as void

2025-08-30 Thread IBM
Christophe Leroy writes: > Le 30/08/2025 à 05:51, Ritesh Harjani (IBM) a écrit : >> We dropped preload_new_slb_context() in the previous patch. That means > > slb_setup_new_exec() was also checking preload_add() returned value but > is also gone. > Right. Will add that

Re: [RFC 3/8] book3s64/hash: Fix phys_addr_t printf format in htab_initialize()

2025-08-30 Thread IBM
Christophe Leroy writes: > Le 30/08/2025 à 05:51, Ritesh Harjani (IBM) a écrit : >> We get below errors when we try to enable debug logs in book3s64/hash_utils.c >> This patch fixes these errors related to phys_addr_t printf format. >> >> arch/powerpc/mm/book3s6

Re: [RFC 7/8] powerpc/book3s64/slb: Add no_slb_preload early cmdline param

2025-08-30 Thread IBM
Christophe Leroy writes: > Le 30/08/2025 à 05:51, Ritesh Harjani (IBM) a écrit : >> no_slb_preload cmdline can come useful in quickly disabling and/or >> testing the performance impact of userspace slb preloads. Recently there >> was a slb multi-hit issue due to slb preload

[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 s

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

2024-04-17 Thread Ritesh Harjani (IBM)
-off-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/hashpa

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 variou

[RFC v1 00/10] book3s64/hash: Improve kfence support

2024-07-31 Thread Ritesh Harjani (IBM)
cases, which makes it not really suitable to be enabled by default on production kernels on Hash. This is because on P8 book3s64, we don't support mapping multiple pagesizes (MPSS) within the kernel linear map segment. Is this understanding correct? Ritesh Harjani (IBM) (10): book3

[RFC v1 01/10] book3s64/hash: Remove kfence support temporarily

2024-07-31 Thread Ritesh Harjani (IBM)
eeds some refactoring. We will bring in kfence on Hash support in later patches. Signed-off-by: Ritesh Harjani (IBM) --- arch/powerpc/include/asm/kfence.h | 5 + arch/powerpc/mm/book3s64/hash_utils.c | 16 +++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/arc

  1   2   >