VirtualBox

Ignore:
Timestamp:
Jun 15, 2018 11:00:02 AM (6 years ago)
Author:
vboxsync
Message:

EM,HM: Replaced HM exit history with the EM one. VT-x now reads TSC on every exit even when VMX_VMCS_CTRL_PROC_EXEC_RDTSC_EXIT is set. VT-x needed an API for updating the PC as RIP and CS are fetched from the VMCB. bugref:9044

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r72534 r72560  
    10401040    pVmcbCtrl->u64MSRPMPhysAddr = pVCpu->hm.s.svm.HCPhysMsrBitmap;
    10411041
    1042     /* Initialize the #VMEXIT history array with end-of-array markers (UINT16_MAX). */
    1043     Assert(!pVCpu->hm.s.idxExitHistoryFree);
    1044     HMCPU_EXIT_HISTORY_RESET(pVCpu);
    1045 
    10461042    /* Initially all VMCB clean bits MBZ indicating that everything should be loaded from the VMCB in memory. */
    10471043    Assert(pVmcbCtrl->u32VmcbCleanBits == 0);
     
    10611057        memcpy(pbMsrBitmapCur, pbMsrBitmap, SVM_MSRPM_PAGES << X86_PAGE_4K_SHIFT);
    10621058        pVmcbCtrlCur->u64MSRPMPhysAddr = pVCpuCur->hm.s.svm.HCPhysMsrBitmap;
    1063 
    1064         /* Initialize the #VMEXIT history array with end-of-array markers (UINT16_MAX). */
    1065         Assert(!pVCpuCur->hm.s.idxExitHistoryFree);
    1066         HMCPU_EXIT_HISTORY_RESET(pVCpuCur);
    10671059
    10681060        /* Initially all VMCB clean bits MBZ indicating that everything should be loaded from the VMCB in memory. */
     
    45844576
    45854577    pSvmTransient->u64ExitCode  = pVmcbCtrl->u64ExitCode;       /* Save the #VMEXIT reason. */
    4586     HMCPU_EXIT_HISTORY_ADD(pVCpu, pVmcbCtrl->u64ExitCode);      /* Update the #VMEXIT history array. */
    45874578    pVmcbCtrl->u32VmcbCleanBits       = HMSVM_VMCB_CLEAN_ALL;   /* Mark the VMCB-state cache as unmodified by VMM. */
    45884579    pSvmTransient->fVectoringDoublePF = false;                  /* Vectoring double page-fault needs to be determined later. */
     
    46114602        }
    46124603    }
     4604
     4605    EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_SVM, pSvmTransient->u64ExitCode & EMEXIT_F_TYPE_MASK),
     4606                     pMixedCtx->cs.u64Base + pMixedCtx->rip, uHostTsc);
    46134607}
    46144608
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