aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/kvm_book3s.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2014-06-01 21:03:00 -0400
committerAlexander Graf <agraf@suse.de>2014-07-28 09:22:18 -0400
commitae2113a4f1a6cd5a3cd3d75f394547922758e9ac (patch)
tree59a1dbf6369d853d0ad76c62a0333c47bb8992d0 /arch/powerpc/include/asm/kvm_book3s.h
parent699a0ea0823d32030b0666b28ff8633960f7ffa7 (diff)
KVM: PPC: Book3S: Allow only implemented hcalls to be enabled or disabled
This adds code to check that when the KVM_CAP_PPC_ENABLE_HCALL capability is used to enable or disable in-kernel handling of an hcall, that the hcall is actually implemented by the kernel. If not an EINVAL error is returned. This also checks the default-enabled list of hcalls and prints a warning if any hcall there is not actually implemented. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_book3s.h')
-rw-r--r--arch/powerpc/include/asm/kvm_book3s.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h
index 052ab2ad49b5..ceb70aaad6d4 100644
--- a/arch/powerpc/include/asm/kvm_book3s.h
+++ b/arch/powerpc/include/asm/kvm_book3s.h
@@ -146,6 +146,7 @@ extern void kvmppc_mmu_invalidate_pte(struct kvm_vcpu *vcpu, struct hpte_cache *
146extern int kvmppc_mmu_hpte_sysinit(void); 146extern int kvmppc_mmu_hpte_sysinit(void);
147extern void kvmppc_mmu_hpte_sysexit(void); 147extern void kvmppc_mmu_hpte_sysexit(void);
148extern int kvmppc_mmu_hv_init(void); 148extern int kvmppc_mmu_hv_init(void);
149extern int kvmppc_book3s_hcall_implemented(struct kvm *kvm, unsigned long hc);
149 150
150extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data); 151extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data);
151extern int kvmppc_st(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data); 152extern int kvmppc_st(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data);
@@ -188,6 +189,8 @@ extern u32 kvmppc_alignment_dsisr(struct kvm_vcpu *vcpu, unsigned int inst);
188extern ulong kvmppc_alignment_dar(struct kvm_vcpu *vcpu, unsigned int inst); 189extern ulong kvmppc_alignment_dar(struct kvm_vcpu *vcpu, unsigned int inst);
189extern int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd); 190extern int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd);
190extern void kvmppc_pr_init_default_hcalls(struct kvm *kvm); 191extern void kvmppc_pr_init_default_hcalls(struct kvm *kvm);
192extern int kvmppc_hcall_impl_pr(unsigned long cmd);
193extern int kvmppc_hcall_impl_hv_realmode(unsigned long cmd);
191extern void kvmppc_copy_to_svcpu(struct kvmppc_book3s_shadow_vcpu *svcpu, 194extern void kvmppc_copy_to_svcpu(struct kvmppc_book3s_shadow_vcpu *svcpu,
192 struct kvm_vcpu *vcpu); 195 struct kvm_vcpu *vcpu);
193extern void kvmppc_copy_from_svcpu(struct kvm_vcpu *vcpu, 196extern void kvmppc_copy_from_svcpu(struct kvm_vcpu *vcpu,