x86: define some unused PTE bits
These are ignored by the CPU and may be used for OS
accounting.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
diff --git a/arch/x86/gen_mmu.py b/arch/x86/gen_mmu.py
index e548170..05904be 100755
--- a/arch/x86/gen_mmu.py
+++ b/arch/x86/gen_mmu.py
@@ -72,6 +72,9 @@
FLAG_G = bit(8)
FLAG_XD = bit(63)
+FLAG_IGNORED0 = bit(9)
+FLAG_IGNORED1 = bit(10)
+FLAG_IGNORED2 = bit(11)
def debug(text):
if not args.verbose:
diff --git a/arch/x86/include/x86_mmu.h b/arch/x86/include/x86_mmu.h
index 4bc8e23..720b5b5 100644
--- a/arch/x86/include/x86_mmu.h
+++ b/arch/x86/include/x86_mmu.h
@@ -48,6 +48,13 @@
#define MMU_XD 0
#endif
+/* Unused PTE bits ignored by the CPU, which we use for our own OS purposes.
+ * These bits ignored for all paging modes.
+ */
+#define MMU_IGNORED0 BITL(9)
+#define MMU_IGNORED1 BITL(10)
+#define MMU_IGNORED2 BITL(11)
+
#ifdef CONFIG_EXCEPTION_DEBUG
/**
* Dump out page table entries for a particular virtual memory address