Changeset 47821 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Aug 16, 2013 11:14:13 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r47819 r47821 2194 2194 uint32_t, uNewFlags, uint64_t, uNewRsp) 2195 2195 { 2196 #if 02197 if (!LogIs6Enabled())2198 {2199 RTLogGroupSettings(NULL, "iem.eo.l6.l2");2200 RTLogFlags(NULL, "enabled");2201 return VERR_IEM_RESTART_INSTRUCTION;2202 }2203 #endif2204 2205 2196 /* 2206 2197 * Pop the V8086 specific frame bits off the stack. … … 2347 2338 return iemRaiseGeneralProtectionFaultBySelector(pIemCpu, uNewCs); 2348 2339 } 2340 2341 #ifdef VBOX_WITH_RAW_MODE_NOT_R0 2342 /* Raw ring-0 and ring-1 compression adjustments for PATM performance tricks and other CS leaks. */ 2343 PVM pVM = IEMCPU_TO_VM(pIemCpu); 2344 if (EMIsRawRing0Enabled(pVM) && !HMIsEnabled(pVM)) 2345 { 2346 if ((uNewCs & X86_SEL_RPL) == 1) 2347 { 2348 if ( pIemCpu->uCpl == 0 2349 && ( !EMIsRawRing1Enabled(pVM) 2350 || pCtx->cs.Sel == (uNewCs & X86_SEL_MASK_OFF_RPL)) ) 2351 { 2352 Log(("iret: Ring-0 compression fix: uNewCS=%#x -> %#x\n", uNewCs, uNewCs & X86_SEL_MASK_OFF_RPL)); 2353 uNewCs &= X86_SEL_MASK_OFF_RPL; 2354 } 2355 # ifdef LOG_ENABLED 2356 else if (pIemCpu->uCpl <= 1 && EMIsRawRing1Enabled(pVM)) 2357 Log(("iret: uNewCs=%#x genuine return to ring-1.\n", uNewCs)); 2358 # endif 2359 } 2360 else if ( (uNewCs & X86_SEL_RPL) == 2 2361 && EMIsRawRing1Enabled(pVM) 2362 && pIemCpu->uCpl <= 1) 2363 { 2364 Log(("iret: Ring-1 compression fix: uNewCS=%#x -> %#x\n", uNewCs, (uNewCs & X86_SEL_MASK_OFF_RPL) | 1)); 2365 uNewCs = (uNewCs & X86_SEL_MASK_OFF_RPL) | 2; 2366 } 2367 } 2368 #endif /* VBOX_WITH_RAW_MODE_NOT_R0 */ 2369 2349 2370 2350 2371 /* Privilege checks. */
Note:
See TracChangeset
for help on using the changeset viewer.