aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-07-06 08:40:18 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 23:40:29 -0400
commitb0eeec29fe7a5b114000f769bd68ffa02652bfb7 (patch)
tree203f6e2f0191c98d4b5460d90a73fa61d0c41e0d
parent5d55f299f97769130c6cc67896414c988db309ab (diff)
KVM: MMU: Only indicate a fetch fault in page fault error code if nx is enabled
Bit 4 of the page fault error code is set only if EFER.NX is set. Reviewed-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/x86/kvm/paging_tmpl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 796a325c7e59..3a3f6d784d79 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -245,7 +245,7 @@ err:
245 walker->error_code |= PFERR_WRITE_MASK; 245 walker->error_code |= PFERR_WRITE_MASK;
246 if (user_fault) 246 if (user_fault)
247 walker->error_code |= PFERR_USER_MASK; 247 walker->error_code |= PFERR_USER_MASK;
248 if (fetch_fault) 248 if (fetch_fault && is_nx(vcpu))
249 walker->error_code |= PFERR_FETCH_MASK; 249 walker->error_code |= PFERR_FETCH_MASK;
250 if (rsvd_fault) 250 if (rsvd_fault)
251 walker->error_code |= PFERR_RSVD_MASK; 251 walker->error_code |= PFERR_RSVD_MASK;