git: pmap: Implement pmap_ept_transform() for NVMM
Aaron LI
aly at crater.dragonflybsd.org
Tue Jul 20 16:30:21 PDT 2021
commit 297019886e36c44b41a02c510e06e635ce29f43e
Author: Aaron LI <aly at aaronly.me>
Date: Sun Jun 6 11:30:13 2021 +0800
pmap: Implement pmap_ept_transform() for NVMM
The pmap_ept_transform() transforms an initialized pmap structure to be
EPT type for Intel VMX hypervisor (e.g., NVMM) use. This implementation
is derived from vmx_ept_init() and vmx_ept_pmap_pinit() in
'pc64/vmm/ept.c'.
Note that this function has a different prototype as NetBSD's one,
because we don't make 'pmap_ept_has_ad' a global variable so we need to
pass extra flags to the pmap.
When zeroing out the page directories, note that the valid area is two
pages if there is a pm_pmlpv_iso PTE installed (i.e., the system has
meltdown mitigation enabled), otherwise, it's only one page. (credit to
Matt Dillon)
Summary of changes:
sys/platform/pc64/x86_64/pmap.c | 67 +++++++++++++++++++++++++++++++++++++++++
sys/vm/pmap.h | 1 +
2 files changed, 68 insertions(+)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/297019886e36c44b41a02c510e06e635ce29f43e
--
DragonFly BSD source repository
More information about the Commits
mailing list