Re: [PATCH 3/6] powerpc/64s: Use htab_convert_pte_flags() in hash__mark_rodata_ro()

2021-02-15 Thread Daniel Axtens
Hi Michael, > In hash__mark_rodata_ro() we pass the raw PP_RXXX value to > hash__change_memory_range(). That has the effect of setting the key to > zero, because PP_RXXX contains no key value. > > Fix it by using htab_convert_pte_flags(), which knows how to convert a > pgprot into a pp value, incl

Re: [PATCH 2/6] powerpc/pseries: Add key to flags in pSeries_lpar_hpte_updateboltedpp()

2021-02-15 Thread Daniel Axtens
Michael Ellerman writes: > The flags argument to plpar_pte_protect() (aka. H_PROTECT), includes > the key in bits 9-13, but currently we always set those bits to zero. > > In the past that hasn't been a problem because we always used key 0 > for the kernel, and updateboltedpp() is only used for k

[PATCH kernel 2/2] powerpc/iommu: Do not immediately panic when failed IOMMU table allocation

2021-02-15 Thread Alexey Kardashevskiy
Most platforms allocate IOMMU table structures (specifically it_map) at the boot time and when this fails - it is a valid reason for panic(). However the powernv platform allocates it_map after a device is returned to the host OS after being passed through and this happens long after the host OS b

[PATCH kernel 0/2] powerpc/iommu: Stop crashing the host when VM is terminated

2021-02-15 Thread Alexey Kardashevskiy
Killing a VM on a host under memory pressure kills a host which is annoying. 1/2 reduces the chances, 2/2 eliminates panic() on ioda2. This is based on sha1 f40ddce88593 Linus Torvalds "Linux 5.11". Please comment. Thanks. Alexey Kardashevskiy (2): powerpc/iommu: Allocate it_map by vmalloc

[PATCH kernel 1/2] powerpc/iommu: Allocate it_map by vmalloc

2021-02-15 Thread Alexey Kardashevskiy
The IOMMU table uses the it_map bitmap to keep track of allocated DMA pages. This has always been a contiguous array allocated at either the boot time or when a passed through device is returned to the host OS. The it_map memory is allocated by alloc_pages() which allocates contiguous physical memo

[PATCH kernel] powerpc/iommu: Annotate nested lock for lockdep

2021-02-15 Thread Alexey Kardashevskiy
The IOMMU table is divided into pools for concurrent mappings and each pool has a separate spinlock. When taking the ownership of an IOMMU group to pass through a device to a VM, we lock these spinlocks which triggers a false negative warning in lockdep (below). This fixes it by annotating the lar

Re: [PATCH kernel] powerpc/perf: Stop crashing with generic_compat_pmu

2021-02-15 Thread Alexey Kardashevskiy
On 03/12/2020 16:27, Madhavan Srinivasan wrote: On 12/2/20 8:31 AM, Alexey Kardashevskiy wrote: Hi Maddy, I just noticed that I still have "powerpc/perf: Add checks for reserved values" in my pile (pushed here https://github.com/aik/linux/commit/61e1bc3f2e19d450e2e2d39174d422160b21957b )

Re: [PATCH v18 03/11] of: Add a common kexec FDT setup function

2021-02-15 Thread Thiago Jung Bauermann
Lakshmi Ramasubramanian writes: > From: Rob Herring > > Both arm64 and powerpc do essentially the same FDT /chosen setup for > kexec. The differences are either omissions that arm64 should have > or additional properties that will be ignored. The setup code can be > combined and shared by bo

Re: [PATCH v18 06/11] powerpc: Move ima buffer fields to struct kimage

2021-02-15 Thread Thiago Jung Bauermann
Lakshmi Ramasubramanian writes: > The fields ima_buffer_addr and ima_buffer_size in "struct kimage_arch" > for powerpc are used to carry forward the IMA measurement list across > kexec system call. These fields are not architecture specific, but are > currently limited to powerpc. > > arch_ima

Re: [PATCH v18 05/11] powerpc: Use common of_kexec_alloc_and_setup_fdt()

2021-02-15 Thread Thiago Jung Bauermann
Lakshmi Ramasubramanian writes: > From: Rob Herring > > The code for setting up the /chosen node in the device tree > and updating the memory reservation for the next kernel has been > moved to of_kexec_alloc_and_setup_fdt() defined in "drivers/of/kexec.c". > > Use the common of_kexec_alloc_an

Re: [PATCH v18 04/11] arm64: Use common of_kexec_alloc_and_setup_fdt()

2021-02-15 Thread Thiago Jung Bauermann
Lakshmi Ramasubramanian writes: > From: Rob Herring > > The code for setting up the /chosen node in the device tree > and updating the memory reservation for the next kernel has been > moved to of_kexec_alloc_and_setup_fdt() defined in "drivers/of/kexec.c". > > Use the common of_kexec_alloc_an

Re: [PATCH v18 01/11] powerpc: Rename kexec elfcorehdr_addr to elf_load_addr

2021-02-15 Thread Thiago Jung Bauermann
Lakshmi Ramasubramanian writes: > From: Rob Herring > > The architecture specific field, elfcorehdr_addr in struct kimage_arch, > that holds the address of the buffer in memory for ELF core header for > powerpc has a different name than the one used for x86_64. This makes > it hard to have a

Re: [PATCH v18 02/11] arm64: Rename kexec elf_headers_mem to elf_load_addr

2021-02-15 Thread Thiago Jung Bauermann
Lakshmi Ramasubramanian writes: > The architecture specific field, elf_headers_mem in struct kimage_arch, > that holds the address of the buffer in memory for ELF core header for > arm64 has a different name than the one used for powerpc. This makes > it hard to have a common code for setting

Re: [PATCH 1/4] add generic builtin command line

2021-02-15 Thread Daniel Gimpelevich
On Thu, 2019-03-21 at 15:15 -0700, Andrew Morton wrote: > On Thu, 21 Mar 2019 08:13:08 -0700 Daniel Walker wrote: > > On Wed, Mar 20, 2019 at 08:14:33PM -0700, Andrew Morton wrote: > > > The patches (or some version of them) are already in linux-next, > > > which messes me up. I'll disable them f

Re: [PATCH 1/4] ibmvfc: simplify handling of sub-CRQ initialization

2021-02-15 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center

Re: [PATCH for 5.10] powerpc/32: Preserve cr1 in exception prolog stack check to fix build error

2021-02-15 Thread Greg KH
On Fri, Feb 12, 2021 at 08:57:14AM +, Christophe Leroy wrote: > This is backport of 3642eb21256a ("powerpc/32: Preserve cr1 in > exception prolog stack check to fix build error") for kernel 5.10 > > It fixes the build failure on v5.10 reported by kernel test robot > and by David Michael. > >

Re: [PATCH v4 1/3] powerpc/book3s64/radix/tlb: tlbie primitives for process-scoped invalidations from guests

2021-02-15 Thread kernel test robot
use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Bharata-B-Rao/Support-for-H_RPT_INVALIDATE-in-PowerPC-KVM/20210215-143815 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next config: powerpc64-randc

Re: [PATCH 00/27] arch: syscalls: unifiy all syscalltbl.sh into scripts/syscalltbl.sh

2021-02-15 Thread Masahiro Yamada
On Thu, Jan 28, 2021 at 9:51 AM Masahiro Yamada wrote: > > > As of v5.11-rc1, 12 architectures duplicate similar shell scripts: > > $ find arch -name syscalltbl.sh | sort > arch/alpha/kernel/syscalls/syscalltbl.sh > arch/arm/tools/syscalltbl.sh > arch/ia64/kernel/syscalls/syscalltbl.sh >

[PATCH v2] powerpc/pseries: Don't enforce MSI affinity with kdump

2021-02-15 Thread Greg Kurz
Depending on the number of online CPUs in the original kernel, it is likely for CPU #0 to be offline in a kdump kernel. The associated IRQs in the affinity mappings provided by irq_create_affinity_masks() are thus not started by irq_startup(), as per-design with managed IRQs. This can be a problem