VirtualBox

Changeset 72769 in vbox


Ignore:
Timestamp:
Jun 29, 2018 11:10:00 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123310
Message:

VMM/HM: Avoid some CPUMQueryGuestCtxPtr calls.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

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

    r72767 r72769  
    2121*********************************************************************************************************************************/
    2222#define LOG_GROUP LOG_GROUP_HM
     23#define VMCPU_INCL_CPUM_GST_CTX
    2324#include <VBox/vmm/hm.h>
    2425#include <VBox/vmm/pgm.h>
     
    15531554#endif
    15541555
    1555     VBOXSTRICTRC rcStrict = g_HmR0.pfnRunGuestCode(pVM, pVCpu, CPUMQueryGuestCtxPtr(pVCpu));
     1556    VBOXSTRICTRC rcStrict = g_HmR0.pfnRunGuestCode(pVM, pVCpu, &pVCpu->cpum.GstCtx);
    15561557
    15571558#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r72749 r72769  
    12751275    {
    12761276        PVMCPU   pVCpu   = &pVM->aCpus[iCpu];
    1277         PCPUMCTX pCpuCtx = CPUMQueryGuestCtxPtr(pVCpu);
     1277        PCPUMCTX pCpuCtx = &pVCpu->cpum.GstCtx;
    12781278        pCpuCtx->fWorldSwitcher &= ~(CPUMCTX_WSF_IBPB_EXIT | CPUMCTX_WSF_IBPB_ENTRY);
    12791279        if (pVM->cpum.ro.HostFeatures.fIbpb)
     
    15871587                pVM->hm.s.vmx.pNonPagingModeEPTPageTable->a[i].u  = _4M * i;
    15881588                pVM->hm.s.vmx.pNonPagingModeEPTPageTable->a[i].u |= X86_PDE4M_P | X86_PDE4M_RW | X86_PDE4M_US
    1589                                                                   | X86_PDE4M_A | X86_PDE4M_D | X86_PDE4M_PS
    1590                                                                   | X86_PDE4M_G;
     1589                                                                 | X86_PDE4M_A | X86_PDE4M_D | X86_PDE4M_PS
     1590                                                                 | X86_PDE4M_G;
    15911591            }
    15921592
     
    22292229     * and make sure there is still room for our patch record.
    22302230     */
    2231     PCPUMCTX    pCtx   = CPUMQueryGuestCtxPtr(pVCpu);
     2231    PCPUMCTX    pCtx   = &pVCpu->cpum.GstCtx;
    22322232    PHMTPRPATCH pPatch = (PHMTPRPATCH)RTAvloU32Get(&pVM->hm.s.PatchTree, (AVLOU32KEY)pCtx->eip);
    22332233    if (pPatch)
     
    24052405     * and make sure there is still room for our patch record.
    24062406     */
    2407     PCPUMCTX    pCtx   = CPUMQueryGuestCtxPtr(pVCpu);
     2407    PCPUMCTX    pCtx   = &pVCpu->cpum.GstCtx;
    24082408    PHMTPRPATCH pPatch = (PHMTPRPATCH)RTAvloU32Get(&pVM->hm.s.PatchTree, (AVLOU32KEY)pCtx->eip);
    24092409    if (pPatch)
Note: See TracChangeset for help on using the changeset viewer.

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