git: nvmm: Make FPU state more OS-indenpendent

Aaron LI aly at crater.dragonflybsd.org
Tue Jul 20 16:30:30 PDT 2021


commit 23b2397d3e9775d301066c9a22f31ebb559af446
Author: Aaron LI <aly at aaronly.me>
Date:   Sat Jul 3 16:59:33 2021 +0800

    nvmm: Make FPU state more OS-indenpendent
    
    * Introduce an OS-indenpendent 'nvmm_x64_state_fpu' structure, derived
      from NetBSD's current FPU implementation.
    * Also introduce the 'nvmm_x86_xsave' structure, containing the FPU area
      and the XSAVE header.
    * Add the 'nvmm_x86_xsave_size()' that determines the XSAVE area size to
      simplify the code.
    * Rename gfpu -> gxsave, for clarity.
    * Define 'CTASSERT' because 'nvmm.h' and 'nvmm_x86.h' headers will
      be used by libnvmm(3), but <sys/cdefs.h> only defines 'CTASSERT' for
      kernel.
    * Update libnvmm.3 man page accordingly.

Summary of changes:
 lib/libnvmm/libnvmm.3                   |  4 +-
 sys/dev/virtual/nvmm/nvmm.h             |  6 +++
 sys/dev/virtual/nvmm/nvmm_compat.h      | 11 ------
 sys/dev/virtual/nvmm/x86/nvmm_x86.c     | 15 ++++++++
 sys/dev/virtual/nvmm/x86/nvmm_x86.h     | 65 ++++++++++++++++++++++++++++++---
 sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 41 ++++++++++-----------
 sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 42 ++++++++++-----------
 7 files changed, 121 insertions(+), 63 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/23b2397d3e9775d301066c9a22f31ebb559af446


-- 
DragonFly BSD source repository


More information about the Commits mailing list