VirtualBox

Changeset 71419 in vbox


Ignore:
Timestamp:
Mar 21, 2018 10:06:50 AM (7 years ago)
Author:
vboxsync
Message:

VMM/HM: Nested hw.virt: Don't double restore fields that are already restored by hardware-assisted SVM or IEM in the HM hook for the VM-exit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp

    r71417 r71419  
    153153         * The fields that are guaranteed to be read-only during SVM guest execution
    154154         * can safely be restored from our VMCB cache. Other fields like control registers
    155          * can potentially be modified (if the nested-hypervisor is not intercepting writes)
    156          * and thus we restore the actual virtual CPU values of these registers.
     155         * are already updated by hardware-assisted SVM or by IEM. We only restore those
     156         * fields that are potentially modified by hardware-assisted SVM.
    157157         */
    158158        pVmcbNstGstCtrl->u16InterceptRdCRx             = pNstGstVmcbCache->u16InterceptRdCRx;
     
    162162        pVmcbNstGstCtrl->u32InterceptXcpt              = pNstGstVmcbCache->u32InterceptXcpt;
    163163        pVmcbNstGstCtrl->u64InterceptCtrl              = pNstGstVmcbCache->u64InterceptCtrl;
    164         pVmcbNstGstState->u64CR0                       = pCtx->cr0;
    165         pVmcbNstGstState->u64CR3                       = pCtx->cr3;
    166         pVmcbNstGstState->u64CR4                       = pCtx->cr4;
    167         pVmcbNstGstState->u64EFER                      = pCtx->msrEFER;
    168164        pVmcbNstGstState->u64DBGCTL                    = pNstGstVmcbCache->u64DBGCTL;
    169165        pVmcbNstGstCtrl->u32VmcbCleanBits              = pNstGstVmcbCache->u32VmcbCleanBits;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette