git: nvmm: Check for pending host events before VM entry

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


commit d33f1ab72c6e870a34ca45a24b9f1b368ab25a7a
Author: Aaron LI <aly at aaronly.me>
Date:   Sun Jun 27 11:59:13 2021 +0800

    nvmm: Check for pending host events before VM entry
    
    mycpu->gd_reqflags can accumulate action items (pending host interrupts,
    AST (asynchronous software trap), etc.).  Even if not in a critical
    section, some action items can accumulate.  When in a critical section,
    even more action items can accumulate.  Thus, gd_reqflags MUST be
    checked *after* hard interrupt disablement to determine if the VM entry
    has to be aborted, making the state safe to VM entry.
    
    Credit to Matt Dillon.

Summary of changes:
 sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 20 +++++++++++++++++++-
 sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 17 +++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d33f1ab72c6e870a34ca45a24b9f1b368ab25a7a


-- 
DragonFly BSD source repository



More information about the Commits mailing list