diff options
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 87f4dc886076..4d213b8b0fb5 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -302,10 +302,18 @@ long kvm_arch_dev_ioctl(struct file *filp, | |||
302 | void kvm_arch_free_memslot(struct kvm_memory_slot *free, | 302 | void kvm_arch_free_memslot(struct kvm_memory_slot *free, |
303 | struct kvm_memory_slot *dont) | 303 | struct kvm_memory_slot *dont) |
304 | { | 304 | { |
305 | if (!dont || free->arch.rmap != dont->arch.rmap) { | ||
306 | vfree(free->arch.rmap); | ||
307 | free->arch.rmap = NULL; | ||
308 | } | ||
305 | } | 309 | } |
306 | 310 | ||
307 | int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages) | 311 | int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages) |
308 | { | 312 | { |
313 | slot->arch.rmap = vzalloc(npages * sizeof(*slot->arch.rmap)); | ||
314 | if (!slot->arch.rmap) | ||
315 | return -ENOMEM; | ||
316 | |||
309 | return 0; | 317 | return 0; |
310 | } | 318 | } |
311 | 319 | ||
@@ -326,8 +334,12 @@ void kvm_arch_commit_memory_region(struct kvm *kvm, | |||
326 | kvmppc_core_commit_memory_region(kvm, mem); | 334 | kvmppc_core_commit_memory_region(kvm, mem); |
327 | } | 335 | } |
328 | 336 | ||
337 | void kvm_arch_flush_shadow_all(struct kvm *kvm) | ||
338 | { | ||
339 | } | ||
329 | 340 | ||
330 | void kvm_arch_flush_shadow(struct kvm *kvm) | 341 | void kvm_arch_flush_shadow_memslot(struct kvm *kvm, |
342 | struct kvm_memory_slot *slot) | ||
331 | { | 343 | { |
332 | } | 344 | } |
333 | 345 | ||