Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215918
b: refs/heads/master
c: 20bd40d
h: refs/heads/master
v: v3
  • Loading branch information
Xiao Guangrong authored and Avi Kivity committed Oct 24, 2010
1 parent 9886c32 commit fdfdaa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 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: 6292757fb0e758748fdb441861f8c50d397de9f0
refs/heads/master: 20bd40dc6492da293993559555df07d467fd202e
17 changes: 7 additions & 10 deletions trunk/arch/x86/kvm/paging_tmpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,
is_cpuid_PSE36())
gfn += pse36_gfn_delta(pte);

access |= write_fault ? PFERR_WRITE_MASK : 0;
access |= fetch_fault ? PFERR_FETCH_MASK : 0;
access |= user_fault ? PFERR_USER_MASK : 0;
access |= write_fault | fetch_fault | user_fault;

real_gpa = mmu->translate_gpa(vcpu, gfn_to_gpa(gfn),
access);
Expand Down Expand Up @@ -268,10 +266,9 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,
walker->error_code = 0;
if (present)
walker->error_code |= PFERR_PRESENT_MASK;
if (write_fault)
walker->error_code |= PFERR_WRITE_MASK;
if (user_fault)
walker->error_code |= PFERR_USER_MASK;

walker->error_code |= write_fault | user_fault;

if (fetch_fault && mmu->nx)
walker->error_code |= PFERR_FETCH_MASK;
if (rsvd_fault)
Expand Down Expand Up @@ -673,9 +670,9 @@ static gpa_t FNAME(gva_to_gpa)(struct kvm_vcpu *vcpu, gva_t vaddr, u32 access,
int r;

r = FNAME(walk_addr)(&walker, vcpu, vaddr,
!!(access & PFERR_WRITE_MASK),
!!(access & PFERR_USER_MASK),
!!(access & PFERR_FETCH_MASK));
access & PFERR_WRITE_MASK,
access & PFERR_USER_MASK,
access & PFERR_FETCH_MASK);

if (r) {
gpa = gfn_to_gpa(walker.gfn);
Expand Down

0 comments on commit fdfdaa5

Please sign in to comment.