Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197759
b: refs/heads/master
c: 51fb60d
h: refs/heads/master
i:
  197757: 4866e47
  197755: f5bfdf9
  197751: 8a859cd
  197743: f3c8022
  197727: 6a5cbd8
  197695: f449065
  197631: 25ce0b3
v: v3
  • Loading branch information
Gui Jianfeng authored and Avi Kivity committed May 17, 2010
1 parent 407d76d commit 3b4ec2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 66cbff59a16017234ea6c80ecddfc17b27a83504
refs/heads/master: 51fb60d81b483ae75614d401e7d4271884894113
6 changes: 4 additions & 2 deletions trunk/arch/x86/kvm/paging_tmpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,15 @@ static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp)
{
int i, offset, nr_present;
bool reset_host_protection;
gpa_t first_pte_gpa;

offset = nr_present = 0;

if (PTTYPE == 32)
offset = sp->role.quadrant << PT64_LEVEL_BITS;

first_pte_gpa = gfn_to_gpa(sp->gfn) + offset * sizeof(pt_element_t);

for (i = 0; i < PT64_ENT_PER_PAGE; i++) {
unsigned pte_access;
pt_element_t gpte;
Expand All @@ -587,8 +590,7 @@ static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp)
if (!is_shadow_present_pte(sp->spt[i]))
continue;

pte_gpa = gfn_to_gpa(sp->gfn);
pte_gpa += (i+offset) * sizeof(pt_element_t);
pte_gpa = first_pte_gpa + i * sizeof(pt_element_t);

if (kvm_read_guest_atomic(vcpu->kvm, pte_gpa, &gpte,
sizeof(pt_element_t)))
Expand Down

0 comments on commit 3b4ec2f

Please sign in to comment.