diff options
author | bibo,mao <bibo.mao@intel.com> | 2006-10-21 12:37:02 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-10-21 12:37:02 -0400 |
commit | 7a71cef780404e8c90d23b1131142e158d94354b (patch) | |
tree | 7e961918153726f031fabd40f2bf695c24cd8c90 /include | |
parent | 690a973f48b6ba2954465992c08e65059c8374fe (diff) |
[PATCH] x86-64: x86_64 add NX mask for PTE entry
If function change_page_attr_addr calls revert_page to revert
to original pte value, mk_pte_phys does not mask NX bit. If NX bit
is set on no NX hardware supported x86_64 machine, there is will
be RSVD type page fault and system will crash. This patch adds NX
mask bit for PTE entry.
Signed-off-by: bibo,mao <bibo.mao@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86_64/pgtable.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 6899e770b173..0555c1c4d8fa 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -366,6 +366,7 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | |||
366 | { | 366 | { |
367 | pte_t pte; | 367 | pte_t pte; |
368 | pte_val(pte) = physpage | pgprot_val(pgprot); | 368 | pte_val(pte) = physpage | pgprot_val(pgprot); |
369 | pte_val(pte) &= __supported_pte_mask; | ||
369 | return pte; | 370 | return pte; |
370 | } | 371 | } |
371 | 372 | ||