Re: [V3 PATCH 07/16] powerpc/vas: Define QoS credit flag to allocate window

2021-05-09 Thread Nicholas Piggin
Excerpts from Haren Myneni's message of April 18, 2021 7:06 am: > > pHyp introduces two different type of credits: Default and Quality > of service (QoS). > > The total number of default credits available on each LPAR depends > on CPU resources configured. But these credits can be shared or >

Re: [V3 PATCH 06/16] powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs

2021-05-09 Thread Nicholas Piggin
Excerpts from Haren Myneni's message of April 18, 2021 7:05 am: > > This patch adds HCALLs and other definitions. Also define structs > that are used in VAS implementation on powerVM. > > Signed-off-by: Haren Myneni > --- > arch/powerpc/include/asm/hvcall.h| 7 ++ >

Re: [V3 PATCH 05/16] powerpc/vas: Define and use common vas_window struct

2021-05-09 Thread Nicholas Piggin
Excerpts from Haren Myneni's message of April 18, 2021 7:04 am: > > Empty email? Thanks, Nick

Re: [V3 PATCH 04/16] powerpc/vas: Move update_csb/dump_crb to common book3s platform

2021-05-09 Thread Nicholas Piggin
Excerpts from Haren Myneni's message of April 18, 2021 7:03 am: > > NX issues an interrupt when sees fault on user space buffer. If a coprocessor encounters an error translating an address, the VAS will cause an interrupt in the host. > The > kernel processes the fault by updating CSB. This

Re: [V3 PATCH 03/16] powerpc/vas: Create take/drop task reference functions

2021-05-09 Thread Nicholas Piggin
Excerpts from Haren Myneni's message of April 18, 2021 7:03 am: > > Take task reference when each window opens and drops during close. > This functionality is needed for powerNV and pseries. So this patch > defines the existing code as functions in common book3s platform > vas-api.c > >

Re: [PATCH V3 02/16] powerpc/vas: Move VAS API to common book3s platform

2021-05-09 Thread Nicholas Piggin
Excerpts from Haren Myneni's message of April 18, 2021 7:02 am: > > Using the same /dev/crypto/nx-gzip interface for both powerNV and > pseries. The pseries NX driver will use the powernv VAS API ? > So this patch creates platforms/book3s/ and moves VAS API > to that directory. The actual

Re: [V3 PATCH 01/16] powerpc/powernv/vas: Rename register/unregister functions

2021-05-09 Thread Nicholas Piggin
Excerpts from Haren Myneni's message of April 18, 2021 7:00 am: > > powerNV and pseries drivers register / unregister to the corresponding > VAS code separately. So rename powerNV VAS API register/unregister > functions. The pseries VAS driver will have different calls for registering a

[PATCH 11/11] PCI: shpchp: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 10/11] PCI: hotplug: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 09/11] PCI: rpadlpar: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 08/11] PCI: switchtec: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 07/11] PCI/ASPM: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 06/11] PCI/P2PDMA: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 05/11] PCI/IOV: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 04/11] PCI/MSI: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 02/11] PCI/AER: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 01/11] PCI: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH 03/11] PCI: Use sysfs_emit() and sysfs_emit_at() in "show" functions

2021-05-09 Thread Krzysztof Wilczyński
The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to

[PATCH v13 8/8] powerpc/32: use set_memory_attr()

2021-05-09 Thread Jordan Niethe
From: Christophe Leroy Use set_memory_attr() instead of the PPC32 specific change_page_attr() change_page_attr() was checking that the address was not mapped by blocks and was handling highmem, but that's unneeded because the affected pages can't be in highmem and block mapping verification is

[PATCH v13 7/8] powerpc/mm: implement set_memory_attr()

2021-05-09 Thread Jordan Niethe
From: Christophe Leroy In addition to the set_memory_xx() functions which allows to change the memory attributes of not (yet) used memory regions, implement a set_memory_attr() function to: - set the final memory protection after init on currently used kernel regions. - enable/disable kernel

[PATCH v13 6/8] powerpc: Set ARCH_HAS_STRICT_MODULE_RWX

2021-05-09 Thread Jordan Niethe
From: Russell Currey To enable strict module RWX on powerpc, set: CONFIG_STRICT_MODULE_RWX=y You should also have CONFIG_STRICT_KERNEL_RWX=y set to have any real security benefit. ARCH_HAS_STRICT_MODULE_RWX is set to require ARCH_HAS_STRICT_KERNEL_RWX. This is due to a quirk in

[PATCH v13 5/8] powerpc/bpf: Write protect JIT code

2021-05-09 Thread Jordan Niethe
Add the necessary call to bpf_jit_binary_lock_ro() to remove write and add exec permissions to the JIT image after it has finished being written. Without CONFIG_STRICT_MODULE_RWX the image will be writable and executable until the call to bpf_jit_binary_lock_ro(). Reviewed-by: Christophe Leroy

[PATCH v13 4/8] powerpc/bpf: Remove bpf_jit_free()

2021-05-09 Thread Jordan Niethe
Commit 74451e66d516 ("bpf: make jited programs visible in traces") added a default bpf_jit_free() implementation. Powerpc did not use the default bpf_jit_free() as powerpc did not set the images read-only. The default bpf_jit_free() called bpf_jit_binary_unlock_ro() is why it could not be used for

[PATCH v13 3/8] powerpc/kprobes: Mark newly allocated probes as ROX

2021-05-09 Thread Jordan Niethe
From: Russell Currey Add the arch specific insn page allocator for powerpc. This allocates ROX pages if STRICT_KERNEL_RWX is enabled. These pages are only written to with patch_instruction() which is able to write RO pages. Reviewed-by: Daniel Axtens Signed-off-by: Russell Currey

[PATCH v13 2/8] powerpc/lib/code-patching: Set up Strict RWX patching earlier

2021-05-09 Thread Jordan Niethe
setup_text_poke_area() is a late init call so it runs before mark_rodata_ro() and after the init calls. This lets all the init code patching simply write to their locations. In the future, kprobes is going to allocate its instruction pages RO which means they will need setup_text__poke_area() to

[PATCH v13 1/8] powerpc/mm: Implement set_memory() routines

2021-05-09 Thread Jordan Niethe
From: Russell Currey The set_memory_{ro/rw/nx/x}() functions are required for STRICT_MODULE_RWX, and are generally useful primitives to have. This implementation is designed to be generic across powerpc's many MMUs. It's possible that this could be optimised to be faster for specific MMUs.

[PATCH v13 0/8] powerpc: Further Strict RWX support

2021-05-09 Thread Jordan Niethe
Adding more Strict RWX support on powerpc, in particular Strict Module RWX. Thanks for all of the feedback everyone. It is now rebased on linux-next + powerpc/64s/radix: Enable huge vmalloc mappings (https://lore.kernel.org/linuxppc-dev/20210503091755.613393-1-npig...@gmail.com/) For reference

Re: [PATCH v12 6/8] powerpc: Set ARCH_HAS_STRICT_MODULE_RWX

2021-05-09 Thread Jordan Niethe
On Fri, May 7, 2021 at 3:35 PM Christophe Leroy wrote: > > > > Le 06/05/2021 à 04:34, Jordan Niethe a écrit : > > From: Russell Currey > > > > To enable strict module RWX on powerpc, set: > > > > CONFIG_STRICT_MODULE_RWX=y > > > > You should also have CONFIG_STRICT_KERNEL_RWX=y set to have

Re: Radeon NI: GIT kernel with the nislands_smc commit doesn't boot on a Freescale P5040 board and P.A.Semi Nemo board

2021-05-09 Thread Gustavo A. R. Silva
Hi Christian, On 5/8/21 06:33, Christian Zigotzky wrote: > Hi Gustavo, > > Your patch works! Thanks a lot! I tested it with my Freescale P5040 board and > P.A.Semi Nemo board with a connected AMD Radeon HD6970 NI graphics cards > (Cayman > XT) today. Awesome! :) Thank you! -- Gustavo > >

[PATCH] arch: powerpc: kvm: remove unnecessary casting

2021-05-09 Thread Nour-eddine Taleb
remove unnecessary castings, from "void *" to "struct kvmppc_xics *" Signed-off-by: Nour-eddine Taleb <1337.nouredd...@gmail.com> --- arch/powerpc/kvm/book3s_xics.c| 2 +- arch/powerpc/kvm/book3s_xive.c| 2 +- arch/powerpc/kvm/book3s_xive_native.c | 2 +- 3 files changed, 3

Re: [FSL P50x0] Xorg always restarts again and again after the the PowerPC updates 5.13-1

2021-05-09 Thread Christian Zigotzky
On 09 May 2021 at 07:43 pm, Christophe Leroy wrote: On my side, book3e (corenet64_smp_defconfig) built with GCC 10.1 works well with QEMU 2.11.2 A kernel built with the configuration you provided doesn't boot on QEMU, no output at all, even with kernel v5.12. What versions of GCC and QEMU

Re: [PATCH v2 2/3] powerpc/fsl: set fsl, i2c-erratum-a004447 flag for P2041 i2c controllers

2021-05-09 Thread Chris Packham
On 7/05/21 8:24 pm, Joakim Tjernlund wrote: > On Fri, 2021-05-07 at 10:04 +0200, Joakim Tjernlund wrote: >> On Fri, 2021-05-07 at 12:40 +1200, Chris Packham wrote: >>> The i2c controllers on the P2040/P2041 have an erratum where the >>> documented scheme for i2c bus recovery will not work

Re: [PATCH v2 1/3] dt-bindings: i2c: mpc: Add fsl, i2c-erratum-a004447 flag

2021-05-09 Thread Chris Packham
On 8/05/21 9:49 am, Rob Herring wrote: > On Fri, May 07, 2021 at 12:40:45PM +1200, Chris Packham wrote: >> Document the fsl,i2c-erratum-a004447 flag which indicates the presence >> of an i2c erratum on some QorIQ SoCs. >> >> Signed-off-by: Chris Packham >> --- >>

Re: [FSL P50x0] Xorg always restarts again and again after the the PowerPC updates 5.13-1

2021-05-09 Thread Christophe Leroy
Le 09/05/2021 à 14:27, Christian Zigotzky a écrit : On 08 May 2021 at 06:39pm, Christian Zigotzky wrote: On 06 May 2021 at 03:58 pm, Christian Zigotzky wrote: I have started bisecting again. Link: https://forum.hyperion-entertainment.com/viewtopic.php?p=53106#p53106

Re: [FSL P50x0] Xorg always restarts again and again after the the PowerPC updates 5.13-1

2021-05-09 Thread Christophe Leroy
Thanks for testing Le 08/05/2021 à 18:39, Christian Zigotzky a écrit : On 06 May 2021 at 03:58 pm, Christian Zigotzky wrote: I have started bisecting again. Link: https://forum.hyperion-entertainment.com/viewtopic.php?p=53106#p53106

Re: [FSL P50x0] Xorg always restarts again and again after the the PowerPC updates 5.13-1

2021-05-09 Thread Christian Zigotzky
On 08 May 2021 at 06:39pm, Christian Zigotzky wrote: On 06 May 2021 at 03:58 pm, Christian Zigotzky wrote: I have started bisecting again. Link: https://forum.hyperion-entertainment.com/viewtopic.php?p=53106#p53106 On

Re: [PATCH 2/3] hotplug-memory.c: enhance dlpar_memory_remove* LMB checks

2021-05-09 Thread David Gibson
On Fri, May 07, 2021 at 01:36:06PM -0300, Daniel Henrique Barboza wrote: > > > On 5/3/21 10:02 PM, David Gibson wrote: > > On Fri, Apr 30, 2021 at 09:09:16AM -0300, Daniel Henrique Barboza wrote: > > > dlpar_memory_remove_by_ic() validates the amount of LMBs to be removed > > > by checking