VirtualBox

Changeset 80025 in vbox


Ignore:
Timestamp:
Jul 28, 2019 2:23:22 PM (5 years ago)
Author:
vboxsync
Message:

VMM: Kicking out raw-mode (work in progress) - VM,VMM. bugref:9517

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/VM.cpp

    r80024 r80025  
    862862    {
    863863        ASMCompilerBarrier(); /* HMR3Init will have modified bMainExecutionEngine */
    864 #ifdef VBOX_WITH_RAW_MODE
    865         Assert(   pVM->bMainExecutionEngine == VM_EXEC_ENGINE_HW_VIRT
    866                || pVM->bMainExecutionEngine == VM_EXEC_ENGINE_RAW_MODE
    867                || pVM->bMainExecutionEngine == VM_EXEC_ENGINE_NATIVE_API);
    868 #else
    869864        Assert(   pVM->bMainExecutionEngine == VM_EXEC_ENGINE_HW_VIRT
    870865               || pVM->bMainExecutionEngine == VM_EXEC_ENGINE_NATIVE_API);
    871 #endif
    872866        rc = MMR3Init(pVM);
    873867        if (RT_SUCCESS(rc))
     
    932926                                                                            if (RT_SUCCESS(rc))
    933927                                                                                rc = MMR3HyperInitFinalize(pVM);
    934 #ifdef VBOX_WITH_RAW_MODE
    935                                                                             if (RT_SUCCESS(rc))
    936                                                                                 rc = PATMR3InitFinalize(pVM);
    937 #endif
    938928                                                                            if (RT_SUCCESS(rc))
    939929                                                                                rc = PGMR3InitFinalize(pVM);
     
    10501040
    10511041
    1052 #ifdef VBOX_WITH_RAW_MODE
    1053 /**
    1054  * Initializes all RC components of the VM
    1055  */
    1056 static int vmR3InitRC(PVM pVM)
    1057 {
    1058     LogFlow(("vmR3InitRC:\n"));
    1059 
    1060     /*
    1061      * Check for FAKE suplib mode.
    1062      */
    1063     int rc = VINF_SUCCESS;
    1064     const char *psz = RTEnvGet("VBOX_SUPLIB_FAKE");
    1065     if (!psz || strcmp(psz, "fake"))
    1066     {
    1067         /*
    1068          * Call the VMMR0 component and let it do the init.
    1069          */
    1070         rc = VMMR3InitRC(pVM);
    1071     }
    1072     else
    1073         Log(("vmR3InitRC: skipping because of VBOX_SUPLIB_FAKE=fake\n"));
    1074 
    1075     /*
    1076      * Do notifications and return.
    1077      */
    1078     if (RT_SUCCESS(rc))
    1079         rc = vmR3InitDoCompleted(pVM, VMINITCOMPLETED_RC);
    1080     LogFlow(("vmR3InitRC: returns %Rrc\n", rc));
    1081     return rc;
    1082 }
    1083 #endif /* VBOX_WITH_RAW_MODE */
    1084 
    1085 
    10861042/**
    10871043 * Do init completed notifications.
     
    11441100    SELMR3Relocate(pVM);                /* !hack! fix stack! */
    11451101    TRPMR3Relocate(pVM, offDelta);
    1146 #ifdef VBOX_WITH_RAW_MODE
    1147     PATMR3Relocate(pVM, (RTRCINTPTR)offDelta);
    1148     CSAMR3Relocate(pVM, offDelta);
    1149 #endif
    11501102    IOMR3Relocate(pVM, offDelta);
    11511103    EMR3Relocate(pVM);
     
    23922344        rc = IOMR3Term(pVM);
    23932345        AssertRC(rc);
    2394 #ifdef VBOX_WITH_RAW_MODE
    2395         rc = CSAMR3Term(pVM);
    2396         AssertRC(rc);
    2397         rc = PATMR3Term(pVM);
    2398         AssertRC(rc);
    2399 #endif
    24002346        rc = TRPMR3Term(pVM);
    24012347        AssertRC(rc);
     
    27862732    if (pVCpu->idCpu == 0)
    27872733    {
    2788 #ifdef VBOX_WITH_RAW_MODE
    2789         PATMR3Reset(pVM);
    2790         CSAMR3Reset(pVM);
    2791 #endif
    27922734        GIMR3Reset(pVM);                /* This must come *before* PDM and TM. */
    27932735        PDMR3Reset(pVM);
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r80019 r80025  
    348348            pVCpu->vmm.s.pbEMTStackR3 += PAGE_SIZE;
    349349#endif
    350 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
    351             /* MMHyperR3ToR0 returns R3 when not doing hardware assisted virtualization. */
    352             if (VM_IS_RAW_MODE_ENABLED(pVM))
    353                 pVCpu->vmm.s.CallRing3JmpBufR0.pvSavedStack = NIL_RTR0PTR;
    354             else
    355 #endif
    356                 pVCpu->vmm.s.CallRing3JmpBufR0.pvSavedStack = MMHyperR3ToR0(pVM, pVCpu->vmm.s.pbEMTStackR3);
     350            pVCpu->vmm.s.CallRing3JmpBufR0.pvSavedStack = MMHyperR3ToR0(pVM, pVCpu->vmm.s.pbEMTStackR3);
    357351
    358352        }
     
    870864VMMR3DECL(const char *) VMMR3GetRZAssertMsg1(PVM pVM)
    871865{
    872     if (!VM_IS_RAW_MODE_ENABLED(pVM))
    873         return pVM->vmm.s.szRing0AssertMsg1;
    874 
    875     RTRCPTR RCPtr;
    876     int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg1", &RCPtr);
    877     if (RT_SUCCESS(rc))
    878         return (const char *)MMHyperRCToR3(pVM, RCPtr);
    879 
    880     return NULL;
     866    return pVM->vmm.s.szRing0AssertMsg1;
    881867}
    882868
     
    907893VMMR3DECL(const char *) VMMR3GetRZAssertMsg2(PVM pVM)
    908894{
    909     if (!VM_IS_RAW_MODE_ENABLED(pVM))
    910         return pVM->vmm.s.szRing0AssertMsg2;
    911 
    912     RTRCPTR RCPtr;
    913     int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg2", &RCPtr);
    914     if (RT_SUCCESS(rc))
    915         return (const char *)MMHyperRCToR3(pVM, RCPtr);
    916 
    917     return NULL;
     895    return pVM->vmm.s.szRing0AssertMsg2;
    918896}
    919897
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