Changeset 1164 in vbox
- Timestamp:
- Mar 2, 2007 2:50:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EM.cpp
r1156 r1164 1385 1385 cbUnit = Cpu.opmode == CPUMODE_32BIT ? 4 : 2; 1386 1386 1387 RTGCPTR GCPtrDst = pCtx->edi; 1387 RTGCPTR GCPtrDst = pCtx->edi; 1388 uint32_t cpl = (pRegFrame->eflags.Bits.u1VM) ? 3 : (pCtx->ss & X86_SEL_RPL); 1389 1388 1390 /* Access verification first; we can't recover from traps inside this instruction, as the port read cannot be repeated. */ 1389 1391 rc = PGMVerifyAccess(pVM, GCPtrDst, cTransfers * cbUnit, 1390 X86_PTE_RW | (( (pCtx->ss & X86_SEL_RPL)== 3) ? X86_PTE_US : 0));1392 X86_PTE_RW | ((cpl == 3) ? X86_PTE_US : 0)); 1391 1393 if (rc != VINF_SUCCESS) 1392 1394 { … … 1452 1454 cbUnit = Cpu.opmode == CPUMODE_32BIT ? 4 : 2; 1453 1455 1454 RTGCPTR GCPtrSrc = pCtx->esi; 1456 RTGCPTR GCPtrSrc = pCtx->esi; 1457 uint32_t cpl = (pRegFrame->eflags.Bits.u1VM) ? 3 : (pCtx->ss & X86_SEL_RPL); 1458 1455 1459 /* Access verification first; we currently can't recover properly from traps inside this instruction */ 1456 rc = PGMVerifyAccess(pVM, GCPtrSrc, cTransfers * cbUnit, (( (pCtx->ss & X86_SEL_RPL)== 3) ? X86_PTE_US : 0));1460 rc = PGMVerifyAccess(pVM, GCPtrSrc, cTransfers * cbUnit, ((cpl == 3) ? X86_PTE_US : 0)); 1457 1461 if (rc != VINF_SUCCESS) 1458 1462 { … … 1542 1546 /** Scan kernel code that traps; we might not get another chance. */ 1543 1547 if ( (pCtx->ss & X86_SEL_RPL) <= 1 1544 && pCtx->eflags.Bits.u1VM == 0)1548 && !pCtx->eflags.Bits.u1VM) 1545 1549 { 1546 1550 Assert(!PATMIsPatchGCAddr(pVM, pCtx->eip)); … … 1955 1959 #endif 1956 1960 if ( (pCtx->ss & X86_SEL_RPL) == 0 1961 && !pCtx->eflags.Bits.u1VM 1957 1962 && SELMIsSelector32Bit(pVM, pCtx->cs, &pCtx->csHid)) 1958 1963 { … … 2524 2529 */ 2525 2530 if ( (pCtx->ss & X86_SEL_RPL) <= 1 2526 && pCtx->eflags.Bits.u1VM == 02531 && !pCtx->eflags.Bits.u1VM 2527 2532 && !PATMIsPatchGCAddr(pVM, pCtx->eip)) 2528 2533 { … … 2888 2893 2889 2894 unsigned uSS = pCtx->ss; 2890 if ((uSS & X86_SEL_RPL) == 3) 2895 if ( pCtx->eflags.Bits.u1VM 2896 || (uSS & X86_SEL_RPL) == 3) 2891 2897 { 2892 2898 if (!EMIsRawRing3Enabled(pVM))
Note:
See TracChangeset
for help on using the changeset viewer.