KVM: PPC: Book3S HV: Pull out TM state save/restore into separate procedures
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 22 Jun 2016 04:21:59 +0000 (14:21 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Aug 2016 16:09:17 +0000 (18:09 +0200)
commite1a90eb8afa42b02f46897b881b9e19d3594159c
treeb1175a0df57af864a38043dbb331c7f597eda674
parentbe7acd281e5ab34c87f4cc930f42c3fdf49ee33d
KVM: PPC: Book3S HV: Pull out TM state save/restore into separate procedures

commit f024ee098476a3e620232e4a78cfac505f121245 upstream.

This moves the transactional memory state save and restore sequences
out of the guest entry/exit paths into separate procedures.  This is
so that these sequences can be used in going into and out of nap
in a subsequent patch.

The only code changes here are (a) saving and restore LR on the
stack, since these new procedures get called with a bl instruction,
(b) explicitly saving r1 into the PACA instead of assuming that
HSTATE_HOST_R1(r13) is already set, and (c) removing an unnecessary
and redundant setting of MSR[TM] that should have been removed by
commit 9d4d0bdd9e0a ("KVM: PPC: Book3S HV: Add transactional memory
support", 2013-09-24) but wasn't.

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