KVM: PPC: Book3S HV: Don't access HFSCR, LPIDR or LPCR when running nested
authorPaul Mackerras <paulus@ozlabs.org>
Mon, 8 Oct 2018 05:31:12 +0000 (16:31 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 9 Oct 2018 05:04:27 +0000 (16:04 +1100)
commitf3c99f97a3cda284418af6e242e06b351b83f647
tree803600bbe5ac5e159ecd7cc4b797b9dac5938f45
parent9d0b048da788c1df927d808bb60e7fd4f19a3a12
KVM: PPC: Book3S HV: Don't access HFSCR, LPIDR or LPCR when running nested

When running as a nested hypervisor, this avoids reading hypervisor
privileged registers (specifically HFSCR, LPIDR and LPCR) at startup;
instead reasonable default values are used.  This also avoids writing
LPIDR in the single-vcpu entry/exit path.

Also, this removes the check for CPU_FTR_HVMODE in kvmppc_mmu_hv_init()
since its only caller already checks this.

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_hv.c