OSDN Git Service

KVM: PPC: Book3S HV: Factor fake-suspend handling out of kvmppc_save/restore_tm
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 30 May 2018 10:07:52 +0000 (20:07 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 30 May 2018 23:23:28 +0000 (09:23 +1000)
commit7b0e827c6970e8ca77c60ae87592204c39e41245
treea576cfe972a8bd1c5dd0868061d093b250770f70
parent9617a0b33569e79567300765d659c88c1f556c5d
KVM: PPC: Book3S HV: Factor fake-suspend handling out of kvmppc_save/restore_tm

This splits out the handling of "fake suspend" mode, part of the
hypervisor TM assist code for POWER9, and puts almost all of it in
new kvmppc_save_tm_hv and kvmppc_restore_tm_hv functions.  The new
functions branch to kvmppc_save/restore_tm if the CPU does not
require hypervisor TM assistance.

With this, it will be more straightforward to move kvmppc_save_tm and
kvmppc_restore_tm to another file and use them for transactional
memory support in PR KVM.  Additionally, it also makes the code a
bit clearer and reduces the number of feature sections.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv_rmhandlers.S