KVM: PPC: Book3S PR: Enable kvmppc_get/set_one_reg_pr() for HTM registers
authorSimon Guo <wei.guo.simon@gmail.com>
Wed, 23 May 2018 07:02:12 +0000 (15:02 +0800)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 1 Jun 2018 00:31:08 +0000 (10:31 +1000)
commitdeeb879de955f4e04be3d43c33bc311087f063bf
treefdb6c5e8b6bde1d028aabf5ba0d1d98e20dc6b57
parent8f04412699e42c7fb5f68a847b1531ad3211b523
KVM: PPC: Book3S PR: Enable kvmppc_get/set_one_reg_pr() for HTM registers

We need to migrate PR KVM during transaction and userspace will use
kvmppc_get_one_reg_pr()/kvmppc_set_one_reg_pr() APIs to get/set
transaction checkpoint state. This patch adds support for that.

So far, QEMU on PR KVM doesn't fully function for migration but the
savevm/loadvm can be done against a RHEL72 guest. During savevm/
loadvm procedure, the kvm ioctls will be invoked as well.

Test has been performed to savevm/loadvm for a guest running
a HTM test program:
https://github.com/justdoitqd/publicFiles/blob/master/test-tm-mig.c

Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_pr.c