Merge branch 'kvm-updates/2.6.35' of git://git.kernel.org/pub/scm/virt/kvm/kvm
* 'kvm-updates/2.6.35' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: Use kmalloc() instead of vmalloc() for KVM_[GS]ET_MSR KVM: MMU: fix conflict access permissions in direct sphifive-unleashed-5.1
commit
20ba5efb9c
|
@ -342,6 +342,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
|
||||||
/* advance table_gfn when emulating 1gb pages with 4k */
|
/* advance table_gfn when emulating 1gb pages with 4k */
|
||||||
if (delta == 0)
|
if (delta == 0)
|
||||||
table_gfn += PT_INDEX(addr, level);
|
table_gfn += PT_INDEX(addr, level);
|
||||||
|
access &= gw->pte_access;
|
||||||
} else {
|
} else {
|
||||||
direct = 0;
|
direct = 0;
|
||||||
table_gfn = gw->table_gfn[level - 2];
|
table_gfn = gw->table_gfn[level - 2];
|
||||||
|
|
|
@ -1562,7 +1562,7 @@ static int msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs __user *user_msrs,
|
||||||
|
|
||||||
r = -ENOMEM;
|
r = -ENOMEM;
|
||||||
size = sizeof(struct kvm_msr_entry) * msrs.nmsrs;
|
size = sizeof(struct kvm_msr_entry) * msrs.nmsrs;
|
||||||
entries = vmalloc(size);
|
entries = kmalloc(size, GFP_KERNEL);
|
||||||
if (!entries)
|
if (!entries)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
@ -1581,7 +1581,7 @@ static int msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs __user *user_msrs,
|
||||||
r = n;
|
r = n;
|
||||||
|
|
||||||
out_free:
|
out_free:
|
||||||
vfree(entries);
|
kfree(entries);
|
||||||
out:
|
out:
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue