nvmm: Add back NetBSD bits

Operating Systems / DragonFlyBSD - Aaron LI [aaronly.me] - 20 July 2021 23:28 UTC

Bring back the NetBSD bits lost during the porting. One minor change is required: MODULE_CLASS_MISC -> MODULE_CLASS_DRIVER. Otherwise, loading nvmm.kmod would fail with error:

module error: incompatible module class 1 for `nvmm' (wanted 3)

Now the same code builds and works on NetBSD (of course, NetBSD requires a different set of Makefiles).

8a0a54bf1b nvmm: Add back NetBSD bits
sys/dev/virtual/nvmm/nvmm_netbsd.c | 236 ++++++++++++++++++++++++++++
sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 6 +-
sys/dev/virtual/nvmm/x86/nvmm_x86_svmfunc.S | 23 ++-
sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 6 +-
sys/dev/virtual/nvmm/x86/nvmm_x86_vmxfunc.S | 13 +-
5 files changed, 277 insertions(+), 7 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share