diff options
author | Paul Mackerras <paulus@samba.org> | 2011-06-28 20:19:22 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-07-12 06:16:50 -0400 |
commit | f9e0554deca54a42fb2cf7f68c05a4a37461c205 (patch) | |
tree | e81771fec16fe3d4466e51f902ccf8ccd3e85c14 /arch/powerpc/kvm/powerpc.c | |
parent | 3cf658b605393d793ea52416c2306b86fbde9d9a (diff) |
KVM: PPC: Pass init/destroy vm and prepare/commit memory region ops down
This arranges for the top-level arch/powerpc/kvm/powerpc.c file to
pass down some of the calls it gets to the lower-level subarchitecture
specific code. The lower-level implementations (in booke.c and book3s.c)
are no-ops. The coming book3s_hv.c will need this.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 9 |
1 files changed, 6 insertions, 3 deletions
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 | ||