+int alloc_memslots_rmaps(struct kvm *kvm, struct kvm_memslots *slots)
+{ + struct kvm_memory_slot *slot; + int r = 0; + + kvm_for_each_memslot(slot, slots) { + r = alloc_memslot_rmap(kvm, slot, slot->npages); + if (r) + break; + } + return r; +} +