[PATCH 4/4] KVM: PPC: Book3S HV: Use POWER9 SLBIA IH=6 variant to clear SLB

2021-01-17 Thread Nicholas Piggin
IH=6 may preserve hypervisor real-mode ERAT entries and is the recommended SLBIA hint for switching partitions. Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_rmhandle

[PATCH 3/4] KVM: PPC: Book3S HV: No need to clear radix host SLB before loading guest

2021-01-17 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 0e1f5bf168a1..9f0fdbae4b44 100644 --- a/arch/powerpc/kvm/boo

[PATCH 2/4] KVM: PPC: Book3S HV: Fix radix guest SLB side channel

2021-01-17 Thread Nicholas Piggin
The slbmte instruction is legal in radix mode, including radix guest mode. This means radix guests can load the SLB with arbitrary data. KVM host does not clear the SLB when exiting a guest if it was a radix guest, which would allow a rogue radix guest to use the SLB as a side channel to communica

[PATCH 0/4] a few KVM patches

2021-01-17 Thread Nicholas Piggin
These patches are unrelated except touching some of the same code. The first two fix actual guest exploitable issues, the other two try to tidy up SLB management slightly. Thanks, Nick Nicholas Piggin (4): KVM: PPC: Book3S HV: Remove support for running HPT guest on RPT host without mixed m

[PATCH 1/4] KVM: PPC: Book3S HV: Remove support for running HPT guest on RPT host without mixed mode support

2021-01-17 Thread Nicholas Piggin
This reverts much of commit c01015091a770 ("KVM: PPC: Book3S HV: Run HPT guests on POWER9 radix hosts"), which was required to run HPT guests on RPT hosts on early POWER9 CPUs without support for "mixed mode", which meant the host could not run with MMU on while guests were running. This code has

Re: [PATCH 10/18] arch: powerpc: Stop building and using oprofile

2021-01-17 Thread Viresh Kumar
On 14-01-21, 17:05, Viresh Kumar wrote: > The "oprofile" user-space tools don't use the kernel OPROFILE support > any more, and haven't in a long time. User-space has been converted to > the perf interfaces. > > This commits stops building oprofile for powerpc and removes any > reference to it fro

Re: [PATCH 5/6] powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE

2021-01-17 Thread Alexey Kardashevskiy
On 16/01/2021 02:56, Nathan Lynch wrote: Alexey Kardashevskiy writes: On 15/01/2021 09:00, Nathan Lynch wrote: diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index 332e1000ca0f..1aa7ab1cbc84 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/incl

Re: [PATCH 6/6] powerpc/rtas: constrain user region allocation to RMA

2021-01-17 Thread Alexey Kardashevskiy
On 16/01/2021 02:38, Nathan Lynch wrote: Alexey Kardashevskiy writes: On 15/01/2021 09:00, Nathan Lynch wrote: Memory locations passed as arguments from the OS to RTAS usually need to be addressable in 32-bit mode and must reside in the Real Mode Area. On PAPR guests, the RMA starts at logi

[powerpc:merge] BUILD SUCCESS 41d8cb7ece7c81e4eb897ed7ec7d3c3d72fd0af4

2021-01-17 Thread kernel test robot
onfig mips allyesconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig x86_64 randconfig-a006-20210117 x86_64 randconfig-a004-20210

Re: [PATCH 1/2] dt-bindings: powerpc: Add a schema for the 'sleep' property

2021-01-17 Thread Johan Jonker
Hi Rob, This patch generates notifications in the Rockchip ARM and arm64 tree. Could you limit the scope to PowerPC only. Kind regards, Johan Jonker make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/powerpc/sleep.yaml make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Document

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.11-4 tag

2021-01-17 Thread pr-tracker-bot
The pull request you sent on Sun, 17 Jan 2021 21:24:00 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.11-4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/a1339d6355ac42e1bf4fcdfce8bfce61172f8891 Thank you! -- Deet-doot-d

Re: [PATCH v3 1/8] powerpc/uaccess: Add unsafe_copy_from_user

2021-01-17 Thread Christopher M. Riedl
On Mon Jan 11, 2021 at 7:22 AM CST, Christophe Leroy wrote: > > > Le 09/01/2021 à 04:25, Christopher M. Riedl a écrit : > > Implement raw_copy_from_user_allowed() which assumes that userspace read > > access is open. Use this new function to implement raw_copy_from_user(). > > Finally, wrap the new

Re: [PATCH v3 4/8] powerpc/signal64: Remove TM ifdefery in middle of if/else block

2021-01-17 Thread Christopher M. Riedl
On Mon Jan 11, 2021 at 7:29 AM CST, Christophe Leroy wrote: > > > Le 09/01/2021 à 04:25, Christopher M. Riedl a écrit : > > Rework the messy ifdef breaking up the if-else for TM similar to > > commit f1cf4f93de2f ("powerpc/signal32: Remove ifdefery in middle of > > if/else"). > > > > Unlike that

Re: [PATCH v15 09/10] arm64: Call kmalloc() to allocate DTB buffer

2021-01-17 Thread Mimi Zohar
Hi Ard, On Fri, 2021-01-15 at 09:30 -0800, Lakshmi Ramasubramanian wrote: > create_dtb() function allocates kernel virtual memory for > the device tree blob (DTB). This is not consistent with other > architectures, such as powerpc, which calls kmalloc() for allocating > memory for the DTB. > > C

[GIT PULL] Please pull powerpc/linux.git powerpc-5.11-4 tag

2021-01-17 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 5.11: The following changes since commit 3ce47d95b7346dcafd9bed3556a8d072cb2b8571: powerpc: Handle .text.{hot,unlikely}.* in linker script (2021-01-06 21:59:04 +1100) are available in the git r

ibmvnic: Race condition in remove callback

2021-01-17 Thread Uwe Kleine-König
Hello, while working on some cleanup I stumbled over a problem in the ibmvnic's remove callback. Since commit 7d7195a026ba ("ibmvnic: Do not process device remove during device reset") there is the following code in the remove callback: static int ibmvnic_remove(struct vio_dev