powerpc/mm: Write to PTCR only if ultravisor disabled
authorClaudio Carvalho <cclaudio@linux.ibm.com>
Thu, 22 Aug 2019 03:48:36 +0000 (00:48 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 29 Aug 2019 23:40:16 +0000 (09:40 +1000)
commit5223134029a87db925ecc9449f9501bad391a52e
tree7dcd197f295a1ed6f08a824ed5144d91ca7f8f6b
parent139a1d2842ec181cf017502a46bb8d947682a960
powerpc/mm: Write to PTCR only if ultravisor disabled

In ultravisor enabled systems, PTCR becomes ultravisor privileged only
for writing and an attempt to write to it will cause a Hypervisor
Emulation Assitance interrupt.

This patch uses the set_ptcr_when_no_uv() function to restrict PTCR
writing to only when ultravisor is disabled.

Signed-off-by: Claudio Carvalho <cclaudio@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190822034838.27876-6-cclaudio@linux.ibm.com
arch/powerpc/include/asm/ultravisor.h
arch/powerpc/mm/book3s64/hash_utils.c
arch/powerpc/mm/book3s64/pgtable.c
arch/powerpc/mm/book3s64/radix_pgtable.c