commit aeee078a87aa2ccde9b4ee5c7a9c827eb2b925b1
Author: Aaron LI <a...@aaronly.me>
Date:   Tue Jun 15 07:26:03 2021 +0800

    nvmm: Fix SVM TSS restore on DragonFly
    
    In DragonFly, PCPU(tss_gdt) points directly to the gdt[] entry for the
    current CPU's TSS descriptor; while NetBSD's CPUVAR(GDT) points to the
    gdtstore[] table.  Fix that 'and' instruction so it works on DragonFly.
    (Credit to Matt Dillon for debugging and fixing this.)
    
    The 'and' instruction clears the busy bit (bit 41) so the TSS descriptor
    becomes "available" for the reloading, as required by 'ltr' instruction.
    (The TSS descriptor was in use prior to launching the guest so it has
    been marked busy.)
    
    Credit:
    * Illumos: Bug #13029: AMD bhyve should reload TSS ASAP
      https://www.illumos.org/issues/13029
    * Illumos: 13029 AMD bhyve should reload TSS ASAP
      
https://github.com/illumos/illumos-gate/commit/4d3fdeb14779bb6b0838521971d9ac99d65b0572

Summary of changes:
 sys/dev/virtual/nvmm/x86/nvmm_x86_svmfunc.S | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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


-- 
DragonFly BSD source repository

Reply via email to