]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: Use UV_WRITE_PATE ucall to register a PATE
authorMichael Anderson <andmike@linux.ibm.com>
Thu, 22 Aug 2019 03:48:35 +0000 (00:48 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 29 Aug 2019 23:40:15 +0000 (09:40 +1000)
commitb94c14b86601ed09f1b966bfb7c4c900065b70f0
tree781844fa13a226d6e12b063e003fb678b6ebee7a
parente784543b41a98c1436aa57b7adbf9804c8c465cd
powerpc/mm: Use UV_WRITE_PATE ucall to register a PATE

When Ultravisor (UV) is enabled, the partition table is stored in secure
memory and can only be accessed via the UV. The Hypervisor (HV) however
maintains a copy of the partition table in normal memory to allow Nest MMU
translations to occur (for normal VMs). The HV copy includes partition
table entries (PATE)s for secure VMs which would currently be unused
(Nest MMU translations cannot access secure memory) but they would be
needed as we add functionality.

This patch adds the UV_WRITE_PATE ucall which is used to update the PATE
for a VM (both normal and secure) when Ultravisor is enabled.

Signed-off-by: Michael Anderson <andmike@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
[ cclaudio: Write the PATE in HV's table before doing that in UV's ]
Signed-off-by: Claudio Carvalho <cclaudio@linux.ibm.com>
Reviewed-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190822034838.27876-5-cclaudio@linux.ibm.com
arch/powerpc/include/asm/ultravisor-api.h
arch/powerpc/include/asm/ultravisor.h
arch/powerpc/mm/book3s64/pgtable.c