git: nvmm: Improve FPU support and reduce diff against NetBSD

Aaron LI aly at
Tue Jul 20 16:30:28 PDT 2021

commit e809d7331258dcdc48c5719f441ab5c827a0df10
Author: Aaron LI <aly at>
Date:   Wed Jun 30 07:29:27 2021 +0800

    nvmm: Improve FPU support and reduce diff against NetBSD
    I was using 'struct savexmm64' to translate NetBSD's 'struct xsave_header'.
    This works but isn't good enough, because 'savexmm64' can't deal with
    xstate, so I disabled the xstate header related code in the old code.
    This commit changes to use 'struct saveymm64' instead.  It contains the
    XSAVE header and YMM xstate component, allowing us to enable the
    originally disabled xstate header code in NVMM.
    In addition, define some compat macros to adapt NetBSD's FPU structures
    to ours, reducing the NVMM code difference against NetBSD.
    Will later work on AVX support in guest VM.

Summary of changes:
 sys/dev/virtual/nvmm/nvmm_compat.h      | 11 +++++++++++
 sys/dev/virtual/nvmm/x86/nvmm_x86.c     | 12 ++++++------
 sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 21 +++++++++------------
 sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 20 +++++++++-----------
 4 files changed, 35 insertions(+), 29 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list