diff options
author | H. Peter Anvin | 2010-07-28 08:28:28 +0200 |
---|---|---|
committer | H. Peter Anvin | 2010-07-28 08:28:28 +0200 |
commit | d3608b5681d238605b7da6be62244e803e24c649 (patch) | |
tree | 1fc47e9f58e6e938eefd40904745a60986739bde /arch/x86/kvm | |
parent | x86-64: Simplify loading initial_gs (diff) | |
parent | x86: Add memory modify constraints to xchg() and cmpxchg() (diff) | |
download | kernel-qcow2-linux-d3608b5681d238605b7da6be62244e803e24c649.tar.gz kernel-qcow2-linux-d3608b5681d238605b7da6be62244e803e24c649.tar.xz kernel-qcow2-linux-d3608b5681d238605b7da6be62244e803e24c649.zip |
Merge remote branch 'origin/x86/urgent' into x86/asm
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 1 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 89d66ca4d87c..2331bdc2b549 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -342,6 +342,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, /* advance table_gfn when emulating 1gb pages with 4k */ if (delta == 0) table_gfn += PT_INDEX(addr, level); + access &= gw->pte_access; } else { direct = 0; table_gfn = gw->table_gfn[level - 2]; diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 6127468ebbd2..33f0a84cfd93 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1562,7 +1562,7 @@ static int msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs __user *user_msrs, r = -ENOMEM; size = sizeof(struct kvm_msr_entry) * msrs.nmsrs; - entries = vmalloc(size); + entries = kmalloc(size, GFP_KERNEL); if (!entries) goto out; @@ -1581,7 +1581,7 @@ static int msr_io(struct kvm_vcpu *vcpu, struct kvm_msrs __user *user_msrs, r = n; out_free: - vfree(entries); + kfree(entries); out: return r; } |