diff options
author | Paul Mackerras <paulus@samba.org> | 2014-06-01 21:03:00 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-07-28 09:22:18 -0400 |
commit | ae2113a4f1a6cd5a3cd3d75f394547922758e9ac (patch) | |
tree | 59a1dbf6369d853d0ad76c62a0333c47bb8992d0 /arch/powerpc/include/asm/kvm_book3s.h | |
parent | 699a0ea0823d32030b0666b28ff8633960f7ffa7 (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.h | 3 |
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 * | |||
146 | extern int kvmppc_mmu_hpte_sysinit(void); | 146 | extern int kvmppc_mmu_hpte_sysinit(void); |
147 | extern void kvmppc_mmu_hpte_sysexit(void); | 147 | extern void kvmppc_mmu_hpte_sysexit(void); |
148 | extern int kvmppc_mmu_hv_init(void); | 148 | extern int kvmppc_mmu_hv_init(void); |
149 | extern int kvmppc_book3s_hcall_implemented(struct kvm *kvm, unsigned long hc); | ||
149 | 150 | ||
150 | extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data); | 151 | extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data); |
151 | extern int kvmppc_st(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data); | 152 | extern 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); | |||
188 | extern ulong kvmppc_alignment_dar(struct kvm_vcpu *vcpu, unsigned int inst); | 189 | extern ulong kvmppc_alignment_dar(struct kvm_vcpu *vcpu, unsigned int inst); |
189 | extern int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd); | 190 | extern int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd); |
190 | extern void kvmppc_pr_init_default_hcalls(struct kvm *kvm); | 191 | extern void kvmppc_pr_init_default_hcalls(struct kvm *kvm); |
192 | extern int kvmppc_hcall_impl_pr(unsigned long cmd); | ||
193 | extern int kvmppc_hcall_impl_hv_realmode(unsigned long cmd); | ||
191 | extern void kvmppc_copy_to_svcpu(struct kvmppc_book3s_shadow_vcpu *svcpu, | 194 | extern void kvmppc_copy_to_svcpu(struct kvmppc_book3s_shadow_vcpu *svcpu, |
192 | struct kvm_vcpu *vcpu); | 195 | struct kvm_vcpu *vcpu); |
193 | extern void kvmppc_copy_from_svcpu(struct kvm_vcpu *vcpu, | 196 | extern void kvmppc_copy_from_svcpu(struct kvm_vcpu *vcpu, |