Re: [PATCH] powerpc/fadump: invoke ibm,os-term with rtas_call_unlocked()

2023-06-08 Thread Mahesh J Salgaonkar
On 2023-06-09 10:48:46 Fri, Hari Bathini wrote: > Invoke ibm,os-term call with rtas_call_unlocked(), without using the > RTAS spinlock, to avoid deadlock in the unlikely event of a machine > crash while making an RTAS call. Thanks for the patch. Minor comment bellow. > > Signed-off-by: Hari

[PATCH] powerpc/fadump: invoke ibm,os-term with rtas_call_unlocked()

2023-06-08 Thread Hari Bathini
Invoke ibm,os-term call with rtas_call_unlocked(), without using the RTAS spinlock, to avoid deadlock in the unlikely event of a machine crash while making an RTAS call. Signed-off-by: Hari Bathini --- arch/powerpc/kernel/rtas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH] powerpc/build: vdso linker warning for orphan sections

2023-06-08 Thread Nicholas Piggin
Add --orphan-handlin for vdsos, and adjust vdso linker scripts to deal with orphan sections. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/vdso/Makefile | 2 ++ arch/powerpc/kernel/vdso/vdso32.lds.S | 4 +++- arch/powerpc/kernel/vdso/vdso64.lds.S | 4 +++- 3 files changed, 8

[PATCH] powerpc/ftrace: Disable ftrace on ppc32 if using clang

2023-06-08 Thread Naveen N Rao
Ftrace on ppc32 expects a three instruction sequence at the beginning of each function when specifying -pg: mflrr0 stw r0,4(r1) bl _mcount This is the case with all supported versions of gcc. Clang however emits a branch to _mcount after the function prologue,

Re: [PATCH mm-unstable v2 01/10] mm/kvm: add mmu_notifier_ops->test_clear_young()

2023-06-08 Thread Yu Zhao
On Tue, Jun 6, 2023 at 2:34 AM Tzung-Bi Shih wrote: > > On Fri, May 26, 2023 at 05:44:26PM -0600, Yu Zhao wrote: > > +/* > > + * Architectures that implement kvm_arch_test_clear_young() should override > > + * kvm_arch_has_test_clear_young(). > > + * > > + * kvm_arch_has_test_clear_young() is

kvm/x86: multichase benchmark

2023-06-08 Thread Yu Zhao
TLDR Multichase in 64 microVMs achieved 6% more total samples (in ~4 hours) after this patchset [1]. Hardware HOST $ lscpu Architecture:x86_64 CPU op-mode(s):32-bit, 64-bit Address sizes: 43 bits physical, 48 bits virtual Byte Order:

kvm/arm64: Spark benchmark

2023-06-08 Thread Yu Zhao
TLDR Apache Spark spent 12% less time sorting four billion random integers twenty times (in ~4 hours) after this patchset [1]. Hardware HOST $ lscpu Architecture: aarch64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s):

kvm/powerpc: memcached benchmark

2023-06-08 Thread Yu Zhao
TLDR Memcached achieved 10% more operations per second (in ~4 hours) after this patchset [1]. Hardware HOST $ lscpu Architecture: ppc64le Byte Order: Little Endian CPU(s):184 On-line CPU(s) list: 0-183 Model name:POWER9 (raw),

[PATCH] powerpc/legacy_serial: check CONFIG_SERIAL_8250_CONSOLE

2023-06-08 Thread Randy Dunlap
When SERIAL_8250_CONSOLE is not set but PPC_UDBG_16550=y, the legacy_serial code references fsl8250_handle_irq, which is only built when SERIAL_8250_CONSOLE is set. Be consistent in referencing the used CONFIG_SERIAL_8250* symbols so that the build errors do not happen. Prevents these build

Re: [PATCH v5 25/26] PCI/AER: Forward RCH downstream port-detected errors to the CXL.mem dev handler

2023-06-08 Thread kernel test robot
Hi Terry, kernel test robot noticed the following build errors: [auto build test ERROR on a70fc4ed20a6118837b0aecbbf789074935f473b] url: https://github.com/intel-lab-lkp/linux/commits/Terry-Bowman/cxl-acpi-Probe-RCRB-later-during-RCH-downstream-port-creation/20230608-062818 base

[PATCH v5 3/3] block: sed-opal: keyring support for SED keys

2023-06-08 Thread gjoyce
From: Greg Joyce Extend the SED block driver so it can alternatively obtain a key from a sed-opal kernel keyring. The SED ioctls will indicate the source of the key, either directly in the ioctl data or from the keyring. This allows the use of SED commands in scripts such as udev scripts so

[PATCH v2 23/23] xtensa: add pte_unmap() to balance pte_offset_map()

2023-06-08 Thread Hugh Dickins
To keep balance in future, remember to pte_unmap() after a successful pte_offset_map(). And act as if get_pte_for_vaddr() really needs a map there, to read the pteval before "unmapping", to be sure page table is not removed. Signed-off-by: Hugh Dickins --- arch/xtensa/mm/tlb.c | 5 - 1

[PATCH v2 22/23] x86: sme_populate_pgd() use pte_offset_kernel()

2023-06-08 Thread Hugh Dickins
sme_populate_pgd() is an __init function for sme_encrypt_kernel(): it should use pte_offset_kernel() instead of pte_offset_map(), to avoid the question of whether a pte_unmap() will be needed to balance. Signed-off-by: Hugh Dickins --- arch/x86/mm/mem_encrypt_identity.c | 2 +- 1 file changed,

[PATCH v2 21/23] x86: Allow get_locked_pte() to fail

2023-06-08 Thread Hugh Dickins
In rare transient cases, not yet made possible, pte_offset_map() and pte_offset_map_lock() may not find a page table: handle appropriately. Signed-off-by: Hugh Dickins --- arch/x86/kernel/ldt.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/ldt.c

[PATCH v5 0/3] sed-opal: keyrings, discovery, revert, key store

2023-06-08 Thread gjoyce
From: Greg Joyce Patchset rebased to for-6.5/block This patchset has gone through numerous rounds of review and all comments/suggetions have been addressed. I believe that this patchset is ready for inclusion. TCG SED Opal is a specification from The Trusted Computing Group that allows self

[PATCH v2 20/23] sparc: iounit and iommu use pte_offset_kernel()

2023-06-08 Thread Hugh Dickins
iounit_alloc() and sbus_iommu_alloc() are working from pmd_off_k(), so should use pte_offset_kernel() instead of pte_offset_map(), to avoid the question of whether a pte_unmap() will be needed to balance. Signed-off-by: Hugh Dickins --- arch/sparc/mm/io-unit.c | 2 +- arch/sparc/mm/iommu.c |

[PATCH v2 19/23] sparc: allow pte_offset_map() to fail

2023-06-08 Thread Hugh Dickins
In rare transient cases, not yet made possible, pte_offset_map() and pte_offset_map_lock() may not find a page table: handle appropriately. Signed-off-by: Hugh Dickins --- arch/sparc/kernel/signal32.c | 2 ++ arch/sparc/mm/fault_64.c | 3 +++ arch/sparc/mm/tlb.c | 2 ++ 3 files

[PATCH v2 18/23] sparc/hugetlb: pte_alloc_huge() pte_offset_huge()

2023-06-08 Thread Hugh Dickins
pte_alloc_map() expects to be followed by pte_unmap(), but hugetlb omits that: to keep balance in future, use the recently added pte_alloc_huge() instead; with pte_offset_huge() a better name for pte_offset_kernel(). Signed-off-by: Hugh Dickins --- arch/sparc/mm/hugetlbpage.c | 4 ++-- 1 file

[PATCH v2 17/23] sh/hugetlb: pte_alloc_huge() pte_offset_huge()

2023-06-08 Thread Hugh Dickins
pte_alloc_map() expects to be followed by pte_unmap(), but hugetlb omits that: to keep balance in future, use the recently added pte_alloc_huge() instead; with pte_offset_huge() a better name for pte_offset_kernel(). Signed-off-by: Hugh Dickins --- arch/sh/mm/hugetlbpage.c | 4 ++-- 1 file

[PATCH v7 3/3] powerpc/pseries: PLPKS SED Opal keystore support

2023-06-08 Thread gjoyce
From: Greg Joyce Define operations for SED Opal to read/write keys from POWER LPAR Platform KeyStore(PLPKS). This allows non-volatile storage of SED Opal keys. Signed-off-by: Greg Joyce Reviewed-by: Jonathan Derrick --- arch/powerpc/platforms/pseries/Kconfig| 6 +

[PATCH v7 1/3] block:sed-opal: SED Opal keystore

2023-06-08 Thread gjoyce
From: Greg Joyce Add read and write functions that allow SED Opal keys to stored in a permanent keystore. Signed-off-by: Greg Joyce Reviewed-by: Jonathan Derrick --- block/Makefile | 2 +- block/sed-opal-key.c | 24 include/linux/sed-opal-key.h

[PATCH v7 0/3] generic and PowerPC SED Opal keystore

2023-06-08 Thread gjoyce
From: Greg Joyce Patchset rebase to for-6.5/block This patchset has gone through numerous rounds of review and all comments/suggetions have been addressed. I believe that this patchset is ready for inclusion. TCG SED Opal is a specification from The Trusted Computing Group that allows self

[PATCH v7 2/3] block: sed-opal: keystore access for SED Opal keys

2023-06-08 Thread gjoyce
From: Greg Joyce Allow for permanent SED authentication keys by reading/writing to the SED Opal non-volatile keystore. Signed-off-by: Greg Joyce Reviewed-by: Jonathan Derrick --- block/sed-opal.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git

[PATCH v2 16/23] s390: gmap use pte_unmap_unlock() not spin_unlock()

2023-06-08 Thread Hugh Dickins
pte_alloc_map_lock() expects to be followed by pte_unmap_unlock(): to keep balance in future, pass ptep as well as ptl to gmap_pte_op_end(), and use pte_unmap_unlock() instead of direct spin_unlock() (even though ptep ends up unused inside the macro). Signed-off-by: Hugh Dickins Acked-by:

[PATCH v2 15/23] s390: allow pte_offset_map_lock() to fail

2023-06-08 Thread Hugh Dickins
In rare transient cases, not yet made possible, pte_offset_map() and pte_offset_map_lock() may not find a page table: handle appropriately. Add comment on mm's contract with s390 above __zap_zero_pages(), and fix old comment there: must be called after THP was disabled. Signed-off-by: Hugh

[PATCH v5 1/3] block: sed-opal: Implement IOC_OPAL_DISCOVERY

2023-06-08 Thread gjoyce
From: Greg Joyce Add IOC_OPAL_DISCOVERY ioctl to return raw discovery data to a SED Opal application. This allows the application to display drive capabilities and state. Signed-off-by: Greg Joyce Reviewed-by: Christoph Hellwig Reviewed-by: Jonathan Derrick --- block/sed-opal.c

[PATCH v5 2/3] block: sed-opal: Implement IOC_OPAL_REVERT_LSP

2023-06-08 Thread gjoyce
From: Greg Joyce This is used in conjunction with IOC_OPAL_REVERT_TPR to return a drive to Original Factory State without erasing the data. If IOC_OPAL_REVERT_LSP is called with opal_revert_lsp.options bit OPAL_PRESERVE set prior to calling IOC_OPAL_REVERT_TPR, the drive global locking range

[PATCH v2 14/23] riscv/hugetlb: pte_alloc_huge() pte_offset_huge()

2023-06-08 Thread Hugh Dickins
pte_alloc_map() expects to be followed by pte_unmap(), but hugetlb omits that: to keep balance in future, use the recently added pte_alloc_huge() instead; with pte_offset_huge() a better name for pte_offset_kernel(). Signed-off-by: Hugh Dickins Reviewed-by: Alexandre Ghiti Acked-by: Palmer

[PATCH v2 13/23] powerpc/hugetlb: pte_alloc_huge()

2023-06-08 Thread Hugh Dickins
pte_alloc_map() expects to be followed by pte_unmap(), but hugetlb omits that: to keep balance in future, use the recently added pte_alloc_huge() instead. huge_pte_offset() is using __find_linux_pte(), which is using pte_offset_kernel() - don't rename that to _huge, it's more complicated.

[PATCH v2 12/23] powerpc: allow pte_offset_map[_lock]() to fail

2023-06-08 Thread Hugh Dickins
In rare transient cases, not yet made possible, pte_offset_map() and pte_offset_map_lock() may not find a page table: handle appropriately. Balance successful pte_offset_map() with pte_unmap() where omitted. Signed-off-by: Hugh Dickins --- arch/powerpc/mm/book3s64/hash_tlb.c | 4

[PATCH v2 11/23] powerpc: kvmppc_unmap_free_pmd() pte_offset_kernel()

2023-06-08 Thread Hugh Dickins
kvmppc_unmap_free_pmd() use pte_offset_kernel(), like everywhere else in book3s_64_mmu_radix.c: instead of pte_offset_map(), which will come to need a pte_unmap() to balance it. But note that this is a more complex case than most: see those -EAGAINs in kvmppc_create_pte(), which is coping with

[PATCH v2 10/23] parisc/hugetlb: pte_alloc_huge() pte_offset_huge()

2023-06-08 Thread Hugh Dickins
pte_alloc_map() expects to be followed by pte_unmap(), but hugetlb omits that: to keep balance in future, use the recently added pte_alloc_huge() instead; with pte_offset_huge() a better name for pte_offset_kernel(). Signed-off-by: Hugh Dickins --- arch/parisc/mm/hugetlbpage.c | 4 ++-- 1 file

[PATCH v2 09/23] parisc: unmap_uncached_pte() use pte_offset_kernel()

2023-06-08 Thread Hugh Dickins
unmap_uncached_pte() is working from pgd_offset_k(vaddr), so it should use pte_offset_kernel() instead of pte_offset_map(), to avoid the question of whether a pte_unmap() will be needed to balance. Signed-off-by: Hugh Dickins --- arch/parisc/kernel/pci-dma.c | 2 +- 1 file changed, 1

[PATCH v2 08/23] parisc: add pte_unmap() to balance get_ptep()

2023-06-08 Thread Hugh Dickins
To keep balance in future, remember to pte_unmap() after a successful get_ptep(). And act as if flush_cache_pages() really needs a map there, to read the pfn before "unmapping", to be sure page table is not removed. Signed-off-by: Hugh Dickins --- arch/parisc/kernel/cache.c | 26

[PATCH v2 07/23] mips: update_mmu_cache() can replace __update_tlb()

2023-06-08 Thread Hugh Dickins
Don't make update_mmu_cache() a wrapper around __update_tlb(): call it directly, and use the ptep (or pmdp) provided by the caller, instead of re-calling pte_offset_map() - which would raise a question of whether a pte_unmap() is needed to balance it. Check whether the "ptep" provided by the

[PATCH v2 06/23] microblaze: allow pte_offset_map() to fail

2023-06-08 Thread Hugh Dickins
In rare transient cases, not yet made possible, pte_offset_map() and pte_offset_map_lock() may not find a page table: handle appropriately. Signed-off-by: Hugh Dickins --- arch/microblaze/kernel/signal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v2 05/23] m68k: allow pte_offset_map[_lock]() to fail

2023-06-08 Thread Hugh Dickins
In rare transient cases, not yet made possible, pte_offset_map() and pte_offset_map_lock() may not find a page table: handle appropriately. Restructure cf_tlb_miss() with a pte_unmap() (previously omitted) at label out, followed by one local_irq_restore() for all. Signed-off-by: Hugh Dickins

[PATCH v2 04/23] ia64/hugetlb: pte_alloc_huge() pte_offset_huge()

2023-06-08 Thread Hugh Dickins
pte_alloc_map() expects to be followed by pte_unmap(), but hugetlb omits that: to keep balance in future, use the recently added pte_alloc_huge() instead; with pte_offset_huge() a better name for pte_offset_kernel(). Signed-off-by: Hugh Dickins --- arch/ia64/mm/hugetlbpage.c | 4 ++-- 1 file

[PATCH v2 03/23] arm64/hugetlb: pte_alloc_huge() pte_offset_huge()

2023-06-08 Thread Hugh Dickins
pte_alloc_map() expects to be followed by pte_unmap(), but hugetlb omits that: to keep balance in future, use the recently added pte_alloc_huge() instead; with pte_offset_huge() a better name for pte_offset_kernel(). Signed-off-by: Hugh Dickins Acked-by: Catalin Marinas ---

[PATCH v2 02/23] arm64: allow pte_offset_map() to fail

2023-06-08 Thread Hugh Dickins
In rare transient cases, not yet made possible, pte_offset_map() and pte_offset_map_lock() may not find a page table: handle appropriately. Signed-off-by: Hugh Dickins Acked-by: Catalin Marinas --- arch/arm64/mm/fault.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v2 01/23] arm: allow pte_offset_map[_lock]() to fail

2023-06-08 Thread Hugh Dickins
In rare transient cases, not yet made possible, pte_offset_map() and pte_offset_map_lock() may not find a page table: handle appropriately. Signed-off-by: Hugh Dickins --- arch/arm/lib/uaccess_with_memcpy.c | 3 +++ arch/arm/mm/fault-armv.c | 5 - arch/arm/mm/fault.c

[PATCH v2 00/23] arch: allow pte_offset_map[_lock]() to fail

2023-06-08 Thread Hugh Dickins
Here is v2 series of patches to various architectures, based on v6.4-rc5: preparing for v2 of changes following in mm, affecting pte_offset_map() and pte_offset_map_lock(). There are very few differences from v1: noted patch by patch below. v1 was "arch: allow pte_offset_map[_lock]() to fail"

Re: [PATCH 00/13] mm: jit/text allocator

2023-06-08 Thread Mike Rapoport
On Tue, Jun 06, 2023 at 11:21:59AM -0700, Song Liu wrote: > On Mon, Jun 5, 2023 at 3:09 AM Mark Rutland wrote: > > [...] > > > > > > Can you give more detail on what parameters you need? If the only > > > > > extra > > > > > parameter is just "does this allocation need to live close to kernel

Re: [PATCH v4 RESEND 0/3] sed-opal: keyrings, discovery, revert, key store

2023-06-08 Thread Greg Joyce
On Mon, 2023-06-05 at 15:14 -0600, Jens Axboe wrote: > On 6/1/23 4:37PM, gjo...@linux.vnet.ibm.com wrote: > > From: Greg Joyce > > > > This patchset has gone through numerous rounds of review and > > all comments/suggetions have been addressed. I believe that > > this patchset is ready for

Re: [PATCH 07/12] s390: add pte_free_defer(), with use of mmdrop_async()

2023-06-08 Thread Gerald Schaefer
On Wed, 7 Jun 2023 20:35:05 -0700 (PDT) Hugh Dickins wrote: > On Tue, 6 Jun 2023, Gerald Schaefer wrote: > > On Mon, 5 Jun 2023 22:11:52 -0700 (PDT) > > Hugh Dickins wrote: > > > On Thu, 1 Jun 2023 15:57:51 +0200 > > > Gerald Schaefer wrote: > > > > > > > > Yes, we have 2 pagetables in

Re: [PATCH 07/12] s390: add pte_free_defer(), with use of mmdrop_async()

2023-06-08 Thread Jason Gunthorpe
On Wed, Jun 07, 2023 at 08:35:05PM -0700, Hugh Dickins wrote: > My current thinking (but may be proved wrong) is along the lines of: > why does something on its way to being freed need to be on any list > than the rcu_head list? I expect the current answer is, that the > other half is allocated,

Re: [PATCH 2/7] watchdog/hardlockup: Make the config checks more straightforward

2023-06-08 Thread Doug Anderson
Hi, On Thu, Jun 8, 2023 at 4:02 AM Petr Mladek wrote: > > > > config HARDLOCKUP_DETECTOR > > > bool "Detect Hard Lockups" > > > depends on DEBUG_KERNEL && !S390 > > > - depends on HAVE_HARDLOCKUP_DETECTOR_NON_ARCH || > > > HAVE_HARDLOCKUP_DETECTOR_ARCH > > > +

Re: [PATCH 7/7] watchdog/hardlockup: Define HARDLOCKUP_DETECTOR_ARCH

2023-06-08 Thread Petr Mladek
On Wed 2023-06-07 16:37:10, Doug Anderson wrote: > Hi, > > On Wed, Jun 7, 2023 at 8:26 AM Petr Mladek wrote: > > > > @@ -1102,6 +1103,14 @@ config HARDLOCKUP_DETECTOR_BUDDY > > depends on !HAVE_HARDLOCKUP_DETECTOR_ARCH > > select HARDLOCKUP_DETECTOR_COUNTS_HRTIMER > > > > +config

Re: [PATCH 4/7] watchdog/hardlockup: Enable HAVE_NMI_WATCHDOG only on sparc64

2023-06-08 Thread Petr Mladek
On Wed 2023-06-07 16:36:35, Doug Anderson wrote: > Hi, > > On Wed, Jun 7, 2023 at 8:25 AM Petr Mladek wrote: > > > > diff --git a/arch/Kconfig b/arch/Kconfig > > index 13c6e596cf9e..57f15babe188 100644 > > --- a/arch/Kconfig > > +++ b/arch/Kconfig > > @@ -404,10 +404,9 @@ config

Re: [PATCH v2] security/integrity: fix pointer to ESL data and its size on pseries

2023-06-08 Thread Jarkko Sakkinen
On Thu Jun 8, 2023 at 3:04 PM EEST, Nayna Jain wrote: > On PowerVM guest, variable data is prefixed with 8 bytes of timestamp. > Extract ESL by stripping off the timestamp before passing to ESL parser. > > Fixes: 4b3e71e9a34c ("integrity/powerpc: Support loading keys from PLPKS") > Cc:

Re: [RFC PATCH] asm-generic: Unify uapi bitsperlong.h

2023-06-08 Thread Arnd Bergmann
On Thu, Jun 8, 2023, at 09:04, Tiezhu Yang wrote: > On 05/09/2023 05:37 PM, Arnd Bergmann wrote: >> On Tue, May 9, 2023, at 09:05, Tiezhu Yang wrote: >> >> I think we are completely safe on the architectures that were >> added since the linux-3.x days (arm64, riscv, csky, openrisc, >> loongarch,

[PATCH] KVM: ppc64: Enable ring-based dirty memory tracking

2023-06-08 Thread Kautuk Consul
- Enable CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL as ppc64 is weakly ordered. - Enable CONFIG_NEED_KVM_DIRTY_RING_WITH_BITMAP because the kvmppc_xive_native_set_attr is called in the context of an ioctl syscall and will call kvmppc_xive_native_eq_sync for setting the KVM_DEV_XIVE_EQ_SYNC

[PATCH v2] security/integrity: fix pointer to ESL data and its size on pseries

2023-06-08 Thread Nayna Jain
On PowerVM guest, variable data is prefixed with 8 bytes of timestamp. Extract ESL by stripping off the timestamp before passing to ESL parser. Fixes: 4b3e71e9a34c ("integrity/powerpc: Support loading keys from PLPKS") Cc: sta...@vger.kenrnel.org # v6.3 Signed-off-by: Nayna Jain --- Changelog:

Re: [PATCH 3/7] watchdog/hardlockup: Declare arch_touch_nmi_watchdog() only in linux/nmi.h

2023-06-08 Thread Petr Mladek
On Wed 2023-06-07 16:35:19, Doug Anderson wrote: > Hi, > > On Wed, Jun 7, 2023 at 8:25 AM Petr Mladek wrote: > > > > arch_touch_nmi_watchdog() needs a different implementation for various > > hardlockup detector implementations. And it does nothing when > > any hardlockup detector is not build

Re: [PATCH 2/7] watchdog/hardlockup: Make the config checks more straightforward

2023-06-08 Thread Petr Mladek
On Wed 2023-06-07 16:35:09, Doug Anderson wrote: > Hi, > > On Wed, Jun 7, 2023 at 8:25 AM Petr Mladek wrote: > > > > diff --git a/arch/Kconfig b/arch/Kconfig > > index 422f0ffa269e..13c6e596cf9e 100644 > > --- a/arch/Kconfig > > +++ b/arch/Kconfig > > @@ -404,17 +404,27 @@ config

Re: [PATCH 1/7] watchdog/hardlockup: Sort hardlockup detector related config values a logical way

2023-06-08 Thread Petr Mladek
On Wed 2023-06-07 16:34:20, Doug Anderson wrote: > Hi, > > On Wed, Jun 7, 2023 at 8:25 AM Petr Mladek wrote: > > Only one hardlockup detector can be compiled in. The selection is done > > using quite complex dependencies between several CONFIG variables. > > The following patches will try to

Re: [PATCH v3 30/34] sh: Convert pte_free_tlb() to use ptdescs

2023-06-08 Thread John Paul Adrian Glaubitz
On Wed, 2023-05-31 at 14:30 -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. Also cleans up some spacing issues. > > Signed-off-by: Vishal Moola (Oracle) > --- > arch/sh/include/asm/pgalloc.h | 9 + > 1

[PATCH][next] powerpc/powernv/sriov: perform null check on iov before dereferencing iov

2023-06-08 Thread Colin Ian King
Currently pointer iov is being dereferenced before the null check of iov which can lead to null pointer dereference errors. Fix this by moving the iov null check before the dereferencing. Detected using cppcheck static analysis: linux/arch/powerpc/platforms/powernv/pci-sriov.c:597:12: warning:

[PATCH] powerpc/fadump: reset dump area size variable if memblock reserve fails

2023-06-08 Thread Sourabh Jain
If the memory reservation process (memblock_reserve) fails to reserve the memory, the reserve dump variable retains the dump area size. Consequently, the size of the dump area calculated for reservation is displayed in /sys/kernel/fadump/mem_reserved. To resolve this issue, the reserve dump area

[kvm-unit-tests v4 12/12] powerpc/sprs: Test hypervisor registers on powernv machine

2023-06-08 Thread Nicholas Piggin
This enables HV privilege registers to be tested with the powernv machine. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- powerpc/sprs.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/powerpc/sprs.c b/powerpc/sprs.c index

[kvm-unit-tests v4 11/12] powerpc: Support powernv machine with QEMU TCG

2023-06-08 Thread Nicholas Piggin
This is a basic first pass at powernv support using OPAL (skiboot) firmware. The ACCEL is a bit clunky, defaulting to kvm for powernv machine, which isn't right and has to be manually overridden. It also does not yet run in the run_tests.sh batch process, more work is needed to exclude certain

[kvm-unit-tests v4 10/12] powerpc: Discover runtime load address dynamically

2023-06-08 Thread Nicholas Piggin
The next change will load the kernels at different addresses depending on test options, so this needs to be reverted back to dynamic discovery. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- powerpc/cstart64.S | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-)

[kvm-unit-tests v4 09/12] powerpc: Add support for more interrupts including HV interrupts

2023-06-08 Thread Nicholas Piggin
Interrupt vectors were not being populated for all architected interrupt types, which could lead to crashes rather than a message for unhandled interrupts. 0x20 sized vectors require some reworking of the code to fit. This also adds support for HV / HSRR type interrupts which will be used in a

[kvm-unit-tests v4 08/12] powerpc: Expand exception handler vector granularity

2023-06-08 Thread Nicholas Piggin
Exception handlers are currently indexed in units of 0x100, but powerpc can have vectors that are aligned to as little as 0x20 bytes. Increase granularity of the handler functions before adding support for those vectors. Signed-off-by: Nicholas Piggin --- Since v3: - Fix typo [Thomas]

[kvm-unit-tests v4 07/12] powerpc/spapr_vpa: Add basic VPA tests

2023-06-08 Thread Nicholas Piggin
The VPA is an optional memory structure shared between the hypervisor and operating system, defined by PAPR. This test defines the structure and adds registration, deregistration, and a few simple sanity tests. [Thanks to Thomas Huth for suggesting many of the test cases.] Reviewed-by: Thomas

[kvm-unit-tests v4 06/12] powerpc/sprs: Specify SPRs with data rather than code

2023-06-08 Thread Nicholas Piggin
A significant rework that builds an array of 'struct spr', where each element describes an SPR. This makes various metadata about the SPR like name and access type easier to carry and use. Hypervisor privileged registers are described despite not being used at the moment for completeness, but

[kvm-unit-tests v4 05/12] powerpc: Extract some common helpers and defines to headers

2023-06-08 Thread Nicholas Piggin
Move some common helpers and defines to processor.h. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/processor.h | 38 + powerpc/spapr_hcall.c | 9 + powerpc/sprs.c | 9 - 3 files changed, 35 insertions(+), 21

[kvm-unit-tests v4 04/12] powerpc: Add ISA v3.1 (POWER10) support to SPR test

2023-06-08 Thread Nicholas Piggin
This is a very basic detection that does not include all new SPRs. Reviewed-by: Thomas Huth Signed-off-by: Nicholas Piggin --- powerpc/sprs.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/powerpc/sprs.c b/powerpc/sprs.c index ba4ddee4..6ee6dba6 100644 ---

[kvm-unit-tests v4 03/12] powerpc: Abstract H_CEDE calls into a sleep functions

2023-06-08 Thread Nicholas Piggin
This consolidates several implementations, and it no longer leaves MSR[EE] enabled after the decrementer interrupt is handled, but rather disables it on return. The handler no longer allows a continuous ticking, but rather dec has to be re-armed and EE re-enabled (e.g., via H_CEDE hcall) each

[kvm-unit-tests v4 02/12] powerpc: Add some checking to exception handler install

2023-06-08 Thread Nicholas Piggin
Check to ensure exception handlers are not being overwritten or invalid exception numbers are used. Signed-off-by: Nicholas Piggin --- Since v3: - Simplified code as suggested by Thomas. lib/powerpc/processor.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[kvm-unit-tests v4 01/12] powerpc: Report instruction address and MSR in unhandled exception error

2023-06-08 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- Since v3: - New patch lib/powerpc/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/powerpc/processor.c b/lib/powerpc/processor.c index ec85b9d8..05b4b04f 100644 --- a/lib/powerpc/processor.c +++ b/lib/powerpc/processor.c @@

[kvm-unit-tests v4 00/12] powerpc: updates, P10, PNV support

2023-06-08 Thread Nicholas Piggin
Posting again, a couple of patches were merged and accounted for review comments from last time. Thanks, Nick Nicholas Piggin (12): powerpc: Report instruction address and MSR in unhandled exception error powerpc: Add some checking to exception handler install powerpc: Abstract H_CEDE

Re: [RFC PATCH] asm-generic: Unify uapi bitsperlong.h

2023-06-08 Thread Tiezhu Yang
Hi all, On 05/09/2023 05:37 PM, Arnd Bergmann wrote: On Tue, May 9, 2023, at 09:05, Tiezhu Yang wrote: Now we specify the minimal version of GCC as 5.1 and Clang/LLVM as 11.0.0 in Documentation/process/changes.rst, __CHAR_BIT__ and __SIZEOF_LONG__ are usable, just define __BITS_PER_LONG as