- Timestamp:
- Apr 6, 2007 4:55:59 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EM.cpp
r1913 r1976 373 373 static DECLCALLBACK(int) emR3Save(PVM pVM, PSSMHANDLE pSSM) 374 374 { 375 SSMR3PutBool(pSSM, pVM->em.s.fRawModeUsed); 376 SSMR3PutBool(pSSM, pVM->em.s.fHwAccModeUsed); 375 377 return SSMR3PutBool(pSSM, pVM->em.s.fForceRAW); 376 378 } … … 399 401 * Load the saved state. 400 402 */ 401 int rc = SSMR3GetBool(pSSM, &pVM->em.s.fForceRAW); 403 int rc = SSMR3GetBool(pSSM, &pVM->em.s.fRawModeUsed); 404 if (VBOX_FAILURE(rc)) 405 pVM->em.s.fRawModeUsed = false; 406 407 rc = SSMR3GetBool(pSSM, &pVM->em.s.fHwAccModeUsed); 408 if (VBOX_FAILURE(rc)) 409 pVM->em.s.fHwAccModeUsed = false; 410 411 rc = SSMR3GetBool(pSSM, &pVM->em.s.fForceRAW); 402 412 if (VBOX_FAILURE(rc)) 403 413 pVM->em.s.fForceRAW = false; … … 2430 2440 } 2431 2441 2442 /** 2443 * Check for pending raw actions 2444 * 2445 * @returns VBox status code. 2446 * @param pVM The VM to operate on. 2447 */ 2448 EMR3DECL(int) EMR3CheckRawForcedActions(PVM pVM) 2449 { 2450 int rc = VINF_SUCCESS; 2451 2452 /* Too early if we haven't entered raw or hw accelerated mode yet */ 2453 /** @todo fix this properly */ 2454 if ( pVM->em.s.fHwAccModeUsed 2455 || pVM->em.s.fRawModeUsed) 2456 { 2457 rc = emR3RawForcedActions(pVM, pVM->em.s.pCtx); 2458 } 2459 2460 return rc; 2461 } 2462 2432 2463 2433 2464 /** … … 2628 2659 LogFlow(("VMMR3RawRunGC returned %Vrc\n", rc)); 2629 2660 2661 /* Signal that we've used raw mode for the first time */ 2662 pVM->em.s.fRawModeUsed = true; 2630 2663 2631 2664 /* … … 2839 2872 STAM_PROFILE_STOP(&pVM->em.s.StatHwAccExec, x); 2840 2873 2874 /* Signal that we've used hardware accelerated mode for the first time */ 2875 pVM->em.s.fHwAccModeUsed = true; 2841 2876 2842 2877 /* -
trunk/src/VBox/VMM/EMInternal.h
r686 r1976 42 42 43 43 /** The saved state version. */ 44 #define EM_SAVED_STATE_VERSION 244 #define EM_SAVED_STATE_VERSION 3 45 45 46 46 /** Enable for tracing in raw mode. … … 237 237 * The flag is cleared upon entering emR3RawExecute() and updated in certain return paths. */ 238 238 bool fForceRAW; 239 240 /* Set when raw mode was used for the first time */ 241 bool fRawModeUsed; 242 /* Set when hardware accelerated mode was used for the first time */ 243 bool fHwAccModeUsed; 244 239 245 #ifdef DEBUG_TRACING_ENABLED 240 246 /** @see DEBUG_TRACING_ENABLED */ -
trunk/src/VBox/VMM/TRPM.cpp
r1793 r1976 1321 1321 if (pVM->trpm.s.aGuestTrapHandler[u8Interrupt] != TRPM_INVALID_HANDLER) 1322 1322 { 1323 EMR3CheckRawForcedActions(pVM); 1324 1323 1325 /* There's a handler -> let's execute it in raw mode */ 1324 1326 rc = TRPMForwardTrap(pVM, CPUMCTX2CORE(pCtx), u8Interrupt, 0, TRPM_TRAP_NO_ERRORCODE, enmEvent); 1325 1327 if (rc == VINF_SUCCESS /* Don't use VBOX_SUCCESS */) 1326 1328 { 1329 Assert(!VM_FF_ISPENDING(pVM, VM_FF_SELM_SYNC_GDT | VM_FF_SELM_SYNC_LDT | VM_FF_TRPM_SYNC_IDT | VM_FF_SELM_SYNC_TSS)); 1330 1327 1331 STAM_COUNTER_INC(&pVM->trpm.s.paStatForwardedIRQR3[u8Interrupt]); 1328 1332 return VINF_EM_RESCHEDULE_RAW; -
trunk/src/VBox/VMM/VMMAll/TRPMAll.cpp
r1930 r1976 433 433 434 434 Assert(PATMAreInterruptsEnabledByCtxCore(pVM, pRegFrame)); 435 Assert(!VM_FF_ISPENDING(pVM, VM_FF_SELM_SYNC_GDT | VM_FF_SELM_SYNC_LDT | VM_FF_TRPM_SYNC_IDT | VM_FF_SELM_SYNC_TSS)); 435 436 436 437 /* Get the current privilege level. */
Note:
See TracChangeset
for help on using the changeset viewer.