Changeset 2003 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 10, 2007 9:30:52 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
r1981 r2003 343 343 LogFlow(("TRPMGCTrap06Handler %VGv eflags=%x\n", pRegFrame->eip, pRegFrame->eflags.u32)); 344 344 345 if ( (pRegFrame->ss & X86_SEL_RPL) == 1 346 && !pRegFrame->eflags.Bits.u1VM 347 && PATMIsPatchGCAddr(pVM, (RTGCPTR)pRegFrame->eip)) 345 if (CPUMGetGuestCPL(pVM, pRegFrame) == 0) 348 346 { 349 347 /* … … 364 362 return trpmGCExitTrap(pVM, VINF_EM_RAW_EMULATE_INSTR, pRegFrame); 365 363 366 /** @note monitor causes an #UD exception instead of #GP when not executed in ring 0. */367 if (Cpu.pCurInstr->opcode == OP_ILLUD2)364 if ( PATMIsPatchGCAddr(pVM, (RTGCPTR)pRegFrame->eip) 365 && Cpu.pCurInstr->opcode == OP_ILLUD2) 368 366 { 369 367 rc = PATMGCHandleIllegalInstrTrap(pVM, pRegFrame); … … 371 369 return trpmGCExitTrap(pVM, rc, pRegFrame); 372 370 } 373 /* Never generate a raw trap here; it might be a monitor instruction, that requires emulation. */ 374 rc = VINF_EM_RAW_EMULATE_INSTR; 375 } 376 else if (pRegFrame->eflags.Bits.u1VM) 371 else 372 /** Note: monitor causes an #UD exception instead of #GP when not executed in ring 0. */ 373 if (Cpu.pCurInstr->opcode == OP_MONITOR) 374 { 375 uint32_t cbIgnored; 376 rc = EMInterpretInstructionCPU(pVM, &Cpu, pRegFrame, PC, &cbIgnored); 377 } 378 else 379 /* Never generate a raw trap here; it might be an instruction, that requires emulation. */ 380 rc = VINF_EM_RAW_EMULATE_INSTR; 381 } 382 else 383 if (pRegFrame->eflags.Bits.u1VM) 377 384 { 378 385 rc = TRPMForwardTrap(pVM, pRegFrame, 0x6, 0, TRPM_TRAP_NO_ERRORCODE, TRPM_TRAP); … … 380 387 } 381 388 else 382 /* Never generate a raw trap here; it might be a monitorinstruction, that requires emulation. */389 /* Never generate a raw trap here; it might be an instruction, that requires emulation. */ 383 390 rc = VINF_EM_RAW_EMULATE_INSTR; 384 391
Note:
See TracChangeset
for help on using the changeset viewer.