KVM: PPC: Book3S PR: Add emulation for trechkpt.
authorSimon Guo <wei.guo.simon@gmail.com>
Wed, 23 May 2018 07:02:04 +0000 (15:02 +0800)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 1 Jun 2018 00:30:23 +0000 (10:30 +1000)
commite32c53d1cf0022af180548474f4c29c189d37d93
tree63d9d8940dbb32f5ae175d3f96e091c45e6ab600
parent03c81682a90b3fc3434d3e33f3f4c7f1f39d65cd
KVM: PPC: Book3S PR: Add emulation for trechkpt.

This patch adds host emulation when guest PR KVM executes "trechkpt.",
which is a privileged instruction and will trap into host.

We firstly copy vcpu ongoing content into vcpu tm checkpoint
content, then perform kvmppc_restore_tm_pr() to do trechkpt.
with updated vcpu tm checkpoint values.

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