VirtualBox

Changeset 81153 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 8, 2019 1:59:03 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133787
Message:

VMM: Removed most VBOX_WITH_REM preprocessor stuff. bugref:9576

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Config.kmk

    r80309 r81153  
    4646#endif
    4747# part of global DEFS
    48 #ifdef VBOX_WITH_REM
    49 # VMM_COMMON_DEFS += VBOX_WITH_REM
    50 #endif
    5148ifdef VBOX_WITH_MULTI_CORE
    5249 VMM_COMMON_DEFS += VBOX_WITH_MULTI_CORE
  • trunk/src/VBox/VMM/Makefile.kmk

    r80938 r81153  
    225225        VMMAll/PDMAllNetShaper.cpp
    226226endif
    227 ifdef VBOX_WITH_REM
    228 VBoxVMM_SOURCES += \
    229         VMMAll/REMAll.cpp
    230 endif
    231227
    232228ifdef VBOX_WITH_NATIVE_NEM
     
    545541        VMMAll/PDMAllNetShaper.cpp
    546542 endif
    547  ifdef VBOX_WITH_REM
    548 VMMR0_SOURCES += \
    549         VMMAll/REMAll.cpp
    550  endif
    551543VMMR0_SOURCES.amd64 = \
    552544        VMMR0/VMMR0JmpA-amd64.asm
  • trunk/src/VBox/VMM/VMMAll/APICAll.cpp

    r81150 r81153  
    30263026    }
    30273027#elif defined(IN_RING3)
    3028 # ifdef VBOX_WITH_REM
    3029     REMR3NotifyInterruptSet(pVCpu->CTX_SUFF(pVM), pVCpu);
    3030 # endif
    30313028    if (enmType != PDMAPICIRQ_HARDWARE)
    30323029        VMR3NotifyCpuFFU(pVCpu->pUVCpu, VMNOTIFYFF_FLAGS_DONE_REM | VMNOTIFYFF_FLAGS_POKE);
     
    30573054            break;
    30583055    }
    3059 
    3060 #if defined(IN_RING3) && defined(VBOX_WITH_REM)
    3061     REMR3NotifyInterruptClear(pVCpu->CTX_SUFF(pVM), pVCpu);
    3062 #endif
    30633056}
    30643057
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r80333 r81153  
    888888
    889889/**
    890  * Locks REM execution to a single VCPU.
    891  *
    892  * @param   pVM         The cross context VM structure.
    893  */
    894 VMMDECL(void) EMRemLock(PVM pVM)
    895 {
    896 #ifdef VBOX_WITH_REM
    897     if (!PDMCritSectIsInitialized(&pVM->em.s.CritSectREM))
    898         return;     /* early init */
    899 
    900     Assert(!PGMIsLockOwner(pVM));
    901     Assert(!IOMIsLockWriteOwner(pVM));
    902     int rc = PDMCritSectEnter(&pVM->em.s.CritSectREM, VERR_SEM_BUSY);
    903     AssertRCSuccess(rc);
    904 #else
    905     RT_NOREF(pVM);
    906 #endif
    907 }
    908 
    909 
    910 /**
    911  * Unlocks REM execution
    912  *
    913  * @param   pVM         The cross context VM structure.
    914  */
    915 VMMDECL(void) EMRemUnlock(PVM pVM)
    916 {
    917 #ifdef VBOX_WITH_REM
    918     if (!PDMCritSectIsInitialized(&pVM->em.s.CritSectREM))
    919         return;     /* early init */
    920 
    921     PDMCritSectLeave(&pVM->em.s.CritSectREM);
    922 #else
    923     RT_NOREF(pVM);
    924 #endif
    925 }
    926 
    927 
    928 /**
    929  * Check if this VCPU currently owns the REM lock.
    930  *
    931  * @returns bool owner/not owner
    932  * @param   pVM         The cross context VM structure.
    933  */
    934 VMMDECL(bool) EMRemIsLockOwner(PVM pVM)
    935 {
    936 #ifdef VBOX_WITH_REM
    937     if (!PDMCritSectIsInitialized(&pVM->em.s.CritSectREM))
    938         return true;   /* early init */
    939 
    940     return PDMCritSectIsOwner(&pVM->em.s.CritSectREM);
    941 #else
    942     RT_NOREF(pVM);
    943     return true;
    944 #endif
    945 }
    946 
    947 
    948 /**
    949  * Try to acquire the REM lock.
    950  *
    951  * @returns VBox status code
    952  * @param   pVM         The cross context VM structure.
    953  */
    954 VMM_INT_DECL(int) EMRemTryLock(PVM pVM)
    955 {
    956 #ifdef VBOX_WITH_REM
    957     if (!PDMCritSectIsInitialized(&pVM->em.s.CritSectREM))
    958         return VINF_SUCCESS; /* early init */
    959 
    960     return PDMCritSectTryEnter(&pVM->em.s.CritSectREM);
    961 #else
    962     RT_NOREF(pVM);
    963     return VINF_SUCCESS;
    964 #endif
    965 }
    966 
    967 
    968 /**
    969890 * @callback_method_impl{FNDISREADBYTES}
    970891 */
     
    1012933
    1013934
    1014 
    1015935/**
    1016936 * Disassembles the current instruction.
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r80333 r81153  
    850850
    851851
    852 #if defined(IN_RING3) && defined(VBOX_WITH_REM) /* Only used by REM. */
    853 
    854 /**
    855  * Reads a MMIO register.
    856  *
    857  * @returns VBox status code.
    858  *
    859  * @param   pVM         The cross context VM structure.
    860  * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
    861  * @param   GCPhys      The physical address to read.
    862  * @param   pu32Value   Where to store the value read.
    863  * @param   cbValue     The size of the register to read in bytes. 1, 2 or 4 bytes.
    864  */
    865 VMMDECL(VBOXSTRICTRC) IOMMMIORead(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, uint32_t *pu32Value, size_t cbValue)
    866 {
    867     Assert(pVCpu->iom.s.PendingMmioWrite.cbValue == 0);
    868     /* Take the IOM lock before performing any MMIO. */
    869     VBOXSTRICTRC rc = IOM_LOCK_SHARED(pVM);
    870 #ifndef IN_RING3
    871     if (rc == VERR_SEM_BUSY)
    872         return VINF_IOM_R3_MMIO_WRITE;
    873 #endif
    874     AssertRC(VBOXSTRICTRC_VAL(rc));
    875 
    876     /*
    877      * Lookup the current context range node and statistics.
    878      */
    879     PIOMMMIORANGE pRange = iomMmioGetRange(pVM, pVCpu, GCPhys);
    880     if (!pRange)
    881     {
    882         AssertMsgFailed(("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
    883         IOM_UNLOCK_SHARED(pVM);
    884         return VERR_IOM_MMIO_RANGE_NOT_FOUND;
    885     }
    886     iomMmioRetainRange(pRange);
    887 #ifndef VBOX_WITH_STATISTICS
    888     IOM_UNLOCK_SHARED(pVM);
    889 
    890 #else  /* VBOX_WITH_STATISTICS */
    891     PIOMMMIOSTATS pStats = iomMmioGetStats(pVM, pVCpu, GCPhys, pRange);
    892     if (!pStats)
    893     {
    894         iomMmioReleaseRange(pVM, pRange);
    895 # ifdef IN_RING3
    896         return VERR_NO_MEMORY;
    897 # else
    898         return VINF_IOM_R3_MMIO_READ;
    899 # endif
    900     }
    901     STAM_COUNTER_INC(&pStats->Accesses);
    902 #endif /* VBOX_WITH_STATISTICS */
    903 
    904     if (pRange->CTX_SUFF(pfnReadCallback))
    905     {
    906         /*
    907          * Perform locking.
    908          */
    909         PPDMDEVINS pDevIns = pRange->CTX_SUFF(pDevIns);
    910         rc = PDMCritSectEnter(pDevIns->CTX_SUFF(pCritSectRo), VINF_IOM_R3_MMIO_WRITE);
    911         if (rc != VINF_SUCCESS)
    912         {
    913             iomMmioReleaseRange(pVM, pRange);
    914             return rc;
    915         }
    916 
    917         /*
    918          * Perform the read and deal with the result.
    919          */
    920         STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfRead), a);
    921         if (   (cbValue == 4 && !(GCPhys & 3))
    922             || (pRange->fFlags & IOMMMIO_FLAGS_READ_MODE) == IOMMMIO_FLAGS_READ_PASSTHRU
    923             || (cbValue == 8 && !(GCPhys & 7)) )
    924             rc = pRange->CTX_SUFF(pfnReadCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser), GCPhys,
    925                                                    pu32Value, (unsigned)cbValue);
    926         else
    927             rc = iomMMIODoComplicatedRead(pVM, pRange, GCPhys, pu32Value, (unsigned)cbValue);
    928         STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfRead), a);
    929         switch (VBOXSTRICTRC_VAL(rc))
    930         {
    931             case VINF_SUCCESS:
    932                 Log4(("IOMMMIORead: GCPhys=%RGp *pu32=%08RX32 cb=%d rc=VINF_SUCCESS\n", GCPhys, *pu32Value, cbValue));
    933                 PDMCritSectLeave(pDevIns->CTX_SUFF(pCritSectRo));
    934                 iomMmioReleaseRange(pVM, pRange);
    935                 return rc;
    936 #ifndef IN_RING3
    937             case VINF_IOM_R3_MMIO_READ:
    938             case VINF_IOM_R3_MMIO_READ_WRITE:
    939                 STAM_COUNTER_INC(&pStats->CTX_MID_Z(Read,ToR3));
    940 #endif
    941             default:
    942                 Log4(("IOMMMIORead: GCPhys=%RGp *pu32=%08RX32 cb=%d rc=%Rrc\n", GCPhys, *pu32Value, cbValue, VBOXSTRICTRC_VAL(rc)));
    943                 PDMCritSectLeave(pDevIns->CTX_SUFF(pCritSectRo));
    944                 iomMmioReleaseRange(pVM, pRange);
    945                 return rc;
    946 
    947             case VINF_IOM_MMIO_UNUSED_00:
    948                 iomMMIODoRead00s(pu32Value, cbValue);
    949                 Log4(("IOMMMIORead: GCPhys=%RGp *pu32=%08RX32 cb=%d rc=%Rrc\n", GCPhys, *pu32Value, cbValue, VBOXSTRICTRC_VAL(rc)));
    950                 PDMCritSectLeave(pDevIns->CTX_SUFF(pCritSectRo));
    951                 iomMmioReleaseRange(pVM, pRange);
    952                 return VINF_SUCCESS;
    953 
    954             case VINF_IOM_MMIO_UNUSED_FF:
    955                 iomMMIODoReadFFs(pu32Value, cbValue);
    956                 Log4(("IOMMMIORead: GCPhys=%RGp *pu32=%08RX32 cb=%d rc=%Rrc\n", GCPhys, *pu32Value, cbValue, VBOXSTRICTRC_VAL(rc)));
    957                 PDMCritSectLeave(pDevIns->CTX_SUFF(pCritSectRo));
    958                 iomMmioReleaseRange(pVM, pRange);
    959                 return VINF_SUCCESS;
    960         }
    961         /* not reached */
    962     }
    963 #ifndef IN_RING3
    964     if (pRange->pfnReadCallbackR3)
    965     {
    966         STAM_COUNTER_INC(&pStats->CTX_MID_Z(Read,ToR3));
    967         iomMmioReleaseRange(pVM, pRange);
    968         return VINF_IOM_R3_MMIO_READ;
    969     }
    970 #endif
    971 
    972     /*
    973      * Unassigned memory - this is actually not supposed t happen...
    974      */
    975     STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfRead), a); /** @todo STAM_PROFILE_ADD_ZERO_PERIOD */
    976     STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfRead), a);
    977     iomMMIODoReadFFs(pu32Value, cbValue);
    978     Log4(("IOMMMIORead: GCPhys=%RGp *pu32=%08RX32 cb=%d rc=VINF_SUCCESS\n", GCPhys, *pu32Value, cbValue));
    979     iomMmioReleaseRange(pVM, pRange);
    980     return VINF_SUCCESS;
    981 }
    982 
    983 
    984 /**
    985  * Writes to a MMIO register.
    986  *
    987  * @returns VBox status code.
    988  *
    989  * @param   pVM         The cross context VM structure.
    990  * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
    991  * @param   GCPhys      The physical address to write to.
    992  * @param   u32Value    The value to write.
    993  * @param   cbValue     The size of the register to read in bytes. 1, 2 or 4 bytes.
    994  */
    995 VMMDECL(VBOXSTRICTRC) IOMMMIOWrite(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, uint32_t u32Value, size_t cbValue)
    996 {
    997     Assert(pVCpu->iom.s.PendingMmioWrite.cbValue == 0);
    998     /* Take the IOM lock before performing any MMIO. */
    999     VBOXSTRICTRC rc = IOM_LOCK_SHARED(pVM);
    1000 #ifndef IN_RING3
    1001     if (rc == VERR_SEM_BUSY)
    1002         return VINF_IOM_R3_MMIO_WRITE;
    1003 #endif
    1004     AssertRC(VBOXSTRICTRC_VAL(rc));
    1005 
    1006     /*
    1007      * Lookup the current context range node.
    1008      */
    1009     PIOMMMIORANGE pRange = iomMmioGetRange(pVM, pVCpu, GCPhys);
    1010     if (!pRange)
    1011     {
    1012         AssertMsgFailed(("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
    1013         IOM_UNLOCK_SHARED(pVM);
    1014         return VERR_IOM_MMIO_RANGE_NOT_FOUND;
    1015     }
    1016     iomMmioRetainRange(pRange);
    1017 #ifndef VBOX_WITH_STATISTICS
    1018     IOM_UNLOCK_SHARED(pVM);
    1019 
    1020 #else  /* VBOX_WITH_STATISTICS */
    1021     PIOMMMIOSTATS pStats = iomMmioGetStats(pVM, pVCpu, GCPhys, pRange);
    1022     if (!pStats)
    1023     {
    1024         iomMmioReleaseRange(pVM, pRange);
    1025 # ifdef IN_RING3
    1026         return VERR_NO_MEMORY;
    1027 # else
    1028         return VINF_IOM_R3_MMIO_WRITE;
    1029 # endif
    1030     }
    1031     STAM_COUNTER_INC(&pStats->Accesses);
    1032 #endif /* VBOX_WITH_STATISTICS */
    1033 
    1034     if (pRange->CTX_SUFF(pfnWriteCallback))
    1035     {
    1036         /*
    1037          * Perform locking.
    1038          */
    1039         PPDMDEVINS pDevIns = pRange->CTX_SUFF(pDevIns);
    1040         rc = PDMCritSectEnter(pDevIns->CTX_SUFF(pCritSectRo), VINF_IOM_R3_MMIO_READ);
    1041         if (rc != VINF_SUCCESS)
    1042         {
    1043             iomMmioReleaseRange(pVM, pRange);
    1044             return rc;
    1045         }
    1046 
    1047         /*
    1048          * Perform the write.
    1049          */
    1050         STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfWrite), a);
    1051         if (   (cbValue == 4 && !(GCPhys & 3))
    1052             || (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) == IOMMMIO_FLAGS_WRITE_PASSTHRU
    1053             || (cbValue == 8 && !(GCPhys & 7)) )
    1054             rc = pRange->CTX_SUFF(pfnWriteCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser),
    1055                                                     GCPhys, &u32Value, (unsigned)cbValue);
    1056         else
    1057             rc = iomMMIODoComplicatedWrite(pVM, pVCpu, pRange, GCPhys, &u32Value, (unsigned)cbValue);
    1058         STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfWrite), a);
    1059 #ifndef IN_RING3
    1060         if (    rc == VINF_IOM_R3_MMIO_WRITE
    1061             ||  rc == VINF_IOM_R3_MMIO_READ_WRITE)
    1062             STAM_COUNTER_INC(&pStats->CTX_MID_Z(Write,ToR3));
    1063 #endif
    1064         Log4(("IOMMMIOWrite: GCPhys=%RGp u32=%08RX32 cb=%d rc=%Rrc\n", GCPhys, u32Value, cbValue, VBOXSTRICTRC_VAL(rc)));
    1065         iomMmioReleaseRange(pVM, pRange);
    1066         PDMCritSectLeave(pDevIns->CTX_SUFF(pCritSectRo));
    1067         return rc;
    1068     }
    1069 #ifndef IN_RING3
    1070     if (pRange->pfnWriteCallbackR3)
    1071     {
    1072         STAM_COUNTER_INC(&pStats->CTX_MID_Z(Write,ToR3));
    1073         iomMmioReleaseRange(pVM, pRange);
    1074         return VINF_IOM_R3_MMIO_WRITE;
    1075     }
    1076 #endif
    1077 
    1078     /*
    1079      * No write handler, nothing to do.
    1080      */
    1081     STAM_PROFILE_START(&pStats->CTX_SUFF_Z(ProfWrite), a);
    1082     STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfWrite), a);
    1083     Log4(("IOMMMIOWrite: GCPhys=%RGp u32=%08RX32 cb=%d rc=%Rrc\n", GCPhys, u32Value, cbValue, VINF_SUCCESS));
    1084     iomMmioReleaseRange(pVM, pRange);
    1085     return VINF_SUCCESS;
    1086 }
    1087 
    1088 #endif /* IN_RING3 - only used by REM. */
    1089 
    1090852/**
    1091853 * Mapping an MMIO2 page in place of an MMIO page for direct access.
  • trunk/src/VBox/VMM/VMMAll/PDMAllQueue.cpp

    r81150 r81153  
    7676    ASMAtomicBitSet(&pVM->pdm.s.fQueueFlushing, PDM_QUEUE_FLUSH_FLAG_PENDING_BIT);
    7777#ifdef IN_RING3
    78 # ifdef VBOX_WITH_REM
    79     REMR3NotifyQueuePending(pVM); /** @todo r=bird: we can remove REMR3NotifyQueuePending and let VMR3NotifyFF do the work. */
    80 # endif
    8178    VMR3NotifyGlobalFFU(pVM->pUVM, VMNOTIFYFF_FLAGS_DONE_REM);
    8279#endif
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r81150 r81153  
    12181218    Log3(("PGMInvalidatePage: GCPtrPage=%RGv\n", GCPtrPage));
    12191219
    1220 #if !defined(IN_RING3) && defined(VBOX_WITH_REM)
    1221     /*
    1222      * Notify the recompiler so it can record this instruction.
    1223      */
    1224     REMNotifyInvalidatePage(pVM, GCPtrPage);
    1225 #endif
    12261220    IEMTlbInvalidatePage(pVCpu, GCPtrPage);
    12271221
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r81150 r81153  
    287287        pgmUnlock(pVM);
    288288
    289 #ifdef VBOX_WITH_REM
    290 # ifndef IN_RING3
    291         REMNotifyHandlerPhysicalRegister(pVM, pType->enmKind, GCPhys, GCPhysLast - GCPhys + 1, !!pType->pfnHandlerR3);
    292 # else
    293         REMR3NotifyHandlerPhysicalRegister(pVM, pType->enmKind, GCPhys, GCPhysLast - GCPhys + 1, !!pType->pfnHandlerR3);
    294 # endif
    295 #endif
    296289        if (rc != VINF_SUCCESS)
    297290            Log(("PGMHandlerPhysicalRegisterEx: returns %Rrc (%RGp-%RGp)\n", rc, GCPhys, GCPhysLast));
     
    611604    const bool fRestoreAsRAM2 = pCurType->pfnHandlerR3
    612605                             && pCurType->enmKind != PGMPHYSHANDLERKIND_MMIO; /** @todo this isn't entirely correct. */
    613 #ifdef VBOX_WITH_REM
    614 # ifndef IN_RING3
    615     REMNotifyHandlerPhysicalDeregister(pVM, pCurType->enmKind, GCPhysStart, GCPhysLast - GCPhysStart + 1,
    616                                        !!pCurType->pfnHandlerR3, fRestoreAsRAM2);
    617 # else
    618     REMR3NotifyHandlerPhysicalDeregister(pVM, pCurType->enmKind, GCPhysStart, GCPhysLast - GCPhysStart + 1,
    619                                          !!pCurType->pfnHandlerR3, fRestoreAsRAM2);
    620 # endif
    621 #endif
    622606    /** @todo do we need this notification? */
    623607    NEMHCNotifyHandlerPhysicalDeregister(pVM, pCurType->enmKind, GCPhysStart, GCPhysLast - GCPhysStart + 1,
     
    883867                    RTGCPHYS            const cb            = GCPhysLast - GCPhys + 1;
    884868                    PGMPHYSHANDLERKIND  const enmKind       = pCurType->enmKind;
    885 #ifdef VBOX_WITH_REM
    886                     bool                const fHasHCHandler = !!pCurType->pfnHandlerR3;
    887 #endif
    888869
    889870                    /*
     
    897878                    pgmUnlock(pVM);
    898879
    899 #ifdef VBOX_WITH_REM
    900 # ifndef IN_RING3
    901                     REMNotifyHandlerPhysicalModify(pVM, enmKind, GCPhysCurrent, GCPhys, cb,
    902                                                    fHasHCHandler, fRestoreAsRAM);
    903 # else
    904                     REMR3NotifyHandlerPhysicalModify(pVM, enmKind, GCPhysCurrent, GCPhys, cb,
    905                                                      fHasHCHandler, fRestoreAsRAM);
    906 # endif
    907 #endif
    908880                    PGM_INVL_ALL_VCPU_TLBS(pVM);
    909881                    Log(("PGMHandlerPhysicalModify: GCPhysCurrent=%RGp -> GCPhys=%RGp GCPhysLast=%RGp\n",
     
    17121684                            State.cErrors++;
    17131685                        }
    1714 
    1715 # ifdef VBOX_WITH_REM
    1716 #  ifdef IN_RING3
    1717                         /* validate that REM is handling it. */
    1718                         if (    !REMR3IsPageAccessHandled(pVM, State.GCPhys)
    1719                                 /* ignore shadowed ROM for the time being. */
    1720                             &&  PGM_PAGE_GET_TYPE(pPage) != PGMPAGETYPE_ROM_SHADOW)
    1721                         {
    1722                             AssertMsgFailed(("ram range vs phys handler REM mismatch. GCPhys=%RGp state=%d %s\n",
    1723                                              State.GCPhys, PGM_PAGE_GET_HNDL_PHYS_STATE(pPage), pPhysType->pszDesc));
    1724                             State.cErrors++;
    1725                         }
    1726 #  endif
    1727 # endif
    17281686                    }
    17291687                    else
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r81150 r81153  
    670670                Assert(VM_FF_IS_SET(pVM, VM_FF_PGM_NEED_HANDY_PAGES));
    671671                Assert(VM_FF_IS_SET(pVM, VM_FF_PGM_NO_MEMORY));
    672 #ifdef IN_RING3
    673 # ifdef VBOX_WITH_REM
    674                  REMR3NotifyFF(pVM);
    675 # endif
    676 #else
     672#ifndef IN_RING3
    677673                VMCPU_FF_SET(VMMGetCpu(pVM), VMCPU_FF_TO_R3); /* paranoia */
    678674#endif
  • trunk/src/VBox/VMM/VMMAll/TMAll.cpp

    r81150 r81153  
    291291        VMCPU_FF_SET(pVCpuDst, VMCPU_FF_TIMER);
    292292#ifdef IN_RING3
    293 # ifdef VBOX_WITH_REM
    294         REMR3NotifyTimerPending(pVM, pVCpuDst);
    295 # endif
    296293        VMR3NotifyCpuFFU(pVCpuDst->pUVCpu, VMNOTIFYFF_FLAGS_DONE_REM);
    297294#endif
     
    833830            Log5(("TMAll(%u): FF: %d -> 1\n", __LINE__, VMCPU_FF_IS_SET(pVCpuDst, VMCPU_FF_TIMER)));
    834831            VMCPU_FF_SET(pVCpuDst, VMCPU_FF_TIMER);
    835 #if defined(IN_RING3) && defined(VBOX_WITH_REM)
    836             REMR3NotifyTimerPending(pVM, pVCpuDst);
    837 #endif
    838832        }
    839833        LogFlow(("TMTimerPoll: expire1=%'RU64 <= now=%'RU64\n", u64Expire1, u64Now));
     
    879873                    Log5(("TMAll(%u): FF: %d -> 1\n", __LINE__, VMCPU_FF_IS_SET(pVCpuDst, VMCPU_FF_TIMER)));
    880874                    VMCPU_FF_SET(pVCpuDst, VMCPU_FF_TIMER);
    881 #if defined(IN_RING3) && defined(VBOX_WITH_REM)
    882                     REMR3NotifyTimerPending(pVM, pVCpuDst);
    883 #endif
    884875                }
    885876
     
    978969            Log5(("TMAll(%u): FF: %d -> 1\n", __LINE__, VMCPU_FF_IS_SET(pVCpuDst, VMCPU_FF_TIMER)));
    979970            VMCPU_FF_SET(pVCpuDst, VMCPU_FF_TIMER);
    980 #if defined(IN_RING3) && defined(VBOX_WITH_REM)
    981             REMR3NotifyTimerPending(pVM, pVCpuDst);
    982 #endif
    983971        }
    984972        STAM_COUNTER_INC(&pVM->tm.s.StatPollVirtualSync);
  • trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp

    r81150 r81153  
    251251                VMCPU_FF_SET(pVCpuDst, VMCPU_FF_TIMER);
    252252#ifdef IN_RING3
    253 # ifdef VBOX_WITH_REM
    254                 REMR3NotifyTimerPending(pVM, pVCpuDst);
    255 # endif
    256253                VMR3NotifyCpuFFU(pVCpuDst->pUVCpu, VMNOTIFYFF_FLAGS_DONE_REM);
    257254#endif
     
    412409            *pcNsToDeadline = 0;
    413410#ifdef IN_RING3
    414 # ifdef VBOX_WITH_REM
    415         REMR3NotifyTimerPending(pVM, pVCpuDst);
    416 # endif
    417411        VMR3NotifyCpuFFU(pVCpuDst->pUVCpu, VMNOTIFYFF_FLAGS_DONE_REM);
    418412#endif
     
    498492
    499493#ifdef IN_RING3
    500 # ifdef VBOX_WITH_REM
    501         REMR3NotifyTimerPending(pVM, pVCpuDst);
    502 # endif
    503494        VMR3NotifyCpuFFU(pVCpuDst->pUVCpu, VMNOTIFYFF_FLAGS_DONE_REM);
    504495#endif
     
    554545            VMCPU_FF_SET(pVCpuDst, VMCPU_FF_TIMER);
    555546#ifdef IN_RING3
    556 # ifdef VBOX_WITH_REM
    557             REMR3NotifyTimerPending(pVM, pVCpuDst);
    558 # endif
    559547            VMR3NotifyCpuFFU(pVCpuDst->pUVCpu, VMNOTIFYFF_FLAGS_DONE_REM /** @todo |VMNOTIFYFF_FLAGS_POKE*/);
    560548#endif
     
    724712            VMCPU_FF_SET(pVCpuDst, VMCPU_FF_TIMER);
    725713#ifdef IN_RING3
    726 # ifdef VBOX_WITH_REM
    727             REMR3NotifyTimerPending(pVM, pVCpuDst);
    728 # endif
    729714            VMR3NotifyCpuFFU(pVCpuDst->pUVCpu, VMNOTIFYFF_FLAGS_DONE_REM);
    730715#endif
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r81150 r81153  
    61676167    if (ASMAtomicUoReadU64(&pVCpu->hm.s.fCtxChanged) & HM_CHANGED_GUEST_SREG_MASK)
    61686168    {
    6169 #ifdef VBOX_WITH_REM
    6170         if (!pVM->hm.s.vmx.fUnrestrictedGuest)
    6171         {
    6172             Assert(!pVmxTransient->fIsNestedGuest);
    6173             Assert(pVM->hm.s.vmx.pRealModeTSS);
    6174             AssertCompile(PGMMODE_REAL < PGMMODE_PROTECTED);
    6175             if (   pVmcsInfo->fWasInRealMode
    6176                 && PGMGetGuestMode(pVCpu) >= PGMMODE_PROTECTED)
    6177             {
    6178                 /*
    6179                  * Notify the recompiler must flush its code-cache as the guest -may-
    6180                  * rewrite code it in real-mode (e.g. OpenBSD 4.0).
    6181                  */
    6182                 REMFlushTBs(pVM);
    6183                 Log4Func(("Switch to protected mode detected!\n"));
    6184                 pVmcsInfo->fWasInRealMode = false;
    6185             }
    6186         }
    6187 #endif
    61886169        if (ASMAtomicUoReadU64(&pVCpu->hm.s.fCtxChanged) & HM_CHANGED_GUEST_CS)
    61896170        {
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r81031 r81153  
    741741                           | VM_FF_DBGF                       | VM_FF_REQUEST                 | VM_FF_CHECK_VM_STATE
    742742                           | VM_FF_RESET                      | VM_FF_EMT_RENDEZVOUS          | VM_FF_PGM_NEED_HANDY_PAGES
    743                            | VM_FF_PGM_NO_MEMORY              | VM_FF_REM_HANDLER_NOTIFY      | VM_FF_DEBUG_SUSPEND;
     743                           | VM_FF_PGM_NO_MEMORY              | VM_FF_DEBUG_SUSPEND;
    744744    uint64_t const fCpuFFs = VMCPU_FF_TIMER                   | VMCPU_FF_PDM_CRITSECT         | VMCPU_FF_IEM
    745745                           | VMCPU_FF_REQUEST                 | VMCPU_FF_DBGF                 | VMCPU_FF_HM_UPDATE_CR3
     
    12281228                    STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMAllocHandy);
    12291229                    break;
    1230                 case VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS:
    1231                     STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallRemReplay);
    1232                     break;
    12331230                case VMMCALLRING3_VMM_LOGGER_FLUSH:
    12341231                    STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallLogFlush);
  • trunk/src/VBox/VMM/VMMR3/DBGF.cpp

    r81150 r81153  
    550550
    551551    /*
    552      * Sync back the state from the REM.
     552     * Set flag.
    553553     */
    554554    dbgfR3EventSetStoppedInHyperFlag(pVM, enmEvent);
    555 #ifdef VBOX_WITH_REM
    556     if (!pVM->dbgf.s.fStoppedInHyper)
    557         REMR3StateUpdate(pVM, pVCpu);
    558 #endif
    559555
    560556    /*
  • trunk/src/VBox/VMM/VMMR3/DBGFBp.cpp

    r81150 r81153  
    821821        int rc = VINF_SUCCESS;
    822822        if (!pBp->fEnabled)
    823 #ifdef VBOX_WITH_REM
    824             rc = REMR3BreakpointSet(pVM, pBp->u.Rem.GCPtr);
    825 #else
    826823            rc = IEMBreakpointSet(pVM, pBp->u.Rem.GCPtr);
    827 #endif
    828824        if (RT_SUCCESS(rc))
    829825        {
     
    850846     * Now ask REM to set the breakpoint.
    851847     */
    852 #ifdef VBOX_WITH_REM
    853     int rc = REMR3BreakpointSet(pVM, pAddress->FlatPtr);
    854 #else
    855848    int rc = IEMBreakpointSet(pVM, pAddress->FlatPtr);
    856 #endif
    857849    if (RT_SUCCESS(rc))
    858850    {
     
    11711163
    11721164            case DBGFBPTYPE_REM:
    1173 #ifdef VBOX_WITH_REM
    1174                 rc = REMR3BreakpointClear(pVM, pBp->u.Rem.GCPtr);
    1175 #else
    11761165                rc = IEMBreakpointClear(pVM, pBp->u.Rem.GCPtr);
    1177 #endif
    11781166                break;
    11791167
     
    12581246
    12591247        case DBGFBPTYPE_REM:
    1260 #ifdef VBOX_WITH_REM
    1261             rc = REMR3BreakpointSet(pVM, pBp->u.Rem.GCPtr);
    1262 #else
    12631248            rc = IEMBreakpointSet(pVM, pBp->u.Rem.GCPtr);
    1264 #endif
    12651249            break;
    12661250
     
    13411325
    13421326        case DBGFBPTYPE_REM:
    1343 #ifdef VBOX_WITH_REM
    1344             rc = REMR3BreakpointClear(pVM, pBp->u.Rem.GCPtr);
    1345 #else
    13461327            rc = IEMBreakpointClear(pVM, pBp->u.Rem.GCPtr);
    1347 #endif
    13481328            break;
    13491329
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r81150 r81153  
    190190    }
    191191
    192 #ifdef VBOX_WITH_REM
    193     /*
    194      * Initialize the REM critical section.
    195      */
    196     AssertCompileMemberAlignment(EM, CritSectREM, sizeof(uintptr_t));
    197     rc = PDMR3CritSectInit(pVM, &pVM->em.s.CritSectREM, RT_SRC_POS, "EM-REM");
    198     AssertRCReturn(rc, rc);
    199 #endif
    200 
    201192    /*
    202193     * Saved state.
     
    424415VMMR3_INT_DECL(int) EMR3Term(PVM pVM)
    425416{
    426 #ifdef VBOX_WITH_REM
    427     PDMR3CritSectDelete(&pVM->em.s.CritSectREM);
    428 #else
    429417    RT_NOREF(pVM);
    430 #endif
    431418    return VINF_SUCCESS;
    432419}
     
    834821                else if (pVCpu->em.s.enmState == EMSTATE_DEBUG_GUEST_NEM)
    835822                    rc = VBOXSTRICTRC_TODO(emR3NemSingleInstruction(pVM, pVCpu, 0 /*fFlags*/));
    836 #ifdef VBOX_WITH_REM
     823#ifdef VBOX_WITH_REM /** @todo fix me? */
    837824                else if (pVCpu->em.s.enmState == EMSTATE_DEBUG_GUEST_REM)
    838825                    rc = emR3RemStep(pVM, pVCpu);
     
    1005992    Log3(("emR3RemStep: cs:eip=%04x:%08x\n", CPUMGetGuestCS(pVCpu),  CPUMGetGuestEIP(pVCpu)));
    1006993
    1007 # ifdef VBOX_WITH_REM
    1008     EMRemLock(pVM);
    1009 
    1010     /*
    1011      * Switch to REM, step instruction, switch back.
    1012      */
    1013     int rc = REMR3State(pVM, pVCpu);
    1014     if (RT_SUCCESS(rc))
    1015     {
    1016         rc = REMR3Step(pVM, pVCpu);
    1017         REMR3StateBack(pVM, pVCpu);
    1018     }
    1019     EMRemUnlock(pVM);
    1020 
    1021 # else
    1022994    int rc = VBOXSTRICTRC_TODO(IEMExecOne(pVCpu)); NOREF(pVM);
    1023 # endif
    1024995
    1025996    Log3(("emR3RemStep: returns %Rrc cs:eip=%04x:%08x\n", rc, CPUMGetGuestCS(pVCpu),  CPUMGetGuestEIP(pVCpu)));
     
    1027998}
    1028999#endif /* VBOX_WITH_REM || DEBUG */
    1029 
    1030 
    1031 #ifdef VBOX_WITH_REM
    1032 /**
    1033  * emR3RemExecute helper that syncs the state back from REM and leave the REM
    1034  * critical section.
    1035  *
    1036  * @returns false - new fInREMState value.
    1037  * @param   pVM         The cross context VM structure.
    1038  * @param   pVCpu       The cross context virtual CPU structure.
    1039  */
    1040 DECLINLINE(bool) emR3RemExecuteSyncBack(PVM pVM, PVMCPU pVCpu)
    1041 {
    1042     STAM_PROFILE_START(&pVCpu->em.s.StatREMSync, a);
    1043     REMR3StateBack(pVM, pVCpu);
    1044     STAM_PROFILE_STOP(&pVCpu->em.s.StatREMSync, a);
    1045 
    1046     EMRemUnlock(pVM);
    1047     return false;
    1048 }
    1049 #endif
    10501000
    10511001
     
    10881038     */
    10891039    *pfFFDone = false;
    1090 #ifdef VBOX_WITH_REM
    1091     bool    fInREMState = false;
    1092 #else
    10931040    uint32_t cLoops     = 0;
    1094 #endif
    10951041    int     rc          = VINF_SUCCESS;
    10961042    for (;;)
    10971043    {
    1098 #ifdef VBOX_WITH_REM
    1099         /*
    1100          * Lock REM and update the state if not already in sync.
    1101          *
    1102          * Note! Big lock, but you are not supposed to own any lock when
    1103          *       coming in here.
    1104          */
    1105         if (!fInREMState)
    1106         {
    1107             EMRemLock(pVM);
    1108             STAM_PROFILE_START(&pVCpu->em.s.StatREMSync, b);
    1109 
    1110             /* Flush the recompiler translation blocks if the VCPU has changed,
    1111                also force a full CPU state resync. */
    1112             if (pVM->em.s.idLastRemCpu != pVCpu->idCpu)
    1113             {
    1114                 REMFlushTBs(pVM);
    1115                 CPUMSetChangedFlags(pVCpu, CPUM_CHANGED_ALL);
    1116             }
    1117             pVM->em.s.idLastRemCpu = pVCpu->idCpu;
    1118 
    1119             rc = REMR3State(pVM, pVCpu);
    1120 
    1121             STAM_PROFILE_STOP(&pVCpu->em.s.StatREMSync, b);
    1122             if (RT_FAILURE(rc))
    1123                 break;
    1124             fInREMState = true;
    1125 
    1126             /*
    1127              * We might have missed the raising of VMREQ, TIMER and some other
    1128              * important FFs while we were busy switching the state. So, check again.
    1129              */
    1130             if (    VM_FF_IS_ANY_SET(pVM, VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_DBGF | VM_FF_CHECK_VM_STATE | VM_FF_RESET)
    1131                 ||  VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_TIMER | VMCPU_FF_REQUEST))
    1132             {
    1133                 LogFlow(("emR3RemExecute: Skipping run, because FF is set. %#x\n", pVM->fGlobalForcedActions));
    1134                 goto l_REMDoForcedActions;
    1135             }
    1136         }
    1137 #endif
    1138 
    11391044        /*
    11401045         * Execute REM.
     
    11431048        {
    11441049            STAM_PROFILE_START(&pVCpu->em.s.StatREMExec, c);
    1145 #ifdef VBOX_WITH_REM
    1146             rc = REMR3Run(pVM, pVCpu);
    1147 #else
    11481050            rc = VBOXSTRICTRC_TODO(IEMExecLots(pVCpu, 8192 /*cMaxInstructions*/, 4095 /*cPollRate*/, NULL /*pcInstructions*/));
    1149 #endif
    11501051            STAM_PROFILE_STOP(&pVCpu->em.s.StatREMExec, c);
    11511052        }
     
    11651066        if (    VM_FF_IS_ANY_SET(pVM, VM_FF_HIGH_PRIORITY_POST_MASK)
    11661067            ||  VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_HIGH_PRIORITY_POST_MASK))
    1167         {
    1168 #ifdef VBOX_WITH_REM
    1169             fInREMState = emR3RemExecuteSyncBack(pVM, pVCpu);
    1170 #endif
    11711068            rc = VBOXSTRICTRC_TODO(emR3HighPriorityPostForcedActions(pVM, pVCpu, rc));
    1172         }
    11731069
    11741070        /*
     
    11811077            if (rc != VINF_REM_INTERRUPED_FF)
    11821078            {
    1183 #ifndef VBOX_WITH_REM
    11841079                /* Try dodge unimplemented IEM trouble by reschduling. */
    11851080                if (   rc == VERR_IEM_ASPECT_NOT_IMPLEMENTED
     
    11931088                    }
    11941089                }
    1195 #endif
    11961090
    11971091                /*
     
    12181112            ||  VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_ALL_REM_MASK) )
    12191113        {
    1220 #ifdef VBOX_WITH_REM
    1221 l_REMDoForcedActions:
    1222             if (fInREMState)
    1223                 fInREMState = emR3RemExecuteSyncBack(pVM, pVCpu);
    1224 #endif
    12251114            STAM_REL_PROFILE_ADV_SUSPEND(&pVCpu->em.s.StatREMTotal, a);
    12261115            rc = emR3ForcedActions(pVM, pVCpu, rc);
     
    12351124        }
    12361125
    1237 #ifndef VBOX_WITH_REM
    12381126        /*
    12391127         * Have to check if we can get back to fast execution mode every so often.
     
    12461134                return VINF_EM_RESCHEDULE;
    12471135        }
    1248 #endif
    12491136
    12501137    } /* The Inner Loop, recompiled execution mode version. */
    1251 
    1252 
    1253 #ifdef VBOX_WITH_REM
    1254     /*
    1255      * Returning. Sync back the VM state if required.
    1256      */
    1257     if (fInREMState)
    1258         fInREMState = emR3RemExecuteSyncBack(pVM, pVCpu);
    1259 #endif
    12601138
    12611139    STAM_REL_PROFILE_ADV_STOP(&pVCpu->em.s.StatREMTotal, a);
     
    18941772        }
    18951773
    1896 #ifdef VBOX_WITH_REM
    1897         /* Replay the handler notification changes. */
    1898         if (VM_FF_IS_PENDING_EXCEPT(pVM, VM_FF_REM_HANDLER_NOTIFY, VM_FF_PGM_NO_MEMORY))
    1899         {
    1900             /* Try not to cause deadlocks. */
    1901             if (    pVM->cCpus == 1
    1902                 ||  (   !PGMIsLockOwner(pVM)
    1903                      && !IOMIsLockWriteOwner(pVM))
    1904                )
    1905             {
    1906                 EMRemLock(pVM);
    1907                 REMR3ReplayHandlerNotifications(pVM);
    1908                 EMRemUnlock(pVM);
    1909             }
    1910         }
    1911 #endif
    1912 
    19131774        /* check that we got them all  */
    1914         AssertCompile(VM_FF_NORMAL_PRIORITY_MASK == (VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_REM_HANDLER_NOTIFY | VM_FF_EMT_RENDEZVOUS));
     1775        AssertCompile(VM_FF_NORMAL_PRIORITY_MASK == (VM_FF_REQUEST | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_EMT_RENDEZVOUS));
    19151776    }
    19161777
  • trunk/src/VBox/VMM/VMMR3/EMHM.cpp

    r81150 r81153  
    198198    STAM_PROFILE_STOP(&pVCpu->em.s.StatIEMEmu, a);
    199199
    200     if (   rcStrict == VERR_IEM_ASPECT_NOT_IMPLEMENTED
    201         || rcStrict == VERR_IEM_INSTR_NOT_IMPLEMENTED)
    202     {
    203 #ifdef VBOX_WITH_REM
    204         STAM_PROFILE_START(&pVCpu->em.s.StatREMEmu, b);
    205         EMRemLock(pVM);
    206         /* Flush the recompiler TLB if the VCPU has changed. */
    207         if (pVM->em.s.idLastRemCpu != pVCpu->idCpu)
    208             CPUMSetChangedFlags(pVCpu, CPUM_CHANGED_ALL);
    209         pVM->em.s.idLastRemCpu = pVCpu->idCpu;
    210 
    211         rcStrict = REMR3EmulateInstruction(pVM, pVCpu);
    212         EMRemUnlock(pVM);
    213         STAM_PROFILE_STOP(&pVCpu->em.s.StatREMEmu, b);
    214 #else  /* !VBOX_WITH_REM */
    215         NOREF(pVM);
    216 #endif /* !VBOX_WITH_REM */
    217     }
    218 
    219200    return VBOXSTRICTRC_TODO(rcStrict);
    220201}
  • trunk/src/VBox/VMM/VMMR3/EMR3Nem.cpp

    r81150 r81153  
    202202    STAM_PROFILE_STOP(&pVCpu->em.s.StatIEMEmu, a);
    203203
    204     if (   rcStrict == VERR_IEM_ASPECT_NOT_IMPLEMENTED
    205         || rcStrict == VERR_IEM_INSTR_NOT_IMPLEMENTED)
    206     {
    207 #ifdef VBOX_WITH_REM
    208         STAM_PROFILE_START(&pVCpu->em.s.StatREMEmu, b);
    209         CPUM_IMPORT_EXTRN_RET(pVCpu, ~CPUMCTX_EXTRN_KEEPER_MASK);
    210         EMRemLock(pVM);
    211         /* Flush the recompiler TLB if the VCPU has changed. */
    212         if (pVM->em.s.idLastRemCpu != pVCpu->idCpu)
    213             CPUMSetChangedFlags(pVCpu, CPUM_CHANGED_ALL);
    214         pVM->em.s.idLastRemCpu = pVCpu->idCpu;
    215 
    216         rcStrict = REMR3EmulateInstruction(pVM, pVCpu);
    217         EMRemUnlock(pVM);
    218         STAM_PROFILE_STOP(&pVCpu->em.s.StatREMEmu, b);
    219 #else  /* !VBOX_WITH_REM */
    220         NOREF(pVM);
    221 #endif /* !VBOX_WITH_REM */
    222     }
     204    NOREF(pVM);
    223205    return VBOXSTRICTRC_TODO(rcStrict);
    224206}
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r81150 r81153  
    28672867    AssertMsg(pVM->pdm.s.pDmac, ("Configuration error: No DMAC controller available. This could be related to init order too!\n"));
    28682868    VM_FF_SET(pVM, VM_FF_PDM_DMA);
    2869 #ifdef VBOX_WITH_REM
    2870     REMR3NotifyDmaPending(pVM);
    2871 #endif
    28722869    VMR3NotifyGlobalFFU(pVM->pUVM, VMNOTIFYFF_FLAGS_DONE_REM);
    28732870}
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r81150 r81153  
    19091909    rc = NEMR3NotifyPhysRamRegister(pVM, GCPhys, cb);
    19101910    pgmUnlock(pVM);
    1911 #ifdef VBOX_WITH_REM
    1912     REMR3NotifyPhysRamRegister(pVM, GCPhys, cb, REM_NOTIFY_PHYS_RAM_FLAGS_RAM);
    1913 #endif
    19141911    return rc;
    19151912}
     
    36283625    pgmUnlock(pVM);
    36293626
    3630 #ifdef VBOX_WITH_REM
    3631     if (!fRamExists && (pFirstMmio->fFlags & PGMREGMMIORANGE_F_MMIO2)) /** @todo this doesn't look right. */
    3632         REMR3NotifyPhysRamRegister(pVM, GCPhys, cbRange, REM_NOTIFY_PHYS_RAM_FLAGS_MMIO2);
    3633 #endif
    36343627    return rc;
    36353628}
     
    37753768    rc = NEMR3NotifyPhysMmioExUnmap(pVM, GCPhysRangeNotify, cbRange, fNemFlags);
    37763769    pgmUnlock(pVM);
    3777 #ifdef VBOX_WITH_REM
    3778     if ((fOldFlags & (PGMREGMMIORANGE_F_OVERLAPPING | PGMREGMMIORANGE_F_MMIO2)) == PGMREGMMIORANGE_F_MMIO2)
    3779         REMR3NotifyPhysRamDeregister(pVM, GCPhysRangeNotify, cbRange);
    3780 #endif
    37813770    return rc;
    37823771}
     
    42584247            if (fFlags & PGMPHYS_ROM_FLAGS_SHADOWED)
    42594248            {
    4260 #ifdef VBOX_WITH_REM
    4261                 REMR3NotifyPhysRomRegister(pVM, GCPhys, cb, NULL, true /* fShadowed */);
    4262 #endif
    42634249                if (RT_SUCCESS(rc))
    42644250                    rc = PGMHandlerPhysicalRegister(pVM, GCPhys, GCPhysLast, pVM->pgm.s.hRomPhysHandlerType,
     
    42724258                                                    pRomNew, MMHyperCCToR0(pVM, pRomNew), MMHyperCCToRC(pVM, pRomNew),
    42734259                                                    pszDesc);
    4274 #ifdef VBOX_WITH_REM
    4275                 REMR3NotifyPhysRomRegister(pVM, GCPhys, cb, NULL, false /* fShadowed */);
    4276 #endif
    42774260            }
    42784261            if (RT_SUCCESS(rc))
     
    47094692        pVCpu->pgm.s.fA20Enabled = fEnable;
    47104693        pVCpu->pgm.s.GCPhysA20Mask = ~((RTGCPHYS)!fEnable << 20);
    4711 #ifdef VBOX_WITH_REM
    4712         REMR3A20Set(pVCpu->pVMR3, pVCpu, fEnable);
    4713 #endif
    47144694        NEMR3NotifySetA20(pVCpu, fEnable);
    47154695#ifdef PGM_WITH_A20
     
    49264906                    CPUMSetChangedFlags(pVM->apCpusR3[idCpu], CPUM_CHANGED_GLOBAL_TLB_FLUSH);
    49274907                }
    4928 #ifdef VBOX_WITH_REM
    4929                 /* Flush REM translation blocks. */
    4930                 REMFlushTBs(pVM);
    4931 #endif
    49324908            }
    49334909        }
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r81150 r81153  
    21062106        Log5(("TM(%u): FF: 0 -> 1\n", __LINE__));
    21072107        VMCPU_FF_SET(pVCpuDst, VMCPU_FF_TIMER);
    2108 #ifdef VBOX_WITH_REM
    2109         REMR3NotifyTimerPending(pVM, pVCpuDst);
    2110 #endif
    21112108        VMR3NotifyCpuFFU(pVCpuDst->pUVCpu, VMNOTIFYFF_FLAGS_DONE_REM | VMNOTIFYFF_FLAGS_POKE);
    21122109        STAM_COUNTER_INC(&pVM->tm.s.StatTimerCallbackSetFF);
  • trunk/src/VBox/VMM/VMMR3/VM.cpp

    r81150 r81153  
    860860                if (RT_SUCCESS(rc))
    861861                {
    862 #ifdef VBOX_WITH_REM
    863                     rc = REMR3Init(pVM);
    864 #endif
     862                    rc = MMR3InitPaging(pVM);
     863                    if (RT_SUCCESS(rc))
     864                        rc = TMR3Init(pVM);
    865865                    if (RT_SUCCESS(rc))
    866866                    {
    867                         rc = MMR3InitPaging(pVM);
    868                         if (RT_SUCCESS(rc))
    869                             rc = TMR3Init(pVM);
     867                        rc = VMMR3Init(pVM);
    870868                        if (RT_SUCCESS(rc))
    871869                        {
    872                             rc = VMMR3Init(pVM);
     870                            rc = SELMR3Init(pVM);
    873871                            if (RT_SUCCESS(rc))
    874872                            {
    875                                 rc = SELMR3Init(pVM);
     873                                rc = TRPMR3Init(pVM);
    876874                                if (RT_SUCCESS(rc))
    877875                                {
    878                                     rc = TRPMR3Init(pVM);
     876                                    rc = SSMR3RegisterStub(pVM, "CSAM", 0);
    879877                                    if (RT_SUCCESS(rc))
    880878                                    {
    881                                         rc = SSMR3RegisterStub(pVM, "CSAM", 0);
     879                                        rc = SSMR3RegisterStub(pVM, "PATM", 0);
    882880                                        if (RT_SUCCESS(rc))
    883881                                        {
    884                                             rc = SSMR3RegisterStub(pVM, "PATM", 0);
     882                                            rc = IOMR3Init(pVM);
    885883                                            if (RT_SUCCESS(rc))
    886884                                            {
    887                                                 rc = IOMR3Init(pVM);
     885                                                rc = EMR3Init(pVM);
    888886                                                if (RT_SUCCESS(rc))
    889887                                                {
    890                                                     rc = EMR3Init(pVM);
     888                                                    rc = IEMR3Init(pVM);
    891889                                                    if (RT_SUCCESS(rc))
    892890                                                    {
    893                                                         rc = IEMR3Init(pVM);
     891                                                        rc = DBGFR3Init(pVM);
    894892                                                        if (RT_SUCCESS(rc))
    895893                                                        {
    896                                                             rc = DBGFR3Init(pVM);
     894                                                            /* GIM must be init'd before PDM, gimdevR3Construct()
     895                                                               requires GIM provider to be setup. */
     896                                                            rc = GIMR3Init(pVM);
    897897                                                            if (RT_SUCCESS(rc))
    898898                                                            {
    899                                                                 /* GIM must be init'd before PDM, gimdevR3Construct()
    900                                                                    requires GIM provider to be setup. */
    901                                                                 rc = GIMR3Init(pVM);
     899                                                                rc = PDMR3Init(pVM);
    902900                                                                if (RT_SUCCESS(rc))
    903901                                                                {
    904                                                                     rc = PDMR3Init(pVM);
     902                                                                    rc = PGMR3InitDynMap(pVM);
     903                                                                    if (RT_SUCCESS(rc))
     904                                                                        rc = MMR3HyperInitFinalize(pVM);
     905                                                                    if (RT_SUCCESS(rc))
     906                                                                        rc = PGMR3InitFinalize(pVM);
     907                                                                    if (RT_SUCCESS(rc))
     908                                                                        rc = TMR3InitFinalize(pVM);
    905909                                                                    if (RT_SUCCESS(rc))
    906910                                                                    {
    907                                                                         rc = PGMR3InitDynMap(pVM);
    908                                                                         if (RT_SUCCESS(rc))
    909                                                                             rc = MMR3HyperInitFinalize(pVM);
    910                                                                         if (RT_SUCCESS(rc))
    911                                                                             rc = PGMR3InitFinalize(pVM);
    912                                                                         if (RT_SUCCESS(rc))
    913                                                                             rc = TMR3InitFinalize(pVM);
    914 #ifdef VBOX_WITH_REM
    915                                                                         if (RT_SUCCESS(rc))
    916                                                                             rc = REMR3InitFinalize(pVM);
    917 #endif
    918                                                                         if (RT_SUCCESS(rc))
    919                                                                         {
    920                                                                             PGMR3MemSetup(pVM, false /*fAtReset*/);
    921                                                                             PDMR3MemSetup(pVM, false /*fAtReset*/);
    922                                                                         }
    923                                                                         if (RT_SUCCESS(rc))
    924                                                                             rc = vmR3InitDoCompleted(pVM, VMINITCOMPLETED_RING3);
    925                                                                         if (RT_SUCCESS(rc))
    926                                                                         {
    927                                                                             LogFlow(("vmR3InitRing3: returns %Rrc\n", VINF_SUCCESS));
    928                                                                             return VINF_SUCCESS;
    929                                                                         }
    930 
    931                                                                         int rc2 = PDMR3Term(pVM);
    932                                                                         AssertRC(rc2);
     911                                                                        PGMR3MemSetup(pVM, false /*fAtReset*/);
     912                                                                        PDMR3MemSetup(pVM, false /*fAtReset*/);
    933913                                                                    }
    934                                                                     int rc2 = GIMR3Term(pVM);
     914                                                                    if (RT_SUCCESS(rc))
     915                                                                        rc = vmR3InitDoCompleted(pVM, VMINITCOMPLETED_RING3);
     916                                                                    if (RT_SUCCESS(rc))
     917                                                                    {
     918                                                                        LogFlow(("vmR3InitRing3: returns %Rrc\n", VINF_SUCCESS));
     919                                                                        return VINF_SUCCESS;
     920                                                                    }
     921
     922                                                                    int rc2 = PDMR3Term(pVM);
    935923                                                                    AssertRC(rc2);
    936924                                                                }
    937                                                                 int rc2 = DBGFR3Term(pVM);
     925                                                                int rc2 = GIMR3Term(pVM);
    938926                                                                AssertRC(rc2);
    939927                                                            }
    940                                                             int rc2 = IEMR3Term(pVM);
     928                                                            int rc2 = DBGFR3Term(pVM);
    941929                                                            AssertRC(rc2);
    942930                                                        }
    943                                                         int rc2 = EMR3Term(pVM);
     931                                                        int rc2 = IEMR3Term(pVM);
    944932                                                        AssertRC(rc2);
    945933                                                    }
    946                                                     int rc2 = IOMR3Term(pVM);
     934                                                    int rc2 = EMR3Term(pVM);
    947935                                                    AssertRC(rc2);
    948936                                                }
     937                                                int rc2 = IOMR3Term(pVM);
     938                                                AssertRC(rc2);
    949939                                            }
    950940                                        }
    951                                         int rc2 = TRPMR3Term(pVM);
    952                                         AssertRC(rc2);
    953941                                    }
    954                                     int rc2 = SELMR3Term(pVM);
     942                                    int rc2 = TRPMR3Term(pVM);
    955943                                    AssertRC(rc2);
    956944                                }
    957                                 int rc2 = VMMR3Term(pVM);
     945                                int rc2 = SELMR3Term(pVM);
    958946                                AssertRC(rc2);
    959947                            }
    960                             int rc2 = TMR3Term(pVM);
     948                            int rc2 = VMMR3Term(pVM);
    961949                            AssertRC(rc2);
    962950                        }
    963 #ifdef VBOX_WITH_REM
    964                         int rc2 = REMR3Term(pVM);
     951                        int rc2 = TMR3Term(pVM);
    965952                        AssertRC(rc2);
    966 #endif
    967953                    }
    968954                    int rc2 = PGMR3Term(pVM);
     
    10431029    if (enmWhat == VMINITCOMPLETED_RING3)
    10441030    {
    1045 #ifndef VBOX_WITH_REM
    10461031        if (RT_SUCCESS(rc))
    10471032            rc = SSMR3RegisterStub(pVM, "rem", 1);
    1048 #endif
    10491033    }
    10501034    if (RT_SUCCESS(rc))
     
    22222206        rc = SELMR3Term(pVM);
    22232207        AssertRC(rc);
    2224 #ifdef VBOX_WITH_REM
    2225         rc = REMR3Term(pVM);
    2226         AssertRC(rc);
    2227 #endif
    22282208        rc = HMR3Term(pVM);
    22292209        AssertRC(rc);
     
    25092489    if (pVCpu->idCpu == 0)
    25102490    {
    2511 #ifdef VBOX_WITH_REM
    2512         REMR3Reset(pVM);
    2513 #endif
    25142491        PDMR3SoftReset(pVM, fResetFlags);
    25152492        TRPMR3Reset(pVM);
     
    26112588        SELMR3Reset(pVM);
    26122589        TRPMR3Reset(pVM);
    2613 #ifdef VBOX_WITH_REM
    2614         REMR3Reset(pVM);
    2615 #endif
    26162590        IOMR3Reset(pVM);
    26172591        CPUMR3Reset(pVM);               /* This must come *after* PDM (due to APIC base MSR caching). */
  • trunk/src/VBox/VMM/VMMR3/VMEmt.cpp

    r81150 r81153  
    868868                     || enmState == VMCPUSTATE_STARTED_EXEC_NEM_WAIT)
    869869                NEMR3NotifyFF(pUVCpu->pVM, pVCpu, fFlags);
    870 #ifdef VBOX_WITH_REM
    871             else if (enmState == VMCPUSTATE_STARTED_EXEC_REM)
    872             {
    873                 if (!(fFlags & VMNOTIFYFF_FLAGS_DONE_REM))
    874                     REMR3NotifyFF(pUVCpu->pVM);
    875             }
    876 #endif
    877870        }
    878871    }
     
    10171010                || enmState == VMCPUSTATE_STARTED_EXEC_NEM_WAIT)
    10181011                NEMR3NotifyFF(pUVCpu->pVM, pVCpu, fFlags);
    1019 #ifdef VBOX_WITH_REM
    1020             else if (   !(fFlags & VMNOTIFYFF_FLAGS_DONE_REM)
    1021                      && enmState == VMCPUSTATE_STARTED_EXEC_REM)
    1022                 REMR3NotifyFF(pUVCpu->pVM);
    1023 #endif
    10241012        }
    10251013    }
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r81150 r81153  
    514514    STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMMapChunk,        STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMMapChunk",      STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_MAP_CHUNK calls.");
    515515    STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMAllocHandy,      STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMAllocHandy",    STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES calls.");
    516     STAM_REG(pVM, &pVM->vmm.s.StatRZCallRemReplay,          STAMTYPE_COUNTER, "/VMM/RZCallR3/REMReplay",        STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS calls.");
    517516    STAM_REG(pVM, &pVM->vmm.s.StatRZCallLogFlush,           STAMTYPE_COUNTER, "/VMM/RZCallR3/VMMLogFlush",      STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_VMM_LOGGER_FLUSH calls.");
    518517    STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetError,         STAMTYPE_COUNTER, "/VMM/RZCallR3/VMSetError",       STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_VM_SET_ERROR calls.");
     
    24432442        }
    24442443
    2445 #ifdef VBOX_WITH_REM
    2446         /*
    2447          * Flush REM handler notifications.
    2448          */
    2449         case VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS:
    2450         {
    2451             REMR3ReplayHandlerNotifications(pVM);
    2452             pVCpu->vmm.s.rcCallRing3 = VINF_SUCCESS;
    2453             break;
    2454         }
    2455 #endif
    2456 
    24572444        /*
    24582445         * This is a noop. We just take this route to avoid unnecessary
     
    25732560    PRINT_FLAG(VM_FF_,PGM_NO_MEMORY);
    25742561    PRINT_FLAG(VM_FF_,PGM_POOL_FLUSH_PENDING);
    2575     PRINT_FLAG(VM_FF_,REM_HANDLER_NOTIFY);
    25762562    PRINT_FLAG(VM_FF_,DEBUG_SUSPEND);
    25772563    if (f)
  • trunk/src/VBox/VMM/include/EMInternal.h

    r80018 r81153  
    160160    /** Id of the VCPU that last executed code in the recompiler. */
    161161    VMCPUID                 idLastRemCpu;
    162 
    163 #ifdef VBOX_WITH_REM
    164     /** REM critical section.
    165      * This protects recompiler usage
    166      */
    167     PDMCRITSECT             CritSectREM;
    168 #endif
    169162} EM;
    170163/** Pointer to EM VM instance data. */
  • trunk/src/VBox/VMM/include/VMMInternal.h

    r80281 r81153  
    331331    STAMCOUNTER                 StatRZCallPGMMapChunk;
    332332    STAMCOUNTER                 StatRZCallPGMAllocHandy;
    333     STAMCOUNTER                 StatRZCallRemReplay;
    334333    STAMCOUNTER                 StatRZCallVMSetError;
    335334    STAMCOUNTER                 StatRZCallVMSetRuntimeError;
  • trunk/src/VBox/VMM/testcase/tstAnimate.cpp

    r81150 r81153  
    870870                    RTPrintf("info: powering on the VM...\n");
    871871                    RTLogGroupSettings(NULL, "+REM_DISAS.e.l.f");
    872 #ifdef VBOX_WITH_REM
    873                     rc = REMR3DisasEnableStepping(pVM, true);
    874 #else
    875                     rc = VERR_NOT_IMPLEMENTED; /** @todo need some EM single-step indicator */
    876 #endif
     872                    rc = VERR_NOT_IMPLEMENTED; /** @todo need some EM single-step indicator (was REMR3DisasEnableStepping) */
    877873                    if (RT_SUCCESS(rc))
    878874                    {
  • trunk/src/VBox/VMM/testcase/tstVMStruct.h

    r80938 r81153  
    14521452    GEN_CHECK_OFF(VM, dbgf);
    14531453    GEN_CHECK_OFF(VM, ssm);
    1454 #ifdef VBOX_WITH_REM
    1455     GEN_CHECK_OFF(VM, rem);
    1456 #endif
    14571454    GEN_CHECK_OFF(VM, gim);
    14581455    GEN_CHECK_OFF(VM, vm);
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