diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-11-23 10:51:56 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-11-24 11:08:58 +0100 |
commit | 174a3ab633392859888fc1a5cff278d5546d8474 (patch) | |
tree | 1ec3eea1f23b7b05833be0bc215ec13e355abe18 /arch/powerpc/kvm/book3s_hv.c | |
parent | KVM: PPC: Book3S HV: CTRL SPR does not require read-modify-write (diff) | |
download | linux-174a3ab633392859888fc1a5cff278d5546d8474.tar.xz linux-174a3ab633392859888fc1a5cff278d5546d8474.zip |
KVM: PPC: Book3S HV P9: Move SPRG restore to restore_p9_host_os_sprs
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
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index e4fb36871ce4..4e6a42b16998 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -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); @@ -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; |