Thomas Gleixner | 8607a96 | 2019-05-22 09:51:44 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Aneesh Kumar K.V | 3a167bea | 2013-10-07 22:17:53 +0530 | [diff] [blame] | 2 | /* |
| 3 | * Copyright IBM Corporation, 2013 |
| 4 | * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> |
Aneesh Kumar K.V | 3a167bea | 2013-10-07 22:17:53 +0530 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __POWERPC_KVM_BOOK3S_H__ |
| 8 | #define __POWERPC_KVM_BOOK3S_H__ |
| 9 | |
| 10 | extern void kvmppc_core_flush_memslot_hv(struct kvm *kvm, |
| 11 | struct kvm_memory_slot *memslot); |
Sean Christopherson | b1c5356 | 2021-04-01 17:56:53 -0700 | [diff] [blame] | 12 | extern bool kvm_unmap_gfn_range_hv(struct kvm *kvm, struct kvm_gfn_range *range); |
| 13 | extern bool kvm_age_gfn_hv(struct kvm *kvm, struct kvm_gfn_range *range); |
| 14 | extern bool kvm_test_age_gfn_hv(struct kvm *kvm, struct kvm_gfn_range *range); |
| 15 | extern bool kvm_set_spte_gfn_hv(struct kvm *kvm, struct kvm_gfn_range *range); |
Aneesh Kumar K.V | 3a167bea | 2013-10-07 22:17:53 +0530 | [diff] [blame] | 16 | |
Greg Kurz | 3f1268d | 2020-03-18 18:43:36 +0100 | [diff] [blame] | 17 | extern int kvmppc_mmu_init_pr(struct kvm_vcpu *vcpu); |
Aneesh Kumar K.V | 3a167bea | 2013-10-07 22:17:53 +0530 | [diff] [blame] | 18 | extern void kvmppc_mmu_destroy_pr(struct kvm_vcpu *vcpu); |
Tianjia Zhang | 8c99d34 | 2020-04-27 12:35:11 +0800 | [diff] [blame] | 19 | extern int kvmppc_core_emulate_op_pr(struct kvm_vcpu *vcpu, |
Aneesh Kumar K.V | 3a167bea | 2013-10-07 22:17:53 +0530 | [diff] [blame] | 20 | unsigned int inst, int *advance); |
| 21 | extern int kvmppc_core_emulate_mtspr_pr(struct kvm_vcpu *vcpu, |
| 22 | int sprn, ulong spr_val); |
| 23 | extern int kvmppc_core_emulate_mfspr_pr(struct kvm_vcpu *vcpu, |
| 24 | int sprn, ulong *spr_val); |
Aneesh Kumar K.V | cbbc58d | 2013-10-07 22:18:01 +0530 | [diff] [blame] | 25 | extern int kvmppc_book3s_init_pr(void); |
Cédric Le Goater | cb53a93 | 2021-08-19 14:56:53 +0200 | [diff] [blame] | 26 | void kvmppc_book3s_exit_pr(void); |
| 27 | extern int kvmppc_handle_exit_pr(struct kvm_vcpu *vcpu, unsigned int exit_nr); |
Aneesh Kumar K.V | 3a167bea | 2013-10-07 22:17:53 +0530 | [diff] [blame] | 28 | |
Simon Guo | 68ab07b | 2018-05-23 15:02:06 +0800 | [diff] [blame] | 29 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM |
| 30 | extern void kvmppc_emulate_tabort(struct kvm_vcpu *vcpu, int ra_val); |
| 31 | #else |
| 32 | static inline void kvmppc_emulate_tabort(struct kvm_vcpu *vcpu, int ra_val) {} |
| 33 | #endif |
| 34 | |
Nicholas Piggin | 268f4ef | 2019-10-02 16:00:23 +1000 | [diff] [blame] | 35 | extern void kvmppc_set_msr_hv(struct kvm_vcpu *vcpu, u64 msr); |
| 36 | extern void kvmppc_inject_interrupt_hv(struct kvm_vcpu *vcpu, int vec, u64 srr1_flags); |
| 37 | |
Aneesh Kumar K.V | 3a167bea | 2013-10-07 22:17:53 +0530 | [diff] [blame] | 38 | #endif |