KVM: PPC: Book3S HV P9: Move host OS save/restore functions to built-in
authorNicholas Piggin <npiggin@gmail.com>
Tue, 23 Nov 2021 09:52:07 +0000 (19:52 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Nov 2021 10:09:00 +0000 (21:09 +1100)
commitaabcaf6ae2a0912898bd243f0aec0ce6853983fc
tree64096525b2860e7ebd981c0537d80cec7d008476
parent516b334210b831827e0491676625323f484275dd
KVM: PPC: Book3S HV P9: Move host OS save/restore functions to built-in

Move the P9 guest/host register switching functions to the built-in
P9 entry code, and export it for nested to use as well.

This allows more flexibility in scheduling these supervisor privileged
SPR accesses with the HV privileged and PR SPR accesses in the low level
entry code.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211123095231.1036501-30-npiggin@gmail.com
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv.h [new file with mode: 0644]
arch/powerpc/kvm/book3s_hv_p9_entry.c