git: nvmm: More OS independence
Aaron LI
aly at crater.dragonflybsd.org
Tue Jul 20 16:30:30 PDT 2021
commit 42862644e8ee2665cba60cb87a8169a3292cda97
Author: Aaron LI <aly at aaronly.me>
Date: Sun Jul 4 20:21:09 2021 +0800
nvmm: More OS independence
* Abstract out various OS-specific defines and functions and organize
them in 'nvmm_os.h' and 'nvmm_os.c'. This provides more flexibility
for us to port NVMM to DragonFly and other OSes.
* Remove 'nvmm_compat.h' and merge the code into the above new files.
Some local changes specific to DragonFly are not abstracted out, and
there also exists some NetBSD-specific code. The current version only
builds and works on DragonFly.
The OS-dependent code in nvmm_os.* and nvmm_x86.h is a bit messy at the
moment. I'll further clean them up later.
Summary of changes:
sys/conf/files | 1 +
sys/dev/virtual/nvmm/Makefile | 2 +-
sys/dev/virtual/nvmm/nvmm.c | 297 +++++++++----------
sys/dev/virtual/nvmm/nvmm.h | 4 +
sys/dev/virtual/nvmm/nvmm_compat.h | 504 --------------------------------
sys/dev/virtual/nvmm/nvmm_internal.h | 22 +-
sys/dev/virtual/nvmm/nvmm_ioctl.h | 7 +
sys/dev/virtual/nvmm/nvmm_os.c | 405 +++++++++++++++++++++++++
sys/dev/virtual/nvmm/nvmm_os.h | 387 ++++++++++++++++++++++++
sys/dev/virtual/nvmm/x86/nvmm_x86.c | 1 -
sys/dev/virtual/nvmm/x86/nvmm_x86.h | 234 +++++++++++++++
sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 342 +++++++++-------------
sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 502 ++++++++++++-------------------
13 files changed, 1517 insertions(+), 1191 deletions(-)
delete mode 100644 sys/dev/virtual/nvmm/nvmm_compat.h
create mode 100644 sys/dev/virtual/nvmm/nvmm_os.c
create mode 100644 sys/dev/virtual/nvmm/nvmm_os.h
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/42862644e8ee2665cba60cb87a8169a3292cda97
--
DragonFly BSD source repository
More information about the Commits
mailing list