blob: 2ef1311a2a13e202da1697bb1f3a13cb7c1599df [file] [log] [blame]
Thomas Gleixner8607a962019-05-22 09:51:44 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Aneesh Kumar K.V3a167bea2013-10-07 22:17:53 +05302/*
3 * Copyright IBM Corporation, 2013
4 * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Aneesh Kumar K.V3a167bea2013-10-07 22:17:53 +05305 */
6
7#ifndef __POWERPC_KVM_BOOK3S_H__
8#define __POWERPC_KVM_BOOK3S_H__
9
10extern void kvmppc_core_flush_memslot_hv(struct kvm *kvm,
11 struct kvm_memory_slot *memslot);
Aneesh Kumar K.V3a167bea2013-10-07 22:17:53 +053012extern int kvm_unmap_hva_range_hv(struct kvm *kvm, unsigned long start,
13 unsigned long end);
Andres Lagar-Cavilla57128462014-09-22 14:54:42 -070014extern int kvm_age_hva_hv(struct kvm *kvm, unsigned long start,
15 unsigned long end);
Aneesh Kumar K.V3a167bea2013-10-07 22:17:53 +053016extern int kvm_test_age_hva_hv(struct kvm *kvm, unsigned long hva);
17extern void kvm_set_spte_hva_hv(struct kvm *kvm, unsigned long hva, pte_t pte);
18
19extern void kvmppc_mmu_destroy_pr(struct kvm_vcpu *vcpu);
20extern int kvmppc_core_emulate_op_pr(struct kvm_run *run, struct kvm_vcpu *vcpu,
21 unsigned int inst, int *advance);
22extern int kvmppc_core_emulate_mtspr_pr(struct kvm_vcpu *vcpu,
23 int sprn, ulong spr_val);
24extern int kvmppc_core_emulate_mfspr_pr(struct kvm_vcpu *vcpu,
25 int sprn, ulong *spr_val);
Aneesh Kumar K.Vcbbc58d2013-10-07 22:18:01 +053026extern int kvmppc_book3s_init_pr(void);
27extern void kvmppc_book3s_exit_pr(void);
Aneesh Kumar K.V3a167bea2013-10-07 22:17:53 +053028
Simon Guo68ab07b2018-05-23 15:02:06 +080029#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
30extern void kvmppc_emulate_tabort(struct kvm_vcpu *vcpu, int ra_val);
31#else
32static inline void kvmppc_emulate_tabort(struct kvm_vcpu *vcpu, int ra_val) {}
33#endif
34
Aneesh Kumar K.V3a167bea2013-10-07 22:17:53 +053035#endif