git: nvmm: Port to DragonFly #24: pmap transform & TLB invalidation

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


commit 3ecc20a00d040552c4244a2ec7848d16c6af5e15
Author: Aaron LI <aly at aaronly.me>
Date:   Sun Jun 6 19:31:54 2021 +0800

    nvmm: Port to DragonFly #24: pmap transform & TLB invalidation
    
    * Port NetBSD's pmap_ept_transform() to DragonFly's.  We don't make
      'pmap_ept_has_ad' a global in the pmap code, so need to pass extra
      flags to our pmap_ept_transform().
    
    * Replace NetBSD's pmap_tlb_shootdown() with our pmap_inval_smp().
    
    * Add two new fields 'pm_data' & 'pm_tlb_flush' to 'struct pmap', which
      are used as a callback by NVMM to handle its own TLB invalidation.
    
      Note that pmap_enter() also calls pmap_inval_smp() on EPT/NPT pmap
      and requires the old PTE be returned, so we can't place the NVMM TLB
      callback at the beginning part of pmap_inval_smp() and return 0.

Summary of changes:
 sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c |  9 +++++++++
 sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 10 ++++++++--
 sys/platform/pc64/include/pmap.h        |  4 ++++
 sys/platform/pc64/x86_64/pmap.c         |  4 ++++
 sys/platform/pc64/x86_64/pmap_inval.c   | 18 ++++++++++++++++++
 5 files changed, 43 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3ecc20a00d040552c4244a2ec7848d16c6af5e15


-- 
DragonFly BSD source repository


More information about the Commits mailing list