From: Avi Kivity <avi@redhat.com>
To: kvm@vger.kernel.org
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Subject: [PATCH 1/2] KVM: MMU: Only indicate a fetch fault in page fault error code if nx is enabled
Date: Tue, 6 Jul 2010 16:49:35 +0300 [thread overview]
Message-ID: <1278424176-15310-2-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1278424176-15310-1-git-send-email-avi@redhat.com>
Bit 4 of the page fault error code is set only if EFER.NX is set.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
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 dfb2720..56c7f4f 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;
--
1.7.1
next prev parent reply other threads:[~2010-07-06 13:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 13:49 [PATCH 0/2] Fix walk_addr() page fault error codes Avi Kivity
2010-07-06 13:49 ` Avi Kivity [this message]
2010-07-06 13:49 ` [PATCH 2/2] KVM: MMU: Keep going on permission error Avi Kivity
2010-07-07 12:33 ` Jan Kiszka
2010-07-07 12:41 ` Avi Kivity
2010-07-08 11:14 ` Jan Kiszka
2010-07-08 11:19 ` Avi Kivity
2010-07-06 21:17 ` [PATCH 0/2] Fix walk_addr() page fault error codes Marcelo Tosatti
2010-07-07 1:49 ` Xiao Guangrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1278424176-15310-2-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.