Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115287
b: refs/heads/master
c: 6c41f42
h: refs/heads/master
i:
  115285: c49a15f
  115283: 99a75a3
  115279: c6f8048
v: v3
  • Loading branch information
Avi Kivity committed Oct 15, 2008
1 parent 8fae0be commit 57488bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0be9e929e398d6da6406183a8732dbfd0937fafe
refs/heads/master: 6c41f428b72afe5a581b967590c12538db31d399
9 changes: 4 additions & 5 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,11 +1227,11 @@ static void nonpaging_new_cr3(struct kvm_vcpu *vcpu)
}

static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write,
int largepage, gfn_t gfn, pfn_t pfn,
int level)
int largepage, gfn_t gfn, pfn_t pfn)
{
hpa_t table_addr = vcpu->arch.mmu.root_hpa;
int pt_write = 0;
int level = vcpu->arch.mmu.shadow_root_level;

for (; ; level--) {
u32 index = PT64_INDEX(v, level);
Expand Down Expand Up @@ -1299,8 +1299,7 @@ static int nonpaging_map(struct kvm_vcpu *vcpu, gva_t v, int write, gfn_t gfn)
if (mmu_notifier_retry(vcpu, mmu_seq))
goto out_unlock;
kvm_mmu_free_some_pages(vcpu);
r = __direct_map(vcpu, v, write, largepage, gfn, pfn,
PT32E_ROOT_LEVEL);
r = __direct_map(vcpu, v, write, largepage, gfn, pfn);
spin_unlock(&vcpu->kvm->mmu_lock);


Expand Down Expand Up @@ -1455,7 +1454,7 @@ static int tdp_page_fault(struct kvm_vcpu *vcpu, gva_t gpa,
goto out_unlock;
kvm_mmu_free_some_pages(vcpu);
r = __direct_map(vcpu, gpa, error_code & PFERR_WRITE_MASK,
largepage, gfn, pfn, kvm_x86_ops->get_tdp_level());
largepage, gfn, pfn);
spin_unlock(&vcpu->kvm->mmu_lock);

return r;
Expand Down

0 comments on commit 57488bd

Please sign in to comment.