KVM: PPC: Book3S HV: POWER10 enable HAIL when running radix guests
authorNicholas Piggin <npiggin@gmail.com>
Tue, 23 Nov 2021 09:51:46 +0000 (19:51 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Nov 2021 10:08:57 +0000 (21:08 +1100)
commiteacc818864bb01828280f4d64334c4e5ae6a4daf
tree3a5ee02d5cb821dd73f60037b060d27ce684f908
parent25aa145856cd0d94864bf501218be84a7c8062ae
KVM: PPC: Book3S HV: POWER10 enable HAIL when running radix guests

HV interrupts may be taken with the MMU enabled when radix guests are
running. Enable LPCR[HAIL] on ISA v3.1 processors for radix guests.
Make this depend on the host LPCR[HAIL] being enabled. Currently that is
always enabled, but having this test means any issue that might require
LPCR[HAIL] to be disabled in the host will not have to be duplicated in
KVM.

This optimisation takes 1380 cycles off a NULL hcall entry+exit micro
benchmark on a POWER10.

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/20211123095231.1036501-9-npiggin@gmail.com
arch/powerpc/kvm/book3s_hv.c