powerpc.c (593d0a3e9f813db910dc50574532914db21d09ff) powerpc.c (2df72e9bc4c505d8357012f2924589f3d16f9d44)
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

--- 288 unchanged lines hidden (view full) ---

297 unsigned int ioctl, unsigned long arg)
298{
299 return -EINVAL;
300}
301
302void kvm_arch_free_memslot(struct kvm_memory_slot *free,
303 struct kvm_memory_slot *dont)
304{
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

--- 288 unchanged lines hidden (view full) ---

297 unsigned int ioctl, unsigned long arg)
298{
299 return -EINVAL;
300}
301
302void kvm_arch_free_memslot(struct kvm_memory_slot *free,
303 struct kvm_memory_slot *dont)
304{
305 if (!dont || free->arch.rmap != dont->arch.rmap) {
306 vfree(free->arch.rmap);
307 free->arch.rmap = NULL;
308 }
305}
306
307int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages)
308{
309}
310
311int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages)
312{
313 slot->arch.rmap = vzalloc(npages * sizeof(*slot->arch.rmap));
314 if (!slot->arch.rmap)
315 return -ENOMEM;
316
309 return 0;
310}
311
312int kvm_arch_prepare_memory_region(struct kvm *kvm,
313 struct kvm_memory_slot *memslot,
314 struct kvm_memory_slot old,
315 struct kvm_userspace_memory_region *mem,
316 int user_alloc)

--- 4 unchanged lines hidden (view full) ---

321void kvm_arch_commit_memory_region(struct kvm *kvm,
322 struct kvm_userspace_memory_region *mem,
323 struct kvm_memory_slot old,
324 int user_alloc)
325{
326 kvmppc_core_commit_memory_region(kvm, mem);
327}
328
317 return 0;
318}
319
320int kvm_arch_prepare_memory_region(struct kvm *kvm,
321 struct kvm_memory_slot *memslot,
322 struct kvm_memory_slot old,
323 struct kvm_userspace_memory_region *mem,
324 int user_alloc)

--- 4 unchanged lines hidden (view full) ---

329void kvm_arch_commit_memory_region(struct kvm *kvm,
330 struct kvm_userspace_memory_region *mem,
331 struct kvm_memory_slot old,
332 int user_alloc)
333{
334 kvmppc_core_commit_memory_region(kvm, mem);
335}
336
337void kvm_arch_flush_shadow_all(struct kvm *kvm)
338{
339}
329
340
330void kvm_arch_flush_shadow(struct kvm *kvm)
341void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
342 struct kvm_memory_slot *slot)
331{
332}
333
334struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
335{
336 struct kvm_vcpu *vcpu;
337 vcpu = kvmppc_core_vcpu_create(kvm, id);
338 if (!IS_ERR(vcpu)) {

--- 548 unchanged lines hidden ---
343{
344}
345
346struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
347{
348 struct kvm_vcpu *vcpu;
349 vcpu = kvmppc_core_vcpu_create(kvm, id);
350 if (!IS_ERR(vcpu)) {

--- 548 unchanged lines hidden ---