diff options
author | Simon Guo <wei.guo.simon@gmail.com> | 2018-05-23 15:01:50 +0800 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2018-06-01 10:29:17 +1000 |
commit | caa3be92bebc5b87a221900ac408aa99b0badf3d (patch) | |
tree | 913512c4b7e3dc942eb486d072a076b7af7a8bc3 /arch/powerpc/include | |
parent | 7f386af7bdb1a45bb04fb02d7b751809d63e5b09 (diff) | |
download | talos-obmc-linux-caa3be92bebc5b87a221900ac408aa99b0badf3d.tar.gz talos-obmc-linux-caa3be92bebc5b87a221900ac408aa99b0badf3d.zip |
KVM: PPC: Book3S PR: Add C function wrapper for _kvmppc_save/restore_tm()
Currently __kvmppc_save/restore_tm() APIs can only be invoked from
assembly function. This patch adds C function wrappers for them so
that they can be safely called from C function.
Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/asm-prototypes.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h index dfdcb2374c28..5da683bebc7f 100644 --- a/arch/powerpc/include/asm/asm-prototypes.h +++ b/arch/powerpc/include/asm/asm-prototypes.h @@ -141,7 +141,13 @@ unsigned long prepare_ftrace_return(unsigned long parent, unsigned long ip); void pnv_power9_force_smt4_catch(void); void pnv_power9_force_smt4_release(void); +/* Transaction memory related */ void tm_enable(void); void tm_disable(void); void tm_abort(uint8_t cause); + +struct kvm_vcpu; +void _kvmppc_restore_tm_pr(struct kvm_vcpu *vcpu, u64 guest_msr); +void _kvmppc_save_tm_pr(struct kvm_vcpu *vcpu, u64 guest_msr); + #endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */ |