diff options
author | Avi Kivity <avi@redhat.com> | 2010-07-06 15:40:18 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-02 06:40:29 +0300 |
commit | b0eeec29fe7a5b114000f769bd68ffa02652bfb7 (patch) | |
tree | 203f6e2f0191c98d4b5460d90a73fa61d0c41e0d | |
parent | 5d55f299f97769130c6cc67896414c988db309ab (diff) | |
download | kernel_samsung_crespo-b0eeec29fe7a5b114000f769bd68ffa02652bfb7.zip kernel_samsung_crespo-b0eeec29fe7a5b114000f769bd68ffa02652bfb7.tar.gz kernel_samsung_crespo-b0eeec29fe7a5b114000f769bd68ffa02652bfb7.tar.bz2 |
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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 796a325..3a3f6d7 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -245,7 +245,7 @@ err: 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; |