stlbe = &vcpu->arch.shadow_tlb[victim];
/* Get reference to new page. */
- down_write(¤t->mm->mmap_sem);
+ down_read(¤t->mm->mmap_sem);
new_page = gfn_to_page(vcpu->kvm, gfn);
if (is_error_page(new_page)) {
printk(KERN_ERR "Couldn't get guest page!\n");
kvm_release_page_clean(new_page);
+ up_read(¤t->mm->mmap_sem);
return;
}
hpaddr = page_to_phys(new_page);
/* Drop reference to old page. */
kvmppc_44x_shadow_release(vcpu, victim);
- up_write(¤t->mm->mmap_sem);
+ up_read(¤t->mm->mmap_sem);
vcpu->arch.shadow_pages[victim] = new_page;