Lines Matching defs:new
985 * of the new file descriptor fails and the reference cannot be transferred to
1047 * "Insert" a new memslot by incrementing the number of used slots. Returns
1048 * the new slot's initial index into the memslots array.
1059 * its new index into the array is tracked. Returns the changed memslot's
1093 * is not preserved in the array, i.e. not swapped at this time, only its new
1128 * and tracking the new index for the update memslot. Only once its final
1134 * - When creating a memslot, the algorithm "inserts" the new memslot at the
1174 * Copy the memslot to its new position in memslots and update
1209 * Increment the new memslot generation a second time, dropping the
1261 struct kvm_memory_slot *new, int as_id,
1275 * in the freshly allocated memslots, not in @old or @new.
1284 * old memslots if preparing the new memory region fails.
1288 /* From this point no new shadow pages pointing to a deleted,
1299 r = kvm_arch_prepare_memory_region(kvm, new, mem, change);
1303 update_memslots(slots, new, change);
1306 kvm_arch_commit_memory_region(kvm, mem, old, new, change);
1322 struct kvm_memory_slot new;
1328 memset(&new, 0, sizeof(new));
1329 new.id = old->id;
1334 new.as_id = as_id;
1336 r = kvm_set_memslot(kvm, mem, old, &new, as_id, KVM_MR_DELETE);
1355 struct kvm_memory_slot old, new;
1403 new.as_id = as_id;
1404 new.id = id;
1405 new.base_gfn = mem->guest_phys_addr >> PAGE_SHIFT;
1406 new.npages = mem->memory_size >> PAGE_SHIFT;
1407 new.flags = mem->flags;
1408 new.userspace_addr = mem->userspace_addr;
1410 if (new.npages > KVM_MEM_MAX_NR_PAGES)
1415 new.dirty_bitmap = NULL;
1416 memset(&new.arch, 0, sizeof(new.arch));
1418 if ((new.userspace_addr != old.userspace_addr) ||
1419 (new.npages != old.npages) ||
1420 ((new.flags ^ old.flags) & KVM_MEM_READONLY))
1423 if (new.base_gfn != old.base_gfn)
1425 else if (new.flags != old.flags)
1431 new.dirty_bitmap = old.dirty_bitmap;
1432 memcpy(&new.arch, &old.arch, sizeof(new.arch));
1440 if (!((new.base_gfn + new.npages <= tmp->base_gfn) ||
1441 (new.base_gfn >= tmp->base_gfn + tmp->npages)))
1447 if (!(new.flags & KVM_MEM_LOG_DIRTY_PAGES))
1448 new.dirty_bitmap = NULL;
1449 else if (!new.dirty_bitmap) {
1450 r = kvm_alloc_dirty_bitmap(&new);
1455 bitmap_set(new.dirty_bitmap, 0, new.npages);
1458 r = kvm_set_memslot(kvm, mem, &old, &new, as_id, change);
1462 if (old.dirty_bitmap && !new.dirty_bitmap)
1467 if (new.dirty_bitmap && !old.dirty_bitmap)
1468 kvm_destroy_dirty_bitmap(&new);