Skip to content

Commit

Permalink
KVM: PPC: Book3S HV P9: Move SPRG restore to restore_p9_host_os_sprs
Browse files Browse the repository at this point in the history
Move the SPR update into its relevant helper function. This will
help with SPR scheduling improvements in later changes.

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-19-npiggin@gmail.com
  • Loading branch information
Nicholas Piggin authored and Michael Ellerman committed Nov 24, 2021
1 parent a1a19e1 commit 174a3ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/kvm/book3s_hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4106,6 +4106,8 @@ static void save_p9_host_os_sprs(struct p9_host_os_sprs *host_os_sprs)
static void restore_p9_host_os_sprs(struct kvm_vcpu *vcpu,
struct p9_host_os_sprs *host_os_sprs)
{
mtspr(SPRN_SPRG_VDSO_WRITE, local_paca->sprg_vdso);

mtspr(SPRN_PSPB, 0);
mtspr(SPRN_UAMOR, 0);

Expand Down Expand Up @@ -4306,8 +4308,6 @@ static int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit,

timer_rearm_host_dec(tb);

mtspr(SPRN_SPRG_VDSO_WRITE, local_paca->sprg_vdso);

kvmppc_subcore_exit_guest();

return trap;
Expand Down

0 comments on commit 174a3ab

Please sign in to comment.