Changeset 42900 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Aug 21, 2012 10:30:08 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r42894 r42900 62 62 * Global Variables * 63 63 *******************************************************************************/ 64 /* IO operation lookup arrays. */ 65 static uint32_t const g_aIOSize[8] = {0, 1, 2, 0, 4, 0, 0, 0}; 66 static uint32_t const g_aIOOpAnd[8] = {0, 0xff, 0xffff, 0, 0xffffffff, 0, 0, 0}; 67 64 68 65 69 /** … … 2394 2398 { 2395 2399 SVM_IOIO_EXIT IoExitInfo; 2396 uint32_t uIOSize, uAndVal;2397 2400 2398 2401 IoExitInfo.au32[0] = pVMCB->ctrl.u64ExitInfo1; 2399 2400 /** @todo could use a lookup table here */ 2401 if (IoExitInfo.n.u1OP8) 2402 { 2403 uIOSize = 1; 2404 uAndVal = 0xff; 2405 } 2406 else if (IoExitInfo.n.u1OP16) 2407 { 2408 uIOSize = 2; 2409 uAndVal = 0xffff; 2410 } 2411 else if (IoExitInfo.n.u1OP32) 2412 { 2413 uIOSize = 4; 2414 uAndVal = 0xffffffff; 2415 } 2416 else 2402 unsigned uIdx = (IoExitInfo.au32[0] >> 4) & 0x7; 2403 uint32_t uIOSize = g_aIOSize[uIdx]; 2404 uint32_t uAndVal = g_aIOOpAnd[uIdx]; 2405 if (RT_UNLIKELY(!uIOSize)) 2417 2406 { 2418 2407 AssertFailed(); /* should be fatal. */ 2419 rc = VINF_EM_RAW_EMULATE_INSTR; 2408 rc = VINF_EM_RAW_EMULATE_INSTR; /** @todo r=ramshankar: would this really fall back to the recompiler and work? */ 2420 2409 break; 2421 2410 }
Note:
See TracChangeset
for help on using the changeset viewer.