Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45260
b: refs/heads/master
c: aef3d3f
h: refs/heads/master
v: v3
  • Loading branch information
Avi Kivity authored and Linus Torvalds committed Jan 6, 2007
1 parent cf6791e commit 2e78761
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 1b0973bd8f788178f21d9eebdd879203464f8528
refs/heads/master: aef3d3fe1314f2a130f5ccc7114df20865ba784f
11 changes: 7 additions & 4 deletions trunk/drivers/kvm/paging_tmpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,

shadow_addr = vcpu->mmu.root_hpa;
level = vcpu->mmu.shadow_root_level;
if (level == PT32E_ROOT_LEVEL) {
shadow_addr = vcpu->mmu.pae_root[(addr >> 30) & 3];
shadow_addr &= PT64_BASE_ADDR_MASK;
--level;
}

for (; ; level--) {
u32 index = SHADOW_PT_INDEX(addr, level);
Expand Down Expand Up @@ -202,10 +207,8 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
shadow_addr = kvm_mmu_alloc_page(vcpu, shadow_ent);
if (!VALID_PAGE(shadow_addr))
return ERR_PTR(-ENOMEM);
shadow_pte = shadow_addr | PT_PRESENT_MASK;
if (vcpu->mmu.root_level > 3 || level != 3)
shadow_pte |= PT_ACCESSED_MASK
| PT_WRITABLE_MASK | PT_USER_MASK;
shadow_pte = shadow_addr | PT_PRESENT_MASK | PT_ACCESSED_MASK
| PT_WRITABLE_MASK | PT_USER_MASK;
*shadow_ent = shadow_pte;
prev_shadow_ent = shadow_ent;
}
Expand Down

0 comments on commit 2e78761

Please sign in to comment.