Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[linux-block.git] / arch / powerpc / kvm / book3s.h
CommitLineData
8607a965 1/* SPDX-License-Identifier: GPL-2.0-or-later */
3a167bea
AK
2/*
3 * Copyright IBM Corporation, 2013
4 * Author Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
3a167bea
AK
5 */
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);
b1c5356e
SC
12extern bool kvm_unmap_gfn_range_hv(struct kvm *kvm, struct kvm_gfn_range *range);
13extern bool kvm_age_gfn_hv(struct kvm *kvm, struct kvm_gfn_range *range);
14extern bool kvm_test_age_gfn_hv(struct kvm *kvm, struct kvm_gfn_range *range);
3a167bea 15
3f1268dd 16extern int kvmppc_mmu_init_pr(struct kvm_vcpu *vcpu);
3a167bea 17extern void kvmppc_mmu_destroy_pr(struct kvm_vcpu *vcpu);
8c99d345 18extern int kvmppc_core_emulate_op_pr(struct kvm_vcpu *vcpu,
3a167bea
AK
19 unsigned int inst, int *advance);
20extern int kvmppc_core_emulate_mtspr_pr(struct kvm_vcpu *vcpu,
21 int sprn, ulong spr_val);
22extern int kvmppc_core_emulate_mfspr_pr(struct kvm_vcpu *vcpu,
23 int sprn, ulong *spr_val);
cbbc58d4 24extern int kvmppc_book3s_init_pr(void);
cb53a93e
CLG
25void kvmppc_book3s_exit_pr(void);
26extern int kvmppc_handle_exit_pr(struct kvm_vcpu *vcpu, unsigned int exit_nr);
3a167bea 27
68ab07b9
SG
28#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
29extern void kvmppc_emulate_tabort(struct kvm_vcpu *vcpu, int ra_val);
30#else
31static inline void kvmppc_emulate_tabort(struct kvm_vcpu *vcpu, int ra_val) {}
32#endif
33
268f4ef9
NP
34extern void kvmppc_set_msr_hv(struct kvm_vcpu *vcpu, u64 msr);
35extern void kvmppc_inject_interrupt_hv(struct kvm_vcpu *vcpu, int vec, u64 srr1_flags);
36
3a167bea 37#endif