Lines Matching refs:old
706 * doesn't hold references to the old PFN.
1475 struct kvm_memory_slot *old,
1480 WARN_ON_ONCE(old->base_gfn != new->base_gfn);
1482 rb_replace_node(&old->gfn_node[idx], &new->gfn_node[idx],
1487 * Replace @old with @new in the inactive memslots.
1489 * With NULL @old this simply adds @new.
1490 * With NULL @new this simply removes @old.
1496 struct kvm_memory_slot *old,
1499 int as_id = kvm_memslots_get_as_id(old, new);
1503 if (old) {
1504 hash_del(&old->id_node[idx]);
1505 interval_tree_remove(&old->hva_node[idx], &slots->hva_tree);
1507 if ((long)old == atomic_long_read(&slots->last_used_slot))
1511 kvm_erase_gfn_node(slots, old);
1517 * Initialize @new's hva range. Do this even when replacing an @old
1534 * switch the node in the gfn tree instead of removing the old and
1539 if (old && old->base_gfn == new->base_gfn) {
1540 kvm_replace_gfn_node(slots, old, new);
1542 if (old)
1543 kvm_erase_gfn_node(slots, old);
1621 const struct kvm_memory_slot *old,
1628 * If dirty logging is disabled, nullify the bitmap; the old bitmap
1629 * will be freed on "commit". If logging is enabled in both old and
1637 else if (old && old->dirty_bitmap)
1638 new->dirty_bitmap = old->dirty_bitmap;
1649 r = kvm_arch_prepare_memory_region(kvm, old, new, change);
1652 if (r && new && new->dirty_bitmap && (!old || !old->dirty_bitmap))
1659 struct kvm_memory_slot *old,
1663 int old_flags = old ? old->flags : 0;
1670 kvm->nr_memslot_pages -= old->npages;
1680 kvm_arch_commit_memory_region(kvm, old, new, change);
1687 /* Free the old memslot and all its metadata. */
1688 kvm_free_memslot(kvm, old);
1696 if (old->dirty_bitmap && !new->dirty_bitmap)
1697 kvm_destroy_dirty_bitmap(old);
1700 * The final quirk. Free the detached, old slot, but only its
1704 kfree(old);
1713 * by swapping the active slots and then propagating @new to @old once @old is
1716 * With NULL @old this simply adds @new to @active (while swapping the sets).
1717 * With NULL @new this simply removes @old from @active and frees it
1721 struct kvm_memory_slot *old,
1724 int as_id = kvm_memslots_get_as_id(old, new);
1729 kvm_replace_memslot(kvm, old, new);
1746 struct kvm_memory_slot *old,
1754 kvm_copy_memslot(invalid_slot, old);
1756 kvm_replace_memslot(kvm, old, invalid_slot);
1763 kvm_swap_active_memslots(kvm, old->as_id);
1771 kvm_arch_flush_shadow_memslot(kvm, old);
1779 * old slot as the arch data could have changed between releasing
1784 old->arch = invalid_slot->arch;
1796 struct kvm_memory_slot *old,
1800 * Remove the old memslot (in the inactive memslots) by passing NULL as
1803 kvm_replace_memslot(kvm, old, NULL);
1808 struct kvm_memory_slot *old,
1813 * Replace the old memslot in the inactive slots, and then swap slots
1816 kvm_replace_memslot(kvm, old, new);
1821 struct kvm_memory_slot *old,
1826 * an intermediate step. Instead, the old memslot is simply replaced
1829 kvm_replace_memslot(kvm, old, new);
1830 kvm_activate_memslot(kvm, old, new);
1834 struct kvm_memory_slot *old,
1858 * Invalidate the old slot if it's being deleted or moved. This is
1866 * Modifications are done on a temporary, unreachable slot. The old
1876 kvm_invalidate_memslot(kvm, old, invalid_slot);
1879 r = kvm_prepare_memory_region(kvm, old, new, change);
1888 kvm_activate_memslot(kvm, invalid_slot, old);
1898 * version of the old slot. MOVE is particularly special as it reuses
1899 * the old slot and returns a copy of the old slot (in working_slot).
1900 * For CREATE, there is no old slot. For DELETE and FLAGS_ONLY, the
1901 * old slot is detached but otherwise preserved.
1906 kvm_delete_memslot(kvm, old, invalid_slot);
1908 kvm_move_memslot(kvm, old, new, invalid_slot);
1910 kvm_update_flags_memslot(kvm, old, new);
1923 kvm_commit_memory_region(kvm, old, new, change);
1952 struct kvm_memory_slot *old, *new;
1989 * Note, the old memslot (and the pointer itself!) may be invalidated
1992 old = id_to_memslot(slots, id);
1995 if (!old || !old->npages)
1998 if (WARN_ON_ONCE(kvm->nr_memslot_pages < old->npages))
2001 return kvm_set_memslot(kvm, old, NULL, KVM_MR_DELETE);
2007 if (!old || !old->npages) {
2017 if ((mem->userspace_addr != old->userspace_addr) ||
2018 (npages != old->npages) ||
2019 ((mem->flags ^ old->flags) & KVM_MEM_READONLY))
2022 if (base_gfn != old->base_gfn)
2024 else if (mem->flags != old->flags)
2046 r = kvm_set_memslot(kvm, old, new, change);
3418 unsigned int old, val, grow, grow_start;
3420 old = val = vcpu->halt_poll_ns;
3432 trace_kvm_halt_poll_ns_grow(vcpu->vcpu_id, val, old);
3437 unsigned int old, val, shrink, grow_start;
3439 old = val = vcpu->halt_poll_ns;
3451 trace_kvm_halt_poll_ns_shrink(vcpu->vcpu_id, val, old);
5625 * If NULL bus is installed, destroy the old bus, including all the