diff options
author | Max Bruning <max@joyent.com> | 2011-07-12 07:35:09 -0700 |
---|---|---|
committer | Max Bruning <max@joyent.com> | 2011-07-12 07:35:09 -0700 |
commit | e44d671a7df88a9bc1e51b809b5a2a32a85b63bb (patch) | |
tree | 092979b6d0b7cc05e57aa48d19c116f032ad3dea /kvm.c | |
parent | 81ce4d6b18b89da85c986b24346f2191d5ad2b0e (diff) | |
download | illumos-kvm-e44d671a7df88a9bc1e51b809b5a2a32a85b63bb.tar.gz |
HVM-477 panic in gfn_to_hva
Diffstat (limited to 'kvm.c')
-rw-r--r-- | kvm.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -953,14 +953,11 @@ skip_lpage: slots->nmemslots = mem->slot + 1; slots->memslots[mem->slot].flags |= KVM_MEMSLOT_INVALID; + mutex_enter(&kvmp->memslots_lock); old_memslots = kvmp->memslots; -#ifdef XXX - rcu_assign_pointer(kvmp->memslots, slots); - synchronize_srcu_expedited(&kvm->srcu); -#else - XXX_KVM_SYNC_PROBE; kvmp->memslots = slots; -#endif + mutex_exit(&kvmp->memslots_lock); + /* * From this point no new shadow pages pointing to a deleted * memslot will be created. @@ -1002,7 +999,10 @@ skip_lpage: kvm_arch_commit_memory_region(kvmp, mem, old, user_alloc); + mutex_enter(&kvmp->memslots_lock); kvm_free_physmem_slot(&old, &new); + mutex_exit(&kvmp->memslots_lock); + kmem_free(old_memslots, sizeof (struct kvm_memslots)); if (flush_shadow) @@ -2186,8 +2186,8 @@ kvm_close(dev_t dev, int flag, int otyp, cred_t *cred) kvmp->kvm_clones--; mutex_exit(&kvm_lock); } else { - mutex_exit(&kvm_lock); kvm_destroy_vm(kvmp); + mutex_exit(&kvm_lock); } } |