diff options
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s_pr.c | 20 | ||||
-rw-r--r-- | arch/powerpc/kvm/booke.c | 20 | ||||
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 9 |
3 files changed, 46 insertions, 3 deletions
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index fcdc97eb9411..72b20b8749fa 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c | |||
@@ -984,6 +984,26 @@ int __kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) | |||
984 | return ret; | 984 | return ret; |
985 | } | 985 | } |
986 | 986 | ||
987 | int kvmppc_core_prepare_memory_region(struct kvm *kvm, | ||
988 | struct kvm_userspace_memory_region *mem) | ||
989 | { | ||
990 | return 0; | ||
991 | } | ||
992 | |||
993 | void kvmppc_core_commit_memory_region(struct kvm *kvm, | ||
994 | struct kvm_userspace_memory_region *mem) | ||
995 | { | ||
996 | } | ||
997 | |||
998 | int kvmppc_core_init_vm(struct kvm *kvm) | ||
999 | { | ||
1000 | return 0; | ||
1001 | } | ||
1002 | |||
1003 | void kvmppc_core_destroy_vm(struct kvm *kvm) | ||
1004 | { | ||
1005 | } | ||
1006 | |||
987 | static int kvmppc_book3s_init(void) | 1007 | static int kvmppc_book3s_init(void) |
988 | { | 1008 | { |
989 | int r; | 1009 | int r; |
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 9f2e4a5e1c4d..9066325b23b2 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
@@ -865,6 +865,26 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log) | |||
865 | return -ENOTSUPP; | 865 | return -ENOTSUPP; |
866 | } | 866 | } |
867 | 867 | ||
868 | int kvmppc_core_prepare_memory_region(struct kvm *kvm, | ||
869 | struct kvm_userspace_memory_region *mem) | ||
870 | { | ||
871 | return 0; | ||
872 | } | ||
873 | |||
874 | void kvmppc_core_commit_memory_region(struct kvm *kvm, | ||
875 | struct kvm_userspace_memory_region *mem) | ||
876 | { | ||
877 | } | ||
878 | |||
879 | int kvmppc_core_init_vm(struct kvm *kvm) | ||
880 | { | ||
881 | return 0; | ||
882 | } | ||
883 | |||
884 | void kvmppc_core_destroy_vm(struct kvm *kvm) | ||
885 | { | ||
886 | } | ||
887 | |||
868 | int __init kvmppc_booke_init(void) | 888 | int __init kvmppc_booke_init(void) |
869 | { | 889 | { |
870 | unsigned long ivor[16]; | 890 | unsigned long ivor[16]; |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 24e2b64b6a48..0c80e159c138 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -148,7 +148,7 @@ void kvm_arch_check_processor_compat(void *rtn) | |||
148 | 148 | ||
149 | int kvm_arch_init_vm(struct kvm *kvm) | 149 | int kvm_arch_init_vm(struct kvm *kvm) |
150 | { | 150 | { |
151 | return 0; | 151 | return kvmppc_core_init_vm(kvm); |
152 | } | 152 | } |
153 | 153 | ||
154 | void kvm_arch_destroy_vm(struct kvm *kvm) | 154 | void kvm_arch_destroy_vm(struct kvm *kvm) |
@@ -164,6 +164,9 @@ void kvm_arch_destroy_vm(struct kvm *kvm) | |||
164 | kvm->vcpus[i] = NULL; | 164 | kvm->vcpus[i] = NULL; |
165 | 165 | ||
166 | atomic_set(&kvm->online_vcpus, 0); | 166 | atomic_set(&kvm->online_vcpus, 0); |
167 | |||
168 | kvmppc_core_destroy_vm(kvm); | ||
169 | |||
167 | mutex_unlock(&kvm->lock); | 170 | mutex_unlock(&kvm->lock); |
168 | } | 171 | } |
169 | 172 | ||
@@ -212,7 +215,7 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm, | |||
212 | struct kvm_userspace_memory_region *mem, | 215 | struct kvm_userspace_memory_region *mem, |
213 | int user_alloc) | 216 | int user_alloc) |
214 | { | 217 | { |
215 | return 0; | 218 | return kvmppc_core_prepare_memory_region(kvm, mem); |
216 | } | 219 | } |
217 | 220 | ||
218 | void kvm_arch_commit_memory_region(struct kvm *kvm, | 221 | void kvm_arch_commit_memory_region(struct kvm *kvm, |
@@ -220,7 +223,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm, | |||
220 | struct kvm_memory_slot old, | 223 | struct kvm_memory_slot old, |
221 | int user_alloc) | 224 | int user_alloc) |
222 | { | 225 | { |
223 | return; | 226 | kvmppc_core_commit_memory_region(kvm, mem); |
224 | } | 227 | } |
225 | 228 | ||
226 | 229 | ||