x86/mm: add information about faulted page's presence to npfec structure

This is provided explicitly in SVM and implicitly in VMX (when neither of
the three EPT_EFFECTIVE_* bits is set).

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
master commit: 1a966b46a0
master date: 2015-12-21 13:38:53 +0100
This commit is contained in:
Boris Ostrovsky authored and Jan Beulich committed 2016-02-17 16:33:59 +01:00
1 parent ae0034b4fa
commit d37c6d38f8
3 files changed
+7 -2

No files matched your search

+2 -1
View File
@@ -1467,7 +1467,8 @@ static void svm_do_nested_pgfault(struct vcpu *v,
struct npfec npfec = {
.read_access = !(pfec & PFEC_insn_fetch),
.write_access = !!(pfec & PFEC_write_access),
.insn_fetch = !!(pfec & PFEC_insn_fetch)
.insn_fetch = !!(pfec & PFEC_insn_fetch),
.present = !!(pfec & PFEC_page_present),
};
/* These bits are mutually exclusive */
+4 -1
View File
@@ -2627,7 +2627,10 @@ static void ept_handle_violation(unsigned long qualification, paddr_t gpa)
.read_access = !!(qualification & EPT_READ_VIOLATION) ||
!!(qualification & EPT_WRITE_VIOLATION),
.write_access = !!(qualification & EPT_WRITE_VIOLATION),
.insn_fetch = !!(qualification & EPT_EXEC_VIOLATION)
.insn_fetch = !!(qualification & EPT_EXEC_VIOLATION),
.present = !!(qualification & (EPT_EFFECTIVE_READ |
EPT_EFFECTIVE_WRITE |
EPT_EFFECTIVE_EXEC))
};
if ( tb_init_done )
+1
View File
@@ -159,6 +159,7 @@ struct npfec {
unsigned int read_access:1;
unsigned int write_access:1;
unsigned int insn_fetch:1;
unsigned int present:1;
unsigned int gla_valid:1;
unsigned int kind:2; /* npfec_kind_t */
};
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.