Re: [PATCH v2 2/4] powerpc/sstep: support emulation for vsx vector paired storage access instructions

2020-07-16 Thread Ravi Bangoria
Hi Bala, @@ -709,6 +722,8 @@ void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, reg->d[0] = reg->d[1] = 0; switch (op->element_size) { + case 32: + /* [p]lxvp[x] or [p]stxvp[x] */ This function does not emulate stvxp case 16:

[PATCH v4 0/7] Remove default DMA window before creating DDW

2020-07-16 Thread Leonardo Bras
There are some devices in which a hypervisor may only allow 1 DMA window to exist at a time, and in those cases, a DDW is never created to them, since the default DMA window keeps using this resource. LoPAR recommends this procedure: 1. Remove the default DMA window, 2. Query for which configs the

[PATCH v4 1/7] powerpc/pseries/iommu: Create defines for operations in ibm, ddw-applicable

2020-07-16 Thread Leonardo Bras
Create defines to help handling ibm,ddw-applicable values, avoiding confusion about the index of given operations. Signed-off-by: Leonardo Bras --- arch/powerpc/platforms/pseries/iommu.c | 43 -- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/arch/powerpc

[PATCH v4 2/7] powerpc/pseries/iommu: Update call to ibm, query-pe-dma-windows

2020-07-16 Thread Leonardo Bras
>From LoPAR level 2.8, "ibm,ddw-extensions" index 3 can make the number of outputs from "ibm,query-pe-dma-windows" go from 5 to 6. This change of output size is meant to expand the address size of largest_available_block PE TCE from 32-bit to 64-bit, which ends up shifting page_size and migration_

[PATCH v4 3/7] powerpc/pseries/iommu: Move window-removing part of remove_ddw into remove_dma_window

2020-07-16 Thread Leonardo Bras
Move the window-removing part of remove_ddw into a new function (remove_dma_window), so it can be used to remove other DMA windows. It's useful for removing DMA windows that don't create DIRECT64_PROPNAME property, like the default DMA window from the device, which uses "ibm,dma-window". Signed-o

[PATCH v4 4/7] powerpc/pseries/iommu: Remove default DMA window before creating DDW

2020-07-16 Thread Leonardo Bras
On LoPAR "DMA Window Manipulation Calls", it's recommended to remove the default DMA window for the device, before attempting to configure a DDW, in order to make the maximum resources available for the next DDW to be created. This is a requirement for using DDW on devices in which hypervisor allo

[PATCH v4 5/7] powerpc/iommu: Move iommu_table cleaning routine to iommu_table_clean

2020-07-16 Thread Leonardo Bras
Move the part of iommu_table_free() that does struct iommu_table cleaning into iommu_table_clean, so we can invoke it separately. This new function is useful for cleaning struct iommu_table before initializing it again with a new DMA window, without having it freed and allocated again. Signed-off

[PATCH v4 6/7] powerpc/pseries/iommu: Make use of DDW even if it does not map the partition

2020-07-16 Thread Leonardo Bras
As of today, if the biggest DDW that can be created can't map the whole partition, it's creation is skipped and the default DMA window "ibm,dma-window" is used instead. Usually this DDW is bigger than the default DMA window, and it performs better, so it would be nice to use it instead. The DDW c

[PATCH v4 7/7] powerpc/pseries/iommu: Rename "direct window" to "dma window"

2020-07-16 Thread Leonardo Bras
A previous change introduced the usage of DDW as a bigger indirect DMA mapping when the DDW available size does not map the whole partition. As most of the code that manipulates direct mappings was reused for indirect mappings, it's necessary to rename all names and debug/info messages to reflect

[powerpc:merge] BUILD SUCCESS 58a4eb09c4aebaaffa8b4517c71543a41539c096

2020-07-16 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git merge branch HEAD: 58a4eb09c4aebaaffa8b4517c71543a41539c096 Automatic merge of 'master', 'next' and 'fixes' (2020-07-15 23:12) elapsed time: 1031m configs tested: 94 configs skipped: 4 The following configs have b

RE: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-16 Thread David Laight
From: Benjamin Herrenschmidt > Sent: 15 July 2020 23:49 > On Wed, 2020-07-15 at 17:12 -0500, Bjorn Helgaas wrote: > > > I've 'played' with PCIe error handling - without much success. > > > What might be useful is for a driver that has just read ~0u to > > > be able to ask 'has there been an error s

Re: [PATCH v3] powerpc/pseries: detect secure and trusted boot state of the system.

2020-07-16 Thread Michal Suchánek
On Wed, Jul 15, 2020 at 07:52:01AM -0400, Nayna Jain wrote: > The device-tree property to check secure and trusted boot state is > different for guests(pseries) compared to baremetal(powernv). > > This patch updates the existing is_ppc_secureboot_enabled() and > is_ppc_trustedboot_enabled() functi

RE: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-16 Thread David Laight
From: Bjorn Helgaas > Sent: 15 July 2020 23:02 > > On Wed, Jul 15, 2020 at 02:24:21PM +, David Laight wrote: > > From: Arnd Bergmann > > > Sent: 15 July 2020 07:47 > > > On Wed, Jul 15, 2020 at 1:46 AM Bjorn Helgaas wrote: > > > > > > So something like: > > > > > > > > void pci_read_config

[RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-16 Thread Ram Pai
An instruction accessing a mmio address, generates a HDSI fault. This fault is appropriately handled by the Hypervisor. However in the case of secureVMs, the fault is delivered to the ultravisor. Unfortunately the Ultravisor has no correct-way to fetch the faulting instruction. The PEF architect

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Peter Zijlstra
On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: > > On Jul 15, 2020, at 9:15 PM, Nicholas Piggin wrote: > > CPU0 CPU1 > > 1. user stuff > > a. membarrier() 2. enter kernel > > b. read rq->curr 3. rq->curr switched to kt

Re: [PATCH] pseries: Fix 64 bit logical memory block panic

2020-07-16 Thread Paul Mackerras
On Wed, Jul 15, 2020 at 06:12:25PM +0530, Aneesh Kumar K.V wrote: > Anton Blanchard writes: > > > Booting with a 4GB LMB size causes us to panic: > > > > qemu-system-ppc64: OS terminated: OS panic: > > Memory block size not suitable: 0x0 > > > > Fix pseries_memory_block_size() to handle 6

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Nicholas Piggin
Excerpts from Peter Zijlstra's message of July 16, 2020 6:50 pm: > On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: >> > On Jul 15, 2020, at 9:15 PM, Nicholas Piggin wrote: > >> > CPU0 CPU1 >> > 1. user stuff >> > a. membarrier()

[PATCH -next] powerpc: Convert to DEFINE_SHOW_ATTRIBUTE

2020-07-16 Thread Qinglang Miao
From: Chen Huang Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Chen Huang --- arch/powerpc/kvm/book3s_xive_native.c | 12 +--- arch/powerpc/mm/ptdump/bats.c | 24 +++- arch/powerpc/mm/ptdump/hashpagetable.c | 12 +--- arch/po

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread peterz
On Thu, Jul 16, 2020 at 08:03:36PM +1000, Nicholas Piggin wrote: > Excerpts from Peter Zijlstra's message of July 16, 2020 6:50 pm: > > On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: > >> > On Jul 15, 2020, at 9:15 PM, Nicholas Piggin wrote: > >> But I’m wondering if all this de

[PATCH 0/5] Improvements to pkey tests

2020-07-16 Thread Sandipan Das
Based on recent bugs found in the pkey infrastructure, this improves the test for execute-disabled pkeys and adds a new test for detecting inconsistencies with the pkey reported by the signal information upon getting a fault. Sandipan Das (5): selftests/powerpc: Move pkey helpers to headers se

[PATCH 1/5] selftests/powerpc: Move pkey helpers to headers

2020-07-16 Thread Sandipan Das
This moves all the pkey-related helpers to a new header file and also a helper to print error messages in signal handlers to the existing utils header file. Signed-off-by: Sandipan Das --- .../testing/selftests/powerpc/include/pkeys.h | 108 ++ .../testing/selftests/powerpc/inclu

[PATCH 2/5] selftests/powerpc: Add pkey helpers for rights

2020-07-16 Thread Sandipan Das
This adds some new pkey-related helper to print access rights of a pkey in the "rwx" format and to generate different valid combinations of pkey rights starting from a given combination. Signed-off-by: Sandipan Das --- .../testing/selftests/powerpc/include/pkeys.h | 28 +++ .../selft

[PATCH 3/5] selftests/powerpc: Harden test for execute-disabled pkeys

2020-07-16 Thread Sandipan Das
Commit 192b6a7805989 ("powerpc/book3s64/pkeys: Fix pkey_access_permitted() for execute disable pkey") fixed a bug that caused repetitive faults for pkeys with no execute rights alongside some combination of read and write rights. This removes the last two cases of the test, which check the behavio

[PATCH 4/5] selftests/powerpc: Add helper to exit on failure

2020-07-16 Thread Sandipan Das
This adds a helper similar to FAIL_IF() which lets a program exit with code 1 (to indicate failure) when the given condition is true. Signed-off-by: Sandipan Das --- tools/testing/selftests/powerpc/include/utils.h | 9 + 1 file changed, 9 insertions(+) diff --git a/tools/testing/selftes

[PATCH 5/5] selftests/powerpc: Add test for pkey siginfo verification

2020-07-16 Thread Sandipan Das
Commit c46241a370a61 ("powerpc/pkeys: Check vma before returning key fault error to the user") fixes a bug which causes the kernel to set the wrong pkey in siginfo when a pkey fault occurs after two competing threads that have allocated different pkeys, one fully permissive and the other restrictiv

[PATCH] selftests/powerpc: Run per_event_excludes test on Power8 or later

2020-07-16 Thread Michael Ellerman
The per_event_excludes test wants to run on Power8 or later. But currently it checks that AT_BASE_PLATFORM *equals* power8, which means it only runs on Power8. Fix it to check for the ISA 2.07 feature, which will be set on Power8 and later CPUs. Signed-off-by: Michael Ellerman --- tools/testing

Re: [PATCH] powerpc/book3s64/pkeys: Fix pkey_access_permitted w.r.t execute disable pkey

2020-07-16 Thread Michael Ellerman
On Sun, 12 Jul 2020 18:50:47 +0530, Aneesh Kumar K.V wrote: > Even if the IAMR value deny the execute access, current kernel return true > w.r.t pkey_access_permitted() for execute permission check if the AMR > read pkey bit is cleared. > > This results in repeated page fault loop with a test like

Re: [PATCH V2 1/2] powerpc/vas: Report proper error code for address translation failure

2020-07-16 Thread Michael Ellerman
On Fri, 10 Jul 2020 16:47:19 -0700, Haren Myneni wrote: > P9 DD2 NX workbook (Table 4-36) says DMA controller uses CC=5 > internally for translation fault handling. NX reserves CC=250 for > OS to notify user space when NX encounters address translation > failure on the request buffer. Not an issue

Re: [PATCH V2] powerpc/pseries/svm: Remove unwanted check for shared_lppaca_size

2020-07-16 Thread Michael Ellerman
On Fri, 19 Jun 2020 12:31:13 +0530, Satheesh Rajendran wrote: > Early secure guest boot hits the below crash while booting with > vcpus numbers aligned with page boundary for PAGE size of 64k > and LPPACA size of 1k i.e 64, 128 etc, due to the BUG_ON assert > for shared_lppaca_total_size equal to s

Re: [PATCH v7 0/7] Support new pmem flush and sync instructions for POWER

2020-07-16 Thread Michael Ellerman
On Wed, 1 Jul 2020 12:52:28 +0530, Aneesh Kumar K.V wrote: > This patch series enables the usage os new pmem flush and sync instructions > on POWER > architecture. POWER10 introduces two new variants of dcbf instructions > (dcbstps and dcbfps) > that can be used to write modified locations back t

Re: [PATCH] powerpc: Add cputime_to_nsecs()

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 18:36:01 +1000, Anton Blanchard wrote: > Generic code has a wrapper to implement cputime_to_nsecs() on top of > cputime_to_usecs() but we can easily return the full nanosecond > resolution directly. Applied to powerpc/next. [1/1] powerpc: Add cputime_to_nsecs() https://g

Re: [PATCH] powerpc/vdso: Fix vdso cpu truncation

2020-07-16 Thread Michael Ellerman
On Thu, 16 Jul 2020 09:37:04 +1000, Anton Blanchard wrote: > The code in vdso_cpu_init that exposes the cpu and numa node to > userspace via SPRG_VDSO incorrctly masks the cpu to 12 bits. This means > that any kernel running on a box with more than 4096 threads (NR_CPUS > advertises a limit of of 8

Re: [PATCH] xmon: Reset RCU and soft lockup watchdogs

2020-07-16 Thread Michael Ellerman
On Tue, 30 Jun 2020 10:02:18 +1000, Anton Blanchard wrote: > I'm seeing RCU warnings when exiting xmon. xmon resets the NMI watchdog, > but does nothing with the RCU stall or soft lockup watchdogs. Add a > helper function that handles all three. Applied to powerpc/next. [1/1] powerpc/xmon: Reset

Re: [PATCH] pseries: Fix 64 bit logical memory block panic

2020-07-16 Thread Michael Ellerman
On Wed, 15 Jul 2020 10:08:20 +1000, Anton Blanchard wrote: > Booting with a 4GB LMB size causes us to panic: > > qemu-system-ppc64: OS terminated: OS panic: > Memory block size not suitable: 0x0 > > Fix pseries_memory_block_size() to handle 64 bit LMBs. Applied to powerpc/next. [1/1] ps

Re: [PATCH v2 0/6] consolidate PowerPC instruction encoding macros

2020-07-16 Thread Michael Ellerman
On Wed, 24 Jun 2020 17:00:32 +0530, Balamuruhan S wrote: > ppc-opcode.h have base instruction encoding wrapped with stringify_in_c() > for raw encoding to have compatibility. But there are redundant macros for > base instruction encodings in bpf, instruction emulation test infrastructure > and powe

Re: [PATCH] powerpc/spufs: add CONFIG_COREDUMP dependency

2020-07-16 Thread Michael Ellerman
On Mon, 6 Jul 2020 15:22:46 +0200, Arnd Bergmann wrote: > The kernel test robot pointed out a slightly different error message > after recent commit 5456ffdee666 ("powerpc/spufs: simplify spufs core > dumping") to spufs for a configuration that never worked: > >powerpc64-linux-ld: arch/powerpc

Re: [PATCH v3 0/3] Off-load TLB invalidations to host for !GTSE

2020-07-16 Thread Michael Ellerman
On Fri, 3 Jul 2020 11:06:05 +0530, Bharata B Rao wrote: > Hypervisor may choose not to enable Guest Translation Shootdown Enable > (GTSE) option for the guest. When GTSE isn't ON, the guest OS isn't > permitted to use instructions like tblie and tlbsync directly, but is > expected to make hyperviso

Re: [PATCH v2] powerpc: Drop CONFIG_MTD_M25P80 in 85xx-hw.config

2020-07-16 Thread Michael Ellerman
On Fri, 1 May 2020 21:44:54 -0700, Bin Meng wrote: > Drop CONFIG_MTD_M25P80 that was removed in > commit b35b9a10362d ("mtd: spi-nor: Move m25p80 code in spi-nor.c") Applied to powerpc/next. [1/1] powerpc: Drop CONFIG_MTD_M25P80 in 85xx-hw.config https://git.kernel.org/powerpc/c/76f09371bc0

Re: [PATCH 1/2] powerpc/signal_32: Remove !FULL_REGS() special handling in PPC64 save_general_regs()

2020-07-16 Thread Michael Ellerman
On Tue, 7 Jul 2020 12:33:35 + (UTC), Christophe Leroy wrote: > Since commit ("1bd79336a426 powerpc: Fix various > syscall/signal/swapcontext bugs"), getting save_general_regs() called > without FULL_REGS() is very unlikely and generates a warning. > > The 32-bit version of save_general_regs()

Re: [PATCH v8 0/8] powerpc: switch VDSO to C implementation

2020-07-16 Thread Michael Ellerman
On Tue, 28 Apr 2020 13:16:46 + (UTC), Christophe Leroy wrote: > This is the seventh version of a series to switch powerpc VDSO to > generic C implementation. > > Main changes since v7 are: > - Added gettime64 on PPC32 > > This series applies on today's powerpc/merge branch. > > [...] Patch

Re: [PATCH] docs: powerpc: Clarify book3s/32 MMU families

2020-07-16 Thread Michael Ellerman
On Thu, 2 Jul 2020 14:09:21 + (UTC), Christophe Leroy wrote: > Documentation wrongly tells that book3s/32 CPU have hash MMU. > > 603 and e300 core only have software loaded TLB. > > 755, 7450 family and e600 core have both hash MMU and software loaded > TLB. This can be selected by setting a

Re: [PATCH 1/2] Revert "powerpc/kasan: Fix shadow pages allocation failure"

2020-07-16 Thread Michael Ellerman
On Thu, 2 Jul 2020 11:52:02 + (UTC), Christophe Leroy wrote: > This reverts commit d2a91cef9bbdeb87b7449fdab1a6be6000930210. > > This commit moved too much work in kasan_init(). The allocation > of shadow pages has to be moved for the reason explained in that > patch, but the allocation of pag

Re: [PATCH] selftests/powerpc: Purge extra count_pmc() calls of ebb selftests

2020-07-16 Thread Michael Ellerman
On Fri, 26 Jun 2020 13:47:37 -0300, Desnes A. Nunes do Rosario wrote: > An extra count on ebb_state.stats.pmc_count[PMC_INDEX(pmc)] is being per- > formed when count_pmc() is used to reset PMCs on a few selftests. This > extra pmc_count can occasionally invalidate results, such as the ones from > c

Re: [PATCH] powerpc/signal64: Don't opencode page prefaulting

2020-07-16 Thread Michael Ellerman
On Tue, 7 Jul 2020 18:32:25 + (UTC), Christophe Leroy wrote: > Instead of doing a __get_user() from the first and last location > into a tmp var which won't be used, use fault_in_pages_readable() Applied to powerpc/next. [1/1] powerpc/signal64: Don't opencode page prefaulting https://gi

Re: [PATCH v5] ocxl: control via sysfs whether the FPGA is reloaded on a link reset

2020-07-16 Thread Michael Ellerman
On Fri, 19 Jun 2020 16:04:39 +0200, Frederic Barrat wrote: > Some opencapi FPGA images allow to control if the FPGA should be reloaded > on the next adapter reset. If it is supported, the image specifies it > through a Vendor Specific DVSEC in the config space of function 0. Applied to powerpc/nex

Re: [PATCH] ocxl: Replace HTTP links with HTTPS ones

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 19:55:06 +0200, Alexander A. Klimov wrote: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If doesn't con

Re: [PATCH] powerpc/Kconfig: Replace HTTP links with HTTPS ones

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 21:26:56 +0200, Alexander A. Klimov wrote: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If doesn't con

Re: [PATCH] cpuidle/powernv : Remove dead code block

2020-07-16 Thread Michael Ellerman
On Mon, 6 Jul 2020 00:32:58 -0500, Abhishek Goel wrote: > Commit 1961acad2f88559c2cdd2ef67c58c3627f1f6e54 removes usage of > function "validate_dt_prop_sizes". This patch removes this unused > function. Applied to powerpc/next. [1/1] cpuidle/powernv : Remove dead code block https://git.kern

Re: [PATCH v5 0/2] Add cpu hotplug support for powerpc/perf/hv-24x7

2020-07-16 Thread Michael Ellerman
On Thu, 9 Jul 2020 10:48:34 +0530, Kajol Jain wrote: > This patchset add cpu hotplug support for hv_24x7 driver by adding > online/offline cpu hotplug function. It also add sysfs file > "cpumask" to expose current online cpu that can be used for > hv_24x7 event count. > > Changelog: > v4 -> v5 > -

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-07-16 Thread Michael Ellerman
On Tue, 23 Jun 2020 20:59:20 -0700, Nathan Chancellor wrote: > Clang warns: > > arch/powerpc/boot/main.c:107:18: warning: array comparison always > evaluates to a constant [-Wtautological-compare] > if (_initrd_end > _initrd_start) { > ^ > arch/powerpc/boot/main.c:1

Re: [PATCH v2] powerpc/perf: Add kernel support for new MSR[HV PR] bits in trace-imc

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 20:16:23 +0530, Madhavan Srinivasan wrote: > IMC trace-mode record has MSR[HV PR] bits added in the third DW. > These bits can be used to set the cpumode for the instruction pointer > captured in each sample. > > Add support in kernel to use these bits to set the cpumode for >

Re: [PATCH] powerpc/boot/dts: Fix dtc "pciex" warnings

2020-07-16 Thread Michael Ellerman
On Tue, 23 Jun 2020 23:03:20 +1000, Michael Ellerman wrote: > With CONFIG_OF_ALL_DTBS=y, as set by eg. allmodconfig, we see lots of > warnings about our dts files, such as: > > arch/powerpc/boot/dts/glacier.dts:492.26-532.5: > Warning (pci_bridge): /plb/pciex@d: node name is not "pci"

Re: [PATCH 00/18] remove extended cede offline mode and bogus topology update code

2020-07-16 Thread Michael Ellerman
On Fri, 12 Jun 2020 00:12:20 -0500, Nathan Lynch wrote: > Two major parts to this series: > > 1. Removal of the extended cede offline mode for CPUs as well as the >partition suspend code which accommodates it by temporarily >onlining all CPUs prior to suspending the LPAR. This solves some

Re: [PATCH v2] powerpc/64/signal: balance return predictor stack in signal trampoline

2020-07-16 Thread Michael Ellerman
On Mon, 11 May 2020 20:19:52 +1000, Nicholas Piggin wrote: > Returning from an interrupt or syscall to a signal handler currently > begins execution directly at the handler's entry point, with LR set to > the address of the sigreturn trampoline. When the signal handler > function returns, it runs t

Re: [PATCH 0/7] powerpc: branch cache flush changes

2020-07-16 Thread Michael Ellerman
On Tue, 9 Jun 2020 17:06:03 +1000, Nicholas Piggin wrote: > This series allows the link stack to be flushed with the speical > bcctr 2,0,0 flush instruction that also flushes the count cache if > the processor supports it. > > Firmware does not support this at the moment, but I've tested it in > s

Re: [PATCH v3 0/3] selftests: powerpc: Fixes and execute-disable test for pkeys

2020-07-16 Thread Michael Ellerman
On Thu, 4 Jun 2020 18:26:07 +0530, Sandipan Das wrote: > This fixes the way the Authority Mask Register (AMR) is updated > by the existing pkey tests and adds a new test to verify the > functionality of execute-disabled pkeys. > > Previous versions can be found at: > v2: > https://lore.kernel.org

Re: [PATCH v3] powerpc/pseries: detect secure and trusted boot state of the system.

2020-07-16 Thread Michael Ellerman
On Wed, 15 Jul 2020 07:52:01 -0400, Nayna Jain wrote: > The device-tree property to check secure and trusted boot state is > different for guests(pseries) compared to baremetal(powernv). > > This patch updates the existing is_ppc_secureboot_enabled() and > is_ppc_trustedboot_enabled() functions to

Re: [PATCH 1/2] powerpc/powernv: Make pnv_pci_sriov_enable() and friends static

2020-07-16 Thread Michael Ellerman
On Sun, 5 Jul 2020 23:35:56 +1000, Oliver O'Halloran wrote: > The kernel test robot noticed these are non-static which causes Clang to > print some warnings. These are called via ppc_md function pointers so > there's no need for them to be non-static. Applied to powerpc/next. [1/2] powerpc/powern

Re: [PATCH 1/3] powerpc/64s: restore_math remove TM test

2020-07-16 Thread Michael Ellerman
On Wed, 24 Jun 2020 09:41:37 +1000, Nicholas Piggin wrote: > The TM test in restore_math added by commit dc16b553c949e ("powerpc: > Always restore FPU/VEC/VSX if hardware transactional memory in use") is > no longer necessary after commit a8318c13e79ba ("powerpc/tm: Fix > restoring FP/VMX facility

Re: [PATCH 1/1] MAINTAINERS: Remove self

2020-07-16 Thread Michael Ellerman
On Tue, 30 Jun 2020 08:50:44 +1000, Sam Bobroff wrote: > I'm sorry to say I can no longer maintain this position. Applied to powerpc/next. [1/1] MAINTAINERS: Remove self from powerpc EEH https://git.kernel.org/powerpc/c/a984c1f2e49225b40f1d0d20d383ec27d4d0 cheers

Re: [PATCH v6] powerpc/fadump: fix race between pstore write and fadump crash trigger

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 10:54:35 +0530, Sourabh Jain wrote: > When we enter into fadump crash path via system reset we fail to update > the pstore. > > On the system reset path we first update the pstore then we go for fadump > crash. But the problem here is when all the CPUs try to get the pstore > l

Re: [PATCH -next] powerpc/xive: Remove unused inline function xive_kexec_teardown_cpu()

2020-07-16 Thread Michael Ellerman
On Wed, 15 Jul 2020 10:50:40 +0800, YueHaibing wrote: > commit e27e0a94651e ("powerpc/xive: Remove xive_kexec_teardown_cpu()") > left behind this, remove it. Applied to powerpc/next. [1/1] powerpc/xive: Remove unused inline function xive_kexec_teardown_cpu() https://git.kernel.org/powerpc/c

Re: [PATCH -next] cpuidle/pseries: Make symbol 'pseries_idle_driver' static

2020-07-16 Thread Michael Ellerman
On Tue, 14 Jul 2020 22:24:24 +0800, Wei Yongjun wrote: > The sparse tool complains as follows: > > drivers/cpuidle/cpuidle-pseries.c:25:23: warning: > symbol 'pseries_idle_driver' was not declared. Should it be static? > > 'pseries_idle_driver' is not used outside of this file, so marks > it sta

Re: [PATCH 0/3] Implement shared_cpu_list for powerpc

2020-07-16 Thread Michael Ellerman
On Mon, 29 Jun 2020 16:07:00 +0530, Srikar Dronamraju wrote: > shared_cpu_list sysfs file is missing in powerpc and shared_cpu_map gives an > extra newline character. > > Before this patchset > # ls /sys/devices/system/cpu0/cache/index1 > coherency_line_size number_of_sets size ways_of_associat

Re: [PATCH v3 0/4] powerpc/mm/radix: Memory unplug fixes

2020-07-16 Thread Nathan Lynch
"Aneesh Kumar K.V" writes: > This is the next version of the fixes for memory unplug on radix. > The issues and the fix are described in the actual patches. I guess this isn't actually causing problems at runtime right now, but I notice calls to resize_hpt_for_hotplug() from arch_add_memory() and

Re: [PATCH] pseries: Fix 64 bit logical memory block panic

2020-07-16 Thread Aneesh Kumar K.V
On 7/16/20 7:00 AM, Paul Mackerras wrote: On Wed, Jul 15, 2020 at 06:12:25PM +0530, Aneesh Kumar K.V wrote: Anton Blanchard writes: Booting with a 4GB LMB size causes us to panic: qemu-system-ppc64: OS terminated: OS panic: Memory block size not suitable: 0x0 Fix pseries_memory_bl

Re: [PATCH V5 1/4] mm/debug_vm_pgtable: Add tests validating arch helpers for core MM features

2020-07-16 Thread Steven Price
On 13/07/2020 04:23, Anshuman Khandual wrote: This adds new tests validating arch page table helpers for these following core memory features. These tests create and test specific mapping types at various page table levels. 1. SPECIAL mapping 2. PROTNONE mapping 3. DEVMAP mapping 4. SOFTDIRTY ma

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Mathieu Desnoyers
- On Jul 16, 2020, at 7:00 AM, Peter Zijlstra pet...@infradead.org wrote: > On Thu, Jul 16, 2020 at 08:03:36PM +1000, Nicholas Piggin wrote: >> Excerpts from Peter Zijlstra's message of July 16, 2020 6:50 pm: >> > On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: >> >> > On Jul

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Mathieu Desnoyers
- On Jul 16, 2020, at 12:42 AM, Nicholas Piggin npig...@gmail.com wrote: > I should be more complete here, especially since I was complaining > about unclear barrier comment :) > > > CPU0 CPU1 > a. user stuff1. user stuff > b. membarrier() 2. enter

Re: [PATCH net-next] ibmvnic: Increase driver logging

2020-07-16 Thread Thomas Falcon
On 7/15/20 8:29 PM, David Miller wrote: From: Jakub Kicinski Date: Wed, 15 Jul 2020 17:06:32 -0700 On Wed, 15 Jul 2020 18:51:55 -0500 Thomas Falcon wrote: free_netdev(netdev); dev_set_drvdata(&dev->dev, NULL); + netdev_info(netdev, "VNIC client device has been successf

Re: [PATCH net-next] ibmvnic: Increase driver logging

2020-07-16 Thread Michal Suchánek
On Thu, Jul 16, 2020 at 10:59:58AM -0500, Thomas Falcon wrote: > > On 7/15/20 8:29 PM, David Miller wrote: > > From: Jakub Kicinski > > Date: Wed, 15 Jul 2020 17:06:32 -0700 > > > > > On Wed, 15 Jul 2020 18:51:55 -0500 Thomas Falcon wrote: > > > > free_netdev(netdev); > > > > dev

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Mathieu Desnoyers
- On Jul 16, 2020, at 11:46 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jul 16, 2020, at 12:42 AM, Nicholas Piggin npig...@gmail.com wrote: >> I should be more complete here, especially since I was complaining >> about unclear barrier comment :) >> >> >> CPU0

Re: [PATCH v3 0/3] Off-load TLB invalidations to host for !GTSE

2020-07-16 Thread Qian Cai
064][ T925] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=256 NUMA PowerNV [9.339098][ T925] Modules linked in: dm_mirror dm_region_hash dm_log dm_mod [9.339150][ T925] CPU: 92 PID: 925 Comm: (md-udevd) Not tainted 5.8.0-rc5-next-20200716 #3 [9.339186][ T925] NIP: LR: c00

Re: [V2 PATCH 1/3] Refactoring powerpc code for carrying over IMA measurement logs, to move non architecture specific code to security/ima.

2020-07-16 Thread Thiago Jung Bauermann
Hello Prakhar, Prakhar Srivastava writes: > On 6/19/20 5:19 PM, Thiago Jung Bauermann wrote: >> >> Prakhar Srivastava writes: >> >>> Powerpc has support to carry over the IMA measurement logs. Refatoring the >>> non-architecture specific code out of arch/powerpc and into security/ima. >>> >>>

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Mathieu Desnoyers
- On Jul 16, 2020, at 12:03 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jul 16, 2020, at 11:46 AM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > >> - On Jul 16, 2020, at 12:42 AM, Nicholas Piggin npig...@gmail.com wrote: >>> I should be more compl

[PATCH] powerpc/64: Fix an out of date comment about MMIO ordering

2020-07-16 Thread Palmer Dabbelt
From: Palmer Dabbelt This primitive has been renamed, but because it was spelled incorrectly in the first place it must have escaped the fixup patch. As far as I can tell this logic is still correct: smp_mb__after_spinlock() uses the default smp_mb() implementation, which is "sync" rather than "

Re: [PATCH net-next] ibmvnic: Increase driver logging

2020-07-16 Thread Jakub Kicinski
On Thu, 16 Jul 2020 18:07:37 +0200 Michal Suchánek wrote: > On Thu, Jul 16, 2020 at 10:59:58AM -0500, Thomas Falcon wrote: > > On 7/15/20 8:29 PM, David Miller wrote: > > > From: Jakub Kicinski > > > Date: Wed, 15 Jul 2020 17:06:32 -0700 > > > > > > > On Wed, 15 Jul 2020 18:51:55 -0500 Thomas

Re: [PATCH v3 10/12] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-16 Thread Hari Bathini
On 16/07/20 7:52 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> /** >> + * get_crash_memory_ranges - Get crash memory ranges. This list includes >> + * first/crashing kernel's memory regions that >> + * would be exported via

Re: [PATCH v3 03/12] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-16 Thread Hari Bathini
On 15/07/20 5:19 am, Thiago Jung Bauermann wrote: > > > >> +/** >> + * get_mem_rngs_size - Get the allocated size of mrngs based on >> + * max_nr_ranges and chunk size. >> + * @mrngs: Memory ranges. >> + * >> + * Returns the maximum no. of ranges. > > This

Re: [PATCH v3 04/12] ppc64/kexec_file: avoid stomping memory used by special regions

2020-07-16 Thread Hari Bathini
On 15/07/20 8:09 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> +/** >> + * __locate_mem_hole_top_down - Looks top down for a large enough memory >> hole >> + * in the memory regions between buf_min & >> buf_max >> + *

Re: [PATCH v3 05/12] powerpc/drmem: make lmb walk a bit more flexible

2020-07-16 Thread Hari Bathini
On 15/07/20 9:20 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> @@ -534,7 +537,7 @@ static int __init early_init_dt_scan_memory_ppc(unsigned >> long node, >> #ifdef CONFIG_PPC_PSERIES >> if (depth == 1 && >> strcmp(uname, "ibm,dynamic-reconfiguration-memory") =

Re: [PATCH v3 06/12] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-16 Thread Hari Bathini
On 16/07/20 4:22 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> +/** >> + * get_node_path - Get the full path of the given node. >> + * @dn:Node. >> + * @path: Updated with the full path of the node. >> + * >> + * Returns nothing. >> + */ >> +static voi

Re: [PATCH v3 09/12] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-16 Thread Hari Bathini
On 16/07/20 7:08 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> @@ -968,7 +1040,7 @@ int setup_new_fdt_ppc64(const struct kimage *image, >> void *fdt, >> >> /* >> * Restrict memory usage for kdump kernel by setting up >> - * usable memory ranges. >> + * usa

Re: [PATCH v3 07/12] ppc64/kexec_file: add support to relocate purgatory

2020-07-16 Thread Hari Bathini
On 16/07/20 5:50 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> Right now purgatory implementation is only minimal. But if purgatory >> code is to be enhanced to copy memory to the backup region and verify > > Can't the memcpy be done in asm? We have arch/powerpc/lib/memcpy_6

Re: [PATCH v3 10/12] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 16/07/20 7:52 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> >>> /** >>> + * get_crash_memory_ranges - Get crash memory ranges. This list includes >>> + * first/crashing kernel's memory regions that >>> + *

Re: [PATCH v3 04/12] ppc64/kexec_file: avoid stomping memory used by special regions

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 15/07/20 8:09 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> > > > >>> +/** >>> + * __locate_mem_hole_top_down - Looks top down for a large enough memory >>> hole >>> + * in the memory regions between buf_min & >>> b

Re: [PATCH v3 05/12] powerpc/drmem: make lmb walk a bit more flexible

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 15/07/20 9:20 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> >>> @@ -534,7 +537,7 @@ static int __init >>> early_init_dt_scan_memory_ppc(unsigned long node, >>> #ifdef CONFIG_PPC_PSERIES >>> if (depth == 1 && >>> strcmp(uname, "ibm,dyna

Re: [PATCH v3 06/12] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 16/07/20 4:22 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> > > > >>> +/** >>> + * get_node_path - Get the full path of the given node. >>> + * @dn:Node. >>> + * @path: Updated with the full path of the node. >>> + * >>> + * Re

Re: [PATCH v3 09/12] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 16/07/20 7:08 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> >>> @@ -968,7 +1040,7 @@ int setup_new_fdt_ppc64(const struct kimage *image, >>> void *fdt, >>> >>> /* >>> * Restrict memory usage for kdump kernel by setting up >>> -* usable m

Re: [PATCH v3 07/12] ppc64/kexec_file: add support to relocate purgatory

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 16/07/20 5:50 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> >>> So, add support to relocate purgatory in kexec_file_load system call >>> by setting up TOC pointer and applying RELA relocations as needed. >> >> If we do want to use a C purgatory, Mi

Re: [PATCH v2 1/3] module: Rename module_alloc() to text_alloc() and move to kernel proper

2020-07-16 Thread Christophe Leroy
Jarkko Sakkinen a écrit : Rename module_alloc() to text_alloc() and module_memfree() to text_memfree(), and move them to kernel/text.c, which is unconditionally compiled to the kernel proper. This allows kprobes, ftrace and bpf to allocate space for executable code without requiring to compile

Re: [PATCH] powerpc/64: Fix an out of date comment about MMIO ordering

2020-07-16 Thread Benjamin Herrenschmidt
On Thu, 2020-07-16 at 12:38 -0700, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > This primitive has been renamed, but because it was spelled incorrectly in the > first place it must have escaped the fixup patch. As far as I can tell this > logic is still correct: smp_mb__after_spinlock() uses

Re: [PATCH v3 0/3] Off-load TLB invalidations to host for !GTSE

2020-07-16 Thread Stephen Rothwell
Hi all, On Thu, 16 Jul 2020 13:27:14 -0400 Qian Cai wrote: > > Reverting the whole series fixed random memory corruptions during boot on > POWER9 PowerNV systems below. I will revert those commits from linux-next today as well (they revert cleanly). -- Cheers, Stephen Rothwell pgpknsPCqmZPx.

Question about NUMA distance calculation in powerpc/mm/numa.c

2020-07-16 Thread Daniel Henrique Barboza
Hello, I didn't find an explanation about the 'double the distance' logic in 'git log' or anywhere in the kernel docs: (arch/powerpc/mm/numa.c, __node_distance()): for (i = 0; i < distance_ref_points_depth; i++) { if (distance_lookup_table[a][i] == distance_lookup_table[b][i])

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Nicholas Piggin
Excerpts from pet...@infradead.org's message of July 16, 2020 9:00 pm: > On Thu, Jul 16, 2020 at 08:03:36PM +1000, Nicholas Piggin wrote: >> Excerpts from Peter Zijlstra's message of July 16, 2020 6:50 pm: >> > On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: >> >> > On Jul 15, 2020

Re: [PATCH v2 1/1] ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists'

2020-07-16 Thread Mark Brown
On Wed, 15 Jul 2020 16:00:09 +0100, Lee Jones wrote: > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists' commit: 1b58214113481616b74ee4d196e5b1cb683758ee All being well t

Re: [PATCH 1/1] ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists'

2020-07-16 Thread Mark Brown
On Wed, 15 Jul 2020 10:44:47 +0100, Lee Jones wrote: > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists' commit: 1b58214113481616b74ee4d196e5b1cb683758ee All being well t

Re: [PATCH v8 5/8] powerpc/vdso: Prepare for switching VDSO to generic C implementation.

2020-07-16 Thread Tulio Magno Quites Machado Filho
Christophe Leroy writes: > Michael Ellerman a écrit : > >> Christophe Leroy writes: >>> Prepare for switching VDSO to generic C implementation in following >>> patch. Here, we: >>> - Modify __get_datapage() to take an offset >>> - Prepare the helpers to call the C VDSO functions >>> - Prepare t

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Nicholas Piggin
Excerpts from Mathieu Desnoyers's message of July 17, 2020 4:58 am: > - On Jul 16, 2020, at 12:03 PM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > >> - On Jul 16, 2020, at 11:46 AM, Mathieu Desnoyers >> mathieu.desnoy...@efficios.com wrote: >> >>> - On Jul 16, 2020, at

Re: [PATCH net-next] ibmvnic: Increase driver logging

2020-07-16 Thread Stephen Hemminger
On Thu, 16 Jul 2020 13:22:00 -0700 Jakub Kicinski wrote: > On Thu, 16 Jul 2020 18:07:37 +0200 Michal Suchánek wrote: > > On Thu, Jul 16, 2020 at 10:59:58AM -0500, Thomas Falcon wrote: > > > On 7/15/20 8:29 PM, David Miller wrote: > > > > From: Jakub Kicinski > > > > Date: Wed, 15 Jul 2020

  1   2   >