Skip to content

Commit

Permalink
KVM: MMU: Only indicate a fetch fault in page fault error code if nx …
Browse files Browse the repository at this point in the history
…is enabled

Bit 4 of the page fault error code is set only if EFER.NX is set.

Reviewed-by: Xiao Guangrong <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
  • Loading branch information
avikivity committed Aug 2, 2010
1 parent 5d55f29 commit b0eeec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/paging_tmpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static int FNAME(walk_addr)(struct guest_walker *walker,
walker->error_code |= PFERR_WRITE_MASK;
if (user_fault)
walker->error_code |= PFERR_USER_MASK;
if (fetch_fault)
if (fetch_fault && is_nx(vcpu))
walker->error_code |= PFERR_FETCH_MASK;
if (rsvd_fault)
walker->error_code |= PFERR_RSVD_MASK;
Expand Down

0 comments on commit b0eeec2

Please sign in to comment.