]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV P9: Use Linux SPR save/restore to manage some host SPRs
authorNicholas Piggin <npiggin@gmail.com>
Tue, 23 Nov 2021 09:52:16 +0000 (19:52 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Nov 2021 10:09:01 +0000 (21:09 +1100)
commitfa83723a56675e68f94f22dbdc1ca3218cbacd37
treea08fc79104004a8a6fce3aeba9e823aa31b8a6ea
parent37a3766c7e292b23d2cb3848e53afe79317c5ec5
KVM: PPC: Book3S HV P9: Use Linux SPR save/restore to manage some host SPRs

Linux implements SPR save/restore including storage space for registers
in the task struct for process context switching. Make use of this
similarly to the way we make use of the context switching fp/vec save
restore.

This improves code reuse, allows some stack space to be saved, and helps
with avoiding VRSAVE updates if they are not required.

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-39-npiggin@gmail.com
arch/powerpc/include/asm/switch_to.h
arch/powerpc/kernel/process.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv.h
arch/powerpc/kvm/book3s_hv_p9_entry.c