diff options
author | neel <neel@FreeBSD.org> | 2013-09-20 17:06:49 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2013-09-20 17:06:49 +0000 |
commit | 44c4dbefdb59e719e608d0ee0da3e7edbef93193 (patch) | |
tree | 77174d7c385a60aa52dd285919d35ba0c2cf8fa8 /sys/amd64 | |
parent | e0705f6378f45a0a074c7ff0fc6f39e1c2c255a1 (diff) | |
download | FreeBSD-src-44c4dbefdb59e719e608d0ee0da3e7edbef93193.zip FreeBSD-src-44c4dbefdb59e719e608d0ee0da3e7edbef93193.tar.gz |
Merge the following changes from projects/bhyve_npt_pmap:
- add fields to 'struct pmap' that are required to manage nested page tables.
- add a parameter to 'vmspace_alloc()' that can be used to override the
default pmap initialization routine 'pmap_pinit()'.
These changes are pushed ahead of the remaining changes in 'bhyve_npt_pmap'
in anticipation of the upcoming KBI freeze for 10.0.
Reviewed by: kib@, alc@
Approved by: re (glebius)
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/include/pmap.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index b570cb7..11e1cf2 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -231,6 +231,12 @@ struct md_page { int pat_mode; }; +enum pmap_type { + PT_X86, /* regular x86 page tables */ + PT_EPT, /* Intel's nested page tables */ + PT_RVI, /* AMD's nested page tables */ +}; + /* * The kernel virtual address (KVA) of the level 4 page table page is always * within the direct map (DMAP) region. @@ -243,9 +249,11 @@ struct pmap { cpuset_t pm_active; /* active on cpus */ cpuset_t pm_save; /* Context valid on cpus mask */ int pm_pcid; /* context id */ - /* spare u_int here due to padding */ + enum pmap_type pm_type; /* regular or nested tables */ struct pmap_statistics pm_stats; /* pmap statistics */ struct vm_radix pm_root; /* spare page table pages */ + long pm_eptgen; /* EPT pmap generation id */ + int pm_flags; }; typedef struct pmap *pmap_t; |