- Timestamp:
- Nov 15, 2012 8:52:11 AM (12 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r43387 r43872 119 119 VMMR3/DBGFR3Trace.cpp \ 120 120 VMMR3/EM.cpp \ 121 VMMR3/EMRaw.cpp\121 $(if $(VBOX_WITH_RAW_MODE),VMMR3/EMRaw.cpp) \ 122 122 VMMR3/EMHM.cpp \ 123 123 VMMR3/FTM.cpp \ -
trunk/src/VBox/VMM/VMMAll/PGMAllShw.h
r43387 r43872 299 299 { 300 300 # if PGM_SHW_TYPE == PGM_TYPE_AMD64 \ 301 || PGM_SHW_TYPE == PGM_TYPE_EPT 301 || PGM_SHW_TYPE == PGM_TYPE_EPT \ 302 || defined(PGM_WITHOUT_MAPPINGS) 302 303 AssertFailed(); /* can't happen */ 303 304 pPT = NULL; /* shut up MSC */ -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r43667 r43872 4046 4046 if (!CPUMSELREG_ARE_HIDDEN_PARTS_VALID(pVCpu, &pCtx->cs)) 4047 4047 { 4048 # ifdef VBOX_WITH_RAW_MODE_NOT_R0 4048 4049 CPUMGuestLazyLoadHiddenSelectorReg(pVCpu, &pCtx->cs); 4050 # endif 4049 4051 if (!CPUMSELREG_ARE_HIDDEN_PARTS_VALID(pVCpu, &pCtx->cs)) 4050 4052 return VERR_CPUM_HIDDEN_CS_LOAD_ERROR; -
trunk/src/VBox/VMM/VMMR3/CSAM.cpp
r42782 r43872 2449 2449 VMMR3DECL(int) CSAMR3CheckGates(PVM pVM, uint32_t iGate, uint32_t cGates) 2450 2450 { 2451 #ifdef VBOX_WITH_RAW_MODE 2451 2452 Assert(pVM->cCpus == 1); 2452 2453 PVMCPU pVCpu = VMMGetCpu0(pVM); … … 2652 2653 } /* for */ 2653 2654 STAM_PROFILE_STOP(&pVM->csam.s.StatCheckGates, a); 2655 #endif /* VBOX_WITH_RAW_MODE */ 2654 2656 return VINF_SUCCESS; 2655 2657 } -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r43394 r43872 736 736 */ 737 737 case VINF_EM_DBG_STEP: 738 #ifdef VBOX_WITH_RAW_MODE 738 739 if ( pVCpu->em.s.enmState == EMSTATE_DEBUG_GUEST_RAW 739 740 || pVCpu->em.s.enmState == EMSTATE_DEBUG_HYPER … … 745 746 rc = emR3RemStep(pVM, pVCpu); 746 747 } 748 #else 749 AssertLogRelMsgFailed(("%Rrc\n", rc)); 750 rc = VERR_EM_INTERNAL_ERROR; 751 #endif 747 752 break; 748 753 … … 823 828 if (pVCpu->em.s.enmState == EMSTATE_DEBUG_HYPER) 824 829 { 830 #ifdef VBOX_WITH_RAW_MODE 825 831 rc = emR3RawResumeHyper(pVM, pVCpu); 826 832 if (rc != VINF_SUCCESS && RT_SUCCESS(rc)) 827 833 continue; 834 #else 835 AssertLogRelMsgFailedReturn(("Not implemented\n", rc), VERR_EM_INTERNAL_ERROR); 836 #endif 828 837 } 829 838 if (rc == VINF_SUCCESS) … … 2189 2198 case EMSTATE_RAW: 2190 2199 #ifndef IEM_VERIFICATION_MODE /* remove later */ 2200 # ifdef VBOX_WITH_RAW_MODE 2191 2201 rc = emR3RawExecute(pVM, pVCpu, &fFFDone); 2202 # else 2203 AssertLogRelMsgFailed(("%Rrc\n", rc)); 2204 rc = VERR_EM_INTERNAL_ERROR; 2205 # endif 2192 2206 break; 2193 2207 #endif -
trunk/src/VBox/VMM/VMMR3/PGMBth.h
r43387 r43872 148 148 pgmPoolUnlockPage(pPool, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 149 149 150 # ifndef PGM_WITHOUT_MAPPINGS 150 151 /* Remove the hypervisor mappings from the shadow page table. */ 151 152 pgmMapDeactivateCR3(pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 153 # endif 152 154 153 155 pgmPoolFreeByPage(pPool, pVCpu->pgm.s.pShwPageCR3R3, pVCpu->pgm.s.iShwUser, pVCpu->pgm.s.iShwUserTable); … … 184 186 CPUMSetHyperCR3(pVCpu, PGMGetHyperCR3(pVCpu)); 185 187 188 # ifndef PGM_WITHOUT_MAPPINGS 186 189 /* Apply all hypervisor mappings to the new CR3. */ 187 190 rc = pgmMapActivateCR3(pVM, pVCpu->pgm.s.CTX_SUFF(pShwPageCR3)); 191 # endif 192 188 193 pgmUnlock(pVM); 189 194 return rc; -
trunk/src/VBox/VMM/VMMR3/PGMMap.cpp
r43387 r43872 37 37 * Internal Functions * 38 38 *******************************************************************************/ 39 #ifndef PGM_WITHOUT_MAPPINGS 39 40 static void pgmR3MapClearPDEs(PVM pVM, PPGMMAPPING pMap, unsigned iOldPDE); 40 41 static void pgmR3MapSetPDEs(PVM pVM, PPGMMAPPING pMap, unsigned iNewPDE); 41 42 static int pgmR3MapIntermediateCheckOne(PVM pVM, uintptr_t uAddress, unsigned cPages, PX86PT pPTDefault, PX86PTPAE pPTPaeDefault); 42 43 static void pgmR3MapIntermediateDoOne(PVM pVM, uintptr_t uAddress, RTHCPHYS HCPhys, unsigned cPages, PX86PT pPTDefault, PX86PTPAE pPTPaeDefault); 44 #else 45 # define pgmR3MapClearPDEs(pVM, pMap, iNewPDE) do { } while (0) 46 # define pgmR3MapSetPDEs(pVM, pMap, iNewPDE) do { } while (0) 47 #endif 43 48 44 49 … … 210 215 } 211 216 217 #ifdef VBOX_WITH_UNUSED_CODE 212 218 213 219 /** … … 280 286 return VERR_INVALID_PARAMETER; 281 287 } 288 289 #endif /* unused */ 282 290 283 291 … … 484 492 { 485 493 RTGCPTR cb = 0; 494 #ifndef PGM_WITHOUT_MAPPINGS 486 495 for (PPGMMAPPING pCur = pVM->pgm.s.pMappingsR3; pCur; pCur = pCur->pNextR3) 487 496 cb += pCur->cb; 497 #endif 488 498 489 499 *pcb = cb; … … 507 517 GCPtrBase, cb, pVM->pgm.s.fMappingsFixed, pVM->pgm.s.fMappingsDisabled)); 508 518 509 /* 510 * Ignore the additions mapping fix call if disabled.511 */512 if (!pgmMapAreMappingsEnabled(pVM))513 {514 Assert(HMIsEnabled(pVM));515 return VINF_SUCCESS;516 }517 518 /*519 * Only applies to VCPU 0 as we don't support SMP guests with raw mode.520 */521 Assert(pVM->cCpus == 1);522 PVMCPU pVCpu = &pVM->aCpus[0];523 524 /*525 * Before we do anything we'll do a forced PD sync to try make sure any526 * pending relocations because of these mappings have been resolved. 527 */ 528 PGMSyncCR3(pVCpu, CPUMGetGuestCR0(pVCpu), CPUMGetGuestCR3(pVCpu), CPUMGetGuestCR4(pVCpu), true);529 530 return pgmR3MappingsFixInternal(pVM, GCPtrBase, cb); 531 } 532 533 519 #ifndef PGM_WITHOUT_MAPPINGS 520 if (pgmMapAreMappingsEnabled(pVM)) 521 { 522 /* 523 * Only applies to VCPU 0 as we don't support SMP guests with raw mode. 524 */ 525 Assert(pVM->cCpus == 1); 526 PVMCPU pVCpu = &pVM->aCpus[0]; 527 528 /* 529 * Before we do anything we'll do a forced PD sync to try make sure any 530 * pending relocations because of these mappings have been resolved. 531 */ 532 PGMSyncCR3(pVCpu, CPUMGetGuestCR0(pVCpu), CPUMGetGuestCR3(pVCpu), CPUMGetGuestCR4(pVCpu), true); 533 534 return pgmR3MappingsFixInternal(pVM, GCPtrBase, cb); 535 } 536 #endif /* !PGM_WITHOUT_MAPPINGS */ 537 538 Assert(HMIsEnabled(pVM)); 539 return VINF_SUCCESS; 540 } 541 542 543 #ifndef PGM_WITHOUT_MAPPINGS 534 544 /** 535 545 * Internal worker for PGMR3MappingsFix and pgmR3Load. … … 671 681 return VINF_SUCCESS; 672 682 } 683 #endif /*!PGM_WITHOUT_MAPPINGS*/ 684 673 685 674 686 … … 689 701 return VINF_SUCCESS; 690 702 703 #ifdef VBOX_WITH_RAW_MODE 691 704 /* 692 705 * Deactivate (only applies to Virtual CPU #0). … … 699 712 AssertRCReturn(rc, rc); 700 713 } 714 #endif /* VBOX_WITH_RAW_MODE */ 701 715 702 716 /* … … 758 772 } 759 773 774 #ifndef PGM_WITHOUT_MAPPINGS 760 775 761 776 /** … … 1345 1360 } 1346 1361 1362 #endif /* !PGM_WITHOUT_MAPPINGS */ 1347 1363 1348 1364 /** -
trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp
r42931 r43872 3215 3215 && pgmMapAreMappingsEnabled(pVM)) 3216 3216 { 3217 #ifndef PGM_WITHOUT_MAPPINGS 3217 3218 RTGCPTR GCPtrFixed = pVM->pgm.s.GCPtrMappingFixed; 3218 3219 uint32_t cbFixed = pVM->pgm.s.cbMappingFixed; … … 3235 3236 pVM->pgm.s.cbMappingFixed = cbFixed; 3236 3237 } 3238 #else 3239 AssertFailed(); 3240 #endif 3237 3241 } 3238 3242 else -
trunk/src/VBox/VMM/VMMR3/SELM.cpp
r42427 r43872 809 809 } 810 810 811 #ifdef VBOX_WITH_RAW_MODE 811 812 812 813 /** … … 1368 1369 } 1369 1370 1371 #endif /*VBOX_WITH_RAW_MODE*/ 1372 1370 1373 1371 1374 /** … … 1378 1381 VMMR3DECL(VBOXSTRICTRC) SELMR3UpdateFromCPUM(PVM pVM, PVMCPU pVCpu) 1379 1382 { 1383 #ifdef VBOX_WITH_RAW_MODE 1380 1384 if (pVM->selm.s.fDisableMonitoring) 1385 #endif 1381 1386 { 1382 1387 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_GDT); … … 1386 1391 } 1387 1392 1393 #ifdef VBOX_WITH_RAW_MODE 1388 1394 STAM_PROFILE_START(&pVM->selm.s.StatUpdateFromCPUM, a); 1389 1395 … … 1429 1435 STAM_PROFILE_STOP(&pVM->selm.s.StatUpdateFromCPUM, a); 1430 1436 return rcStrict; 1437 #endif 1431 1438 } 1432 1439 … … 1537 1544 int rc; 1538 1545 1546 #ifdef VBOX_WITH_RAW_MODE 1539 1547 if (pVM->selm.s.fDisableMonitoring) 1548 #endif 1540 1549 { 1541 1550 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_SELM_SYNC_TSS); … … 1543 1552 } 1544 1553 1554 #ifdef VBOX_WITH_RAW_MODE 1545 1555 STAM_PROFILE_START(&pVM->selm.s.StatTSSSync, a); 1546 1556 Assert(VMCPU_FF_ISSET(pVCpu, VMCPU_FF_SELM_SYNC_TSS)); … … 1727 1737 STAM_PROFILE_STOP(&pVM->selm.s.StatTSSSync, a); 1728 1738 return VINF_SUCCESS; 1729 } 1730 1739 #endif /*VBOX_WITH_RAW_MODE*/ 1740 } 1741 1742 #ifdef VBOX_WITH_RAW_MODE 1731 1743 1732 1744 /** … … 2008 2020 } 2009 2021 2022 #endif /* VBOX_WITH_RAW_MODE */ 2010 2023 2011 2024 /** -
trunk/src/VBox/VMM/include/PGMInternal.h
r43387 r43872 3905 3905 #define PGM_LOCK_ASSERT_OWNER_EX(a_pVM, a_pVCpu) Assert(PDMCritSectIsOwnerEx(&(a_pVM)->pgm.s.CritSectX, pVCpu)) 3906 3906 3907 #ifndef PGM_WITHOUT_MAPPINGS 3907 3908 int pgmR3MappingsFixInternal(PVM pVM, RTGCPTR GCPtrBase, uint32_t cb); 3908 3909 int pgmR3SyncPTResolveConflict(PVM pVM, PPGMMAPPING pMapping, PX86PD pPDSrc, RTGCPTR GCPtrOldMapping); 3909 3910 int pgmR3SyncPTResolveConflictPAE(PVM pVM, PPGMMAPPING pMapping, RTGCPTR GCPtrOldMapping); 3911 int pgmMapResolveConflicts(PVM pVM); 3912 #endif /* !PGM_WITHOUT_MAPPINGS */ 3910 3913 PPGMMAPPING pgmGetMapping(PVM pVM, RTGCPTR GCPtr); 3911 int pgmMapResolveConflicts(PVM pVM);3912 3914 DECLCALLBACK(void) pgmR3MapInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 3913 3915 -
trunk/src/VBox/VMM/include/TRPMInternal.h
r41943 r43872 27 27 28 28 /** Enable to allow trap forwarding in GC. */ 29 #define TRPM_FORWARD_TRAPS_IN_GC 29 #ifdef VBOX_WITH_RAW_MODE 30 # define TRPM_FORWARD_TRAPS_IN_GC 31 #endif 30 32 31 33 /** First interrupt handler. Used for validating input. */
Note:
See TracChangeset
for help on using the changeset viewer.