nvmm: Adjust EPT/NPT transform code for NetBSD
authorAaron LI <aly@aaronly.me>
Sun, 11 Jul 2021 14:47:23 +0000 (22:47 +0800)
committerAaron LI <aly@aaronly.me>
Tue, 20 Jul 2021 23:28:27 +0000 (07:28 +0800)
commit3f1b1a2b1ab407afd22c9efb41fd2ce2d7852575
tree9de655a152dff3f344ac8e83f5edc9a253045888
parent7f29793ea1fbb95d48086278b39c64deb35e6844
nvmm: Adjust EPT/NPT transform code for NetBSD

* Rename variable 'pmap_ept_has_ad' to 'vmx_ept_has_ad' to avoid
  conflict with the global variable in NetBSD.
* Set 'pmap_ept_has_ad' global for NetBSD in vmx_ident().
* Add macro os_vmspace_pmap() to 'nvmm_os.h'.
* Add ifdef's in vmx_machine_create() and svm_machine_create() to
  properly handle EPT/NPT pmap transform on both DragonFly and NetBSD.
sys/dev/virtual/nvmm/nvmm_os.h
sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c