git: nvmm: Make the ASM files more OS-independent
Aaron LI
aly at crater.dragonflybsd.org
Sat Oct 3 07:05:12 PDT 2026
commit 9bd9bca17d53c0f7d7bcd6cd3e029bb77ccb13a6
Author: Aaron LI <aly at aaronly.me>
Date: Sat Oct 3 13:14:13 2026 +0800
nvmm: Make the ASM files more OS-independent
* Introduce OS-independent ASM_FUNCTION and ASM_END macros.
* Move the OS-dependant bits to nvmm_x86_internal.h.
* Fetch the hgdt pointer in C with os_curcpu_gdt(), so svm_vmrun()
becomes OS-independent.
* Use RIP-relative addressing in vmx_insn_fail{valid,invalid}.
Obtained-from: NVMM Reference Implementation
Summary of changes:
sys/dev/virtual/nvmm/x86/nvmm_x86_internal.h | 25 ++++++++++++++++
sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 7 +++--
sys/dev/virtual/nvmm/x86/nvmm_x86_svmfunc.S | 40 +++++--------------------
sys/dev/virtual/nvmm/x86/nvmm_x86_vmxfunc.S | 44 +++++++++-------------------
4 files changed, 51 insertions(+), 65 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9bd9bca17d53c0f7d7bcd6cd3e029bb77ccb13a6
--
DragonFly BSD source repository
More information about the Commits
mailing list