]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc16ba37b3a0d09f262e87598c88d63dbc30da410
treec2fe59cd6d0bf0594b96f95f9f291571a10ee87c
parent63762f4a76b8844b05b796b5f7602b2092a7049a
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