Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179954
b: refs/heads/master
c: 82b7005
h: refs/heads/master
v: v3
  • Loading branch information
Sheng Yang authored and Marcelo Tosatti committed Jan 25, 2010
1 parent 0cecdaf commit 09ebb75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: e1f829b6f453c7985cfdfab616994b4051c3d788
refs/heads/master: 82b7005f0e72d8d1a8226e4c192cbb0850d10b3f
6 changes: 2 additions & 4 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ static int host_mapping_level(struct kvm *kvm, gfn_t gfn)

addr = gfn_to_hva(kvm, gfn);
if (kvm_is_error_hva(addr))
return page_size;
return PT_PAGE_TABLE_LEVEL;

down_read(&current->mm->mmap_sem);
vma = find_vma(current->mm, addr);
Expand Down Expand Up @@ -515,11 +515,9 @@ static int mapping_level(struct kvm_vcpu *vcpu, gfn_t large_gfn)
if (host_level == PT_PAGE_TABLE_LEVEL)
return host_level;

for (level = PT_DIRECTORY_LEVEL; level <= host_level; ++level) {

for (level = PT_DIRECTORY_LEVEL; level <= host_level; ++level)
if (has_wrprotected_page(vcpu->kvm, large_gfn, level))
break;
}

return level - 1;
}
Expand Down

0 comments on commit 09ebb75

Please sign in to comment.