Date: Tue, 25 Jun 2013 02:24:07 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r252188 - in projects/bhyve_npt_pmap/sys/amd64: amd64 include Message-ID: <201306250224.r5P2O7uI026940@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Tue Jun 25 02:24:07 2013 New Revision: 252188 URL: http://svnweb.freebsd.org/changeset/base/252188 Log: Identify the type of page tables that the 'pmap' is referring to using an 'enum pmap_type'. Modified: projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c projects/bhyve_npt_pmap/sys/amd64/include/pmap.h Modified: projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c ============================================================================== --- projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c Tue Jun 25 00:29:59 2013 (r252187) +++ projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c Tue Jun 25 02:24:07 2013 (r252188) @@ -1694,6 +1694,7 @@ pmap_pinit(pmap_t pmap) /* install self-referential address mapping entry(s) */ pmap->pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | PG_V | PG_RW | PG_A | PG_M; + pmap->pm_type = PT_X86; pmap->pm_root.rt_root = 0; CPU_ZERO(&pmap->pm_active); TAILQ_INIT(&pmap->pm_pvchunk); Modified: projects/bhyve_npt_pmap/sys/amd64/include/pmap.h ============================================================================== --- projects/bhyve_npt_pmap/sys/amd64/include/pmap.h Tue Jun 25 00:29:59 2013 (r252187) +++ projects/bhyve_npt_pmap/sys/amd64/include/pmap.h Tue Jun 25 02:24:07 2013 (r252188) @@ -236,6 +236,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. @@ -245,7 +251,7 @@ struct pmap { pml4_entry_t *pm_pml4; /* KVA of level 4 page table */ TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ cpuset_t pm_active; /* active on cpus */ - /* 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 */ };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306250224.r5P2O7uI026940>