KVM: PPC: Book3S HV: Nested move LPCR sanitising to sanitise_hv_regs
authorNicholas Piggin <npiggin@gmail.com>
Mon, 12 Apr 2021 01:48:35 +0000 (11:48 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 12 Apr 2021 03:36:23 +0000 (13:36 +1000)
commita19b70abc69aea8ea5974c57e1c3457d9df6aff2
treec2fe59cd6d0bf0594b96f95f9f291571a10ee87c
parent5088eb4092df12d701af8e0e92860b7186365279
KVM: PPC: Book3S HV: Nested move LPCR sanitising to sanitise_hv_regs

This will get a bit more complicated in future patches. Move it
into the helper function.

This change allows the L1 hypervisor to determine some of the LPCR
bits that the L0 is using to run it, which could be a privilege
violation (LPCR is HV-privileged), although the same problem exists
now for HFSCR for example. Discussion of the HV privilege issue is
ongoing and can be resolved with a later change.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210412014845.1517916-3-npiggin@gmail.com
arch/powerpc/kvm/book3s_hv_nested.c