VirtualBox

Changeset 73268 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Jul 20, 2018 2:49:05 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123875
Message:

PGM: Working on consolidating templated code... bugref:9044

Location:
trunk/src/VBox/VMM/VMMAll
Files:
3 edited

Legend:

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

    r73266 r73268  
    593593PGMMODEDATASHW const g_aPgmShadowModeData[PGM_SHADOW_MODE_DATA_ARRAY_SIZE] =
    594594{
    595     { UINT8_MAX, NULL, NULL, NULL, NULL, NULL }, /* 0 */
    596     { UINT8_MAX, NULL, NULL, NULL, NULL, NULL }, /* PGM_TYPE_REAL */
    597     { UINT8_MAX, NULL, NULL, NULL, NULL, NULL }, /* PGM_TYPE_PROT */
     595    { UINT8_MAX, NULL, NULL, NULL, NULL }, /* 0 */
     596    { UINT8_MAX, NULL, NULL, NULL, NULL }, /* PGM_TYPE_REAL */
     597    { UINT8_MAX, NULL, NULL, NULL, NULL }, /* PGM_TYPE_PROT */
    598598    {
    599599        PGM_TYPE_32BIT,
     
    689689# define PGMMODEDATABTH_NULL_ENTRY()    { UINT32_MAX, UINT32_MAX, NULL, NULL, NULL, NULL, NULL, NULL }
    690690# define PGMMODEDATABTH_ENTRY(uShwT, uGstT, Nm) \
    691     { uShwT, uGstT, Nm(InvalidatePage), Nm(SyncCR3), Nm(PrefetchPage), Nm(VerifyAccessSyncPage), Nm(MapCR3), Nm(UnmapCR3), Nm(Enter), Nm(Relocate), }
     691    { uShwT, uGstT, Nm(InvalidatePage), Nm(SyncCR3), Nm(PrefetchPage), Nm(VerifyAccessSyncPage), Nm(MapCR3), Nm(UnmapCR3), Nm(Enter), }
    692692
    693693#elif defined(IN_RING3) && defined(VBOX_STRICT)
    694694# define PGMMODEDATABTH_NULL_ENTRY()    { UINT32_MAX, UINT32_MAX, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
    695695# define PGMMODEDATABTH_ENTRY(uShwT, uGstT, Nm) \
    696     { uShwT, uGstT, Nm(InvalidatePage), Nm(SyncCR3), Nm(PrefetchPage), Nm(VerifyAccessSyncPage), Nm(MapCR3), Nm(UnmapCR3), Nm(Enter), Nm(Relocate), Nm(AssertCR3) }
     696    { uShwT, uGstT, Nm(InvalidatePage), Nm(SyncCR3), Nm(PrefetchPage), Nm(VerifyAccessSyncPage), Nm(MapCR3), Nm(UnmapCR3), Nm(Enter), Nm(AssertCR3) }
    697697
    698698#else
     
    32483248    AssertPtrReturn(g_aPgmBothModeData[idxNewBth].pfnUnmapCR3, VERR_PGM_MODE_IPE);
    32493249    AssertPtrReturn(g_aPgmBothModeData[idxNewBth].pfnEnter, VERR_PGM_MODE_IPE);
    3250 #ifdef IN_RING3
    3251     AssertPtrReturn(g_aPgmBothModeData[idxNewBth].pfnRelocate, VERR_PGM_MODE_IPE);
    3252 #endif
    32533250#ifdef VBOX_STRICT
    32543251    AssertPtrReturn(g_aPgmBothModeData[idxNewBth].pfnAssertCR3, VERR_PGM_MODE_IPE);
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r73261 r73268  
    740740}
    741741
     742
     743#ifdef IN_RING3
     744/**
     745 * Relocate any GC pointers related to guest mode paging.
     746 *
     747 * @returns VBox status code.
     748 * @param   pVCpu       The cross context virtual CPU structure.
     749 * @param   offDelta    The relocation offset.
     750 */
     751PGM_GST_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta)
     752{
     753    pVCpu->pgm.s.pGst32BitPdRC += offDelta;
     754    for (unsigned i = 0; i < RT_ELEMENTS(pVCpu->pgm.s.apGstPaePDsRC); i++)
     755        pVCpu->pgm.s.apGstPaePDsRC[i] += offDelta;
     756    pVCpu->pgm.s.pGstPaePdptRC += offDelta;
     757
     758    return VINF_SUCCESS;
     759}
     760#endif
  • trunk/src/VBox/VMM/VMMAll/PGMAllShw.h

    r73267 r73268  
    582582}
    583583
     584
     585#ifdef IN_RING3
     586/**
     587 * Relocate any GC pointers related to shadow mode paging.
     588 *
     589 * @returns VBox status code.
     590 * @param   pVCpu       The cross context virtual CPU structure.
     591 * @param   offDelta    The relocation offset.
     592 */
     593PGM_SHW_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta)
     594{
     595    pVCpu->pgm.s.pShwPageCR3RC += offDelta;
     596    return VINF_SUCCESS;
     597}
     598#endif
     599
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