Changeset 1089 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Feb 28, 2007 8:42:35 AM (18 years ago)
- Location:
- trunk/src/VBox/VMM/VMMGC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
r988 r1089 223 223 AssertMsg( rc != VINF_SUCCESS 224 224 || ( pRegFrame->eflags.Bits.u1IF 225 && pRegFrame->eflags.Bits.u2IOPL < (unsigned)(pRegFrame->ss & X86_SEL_RPL))225 && ( pRegFrame->eflags.Bits.u2IOPL < (unsigned)(pRegFrame->ss & X86_SEL_RPL) || pRegFrame->eflags.Bits.u1VM)) 226 226 , ("rc = %VGv\neflags=%RX32 ss=%RTsel IOPL=%d\n", rc, pRegFrame->eflags.u32, pRegFrame->ss, pRegFrame->eflags.Bits.u2IOPL)); 227 227 return rc; … … 338 338 PVM pVM = TRPM2VM(pTrpm); 339 339 340 LogFlow(("TRPMGCTrap06Handler %VGv \n", pRegFrame->eip));340 LogFlow(("TRPMGCTrap06Handler %VGv eflags=%x\n", pRegFrame->eip, pRegFrame->eflags.u32)); 341 341 342 342 if ( (pRegFrame->ss & X86_SEL_RPL) == 1 … … 696 696 697 697 STAM_PROFILE_ADV_START(&pVM->trpm.s.StatTrap0dDisasm, a); 698 699 /* We always set IOPL to zero which makes e.g. pushf fault in V86 mode. The guest might use IOPL=3 and therefor not expect a #GP. 700 * Simply fall back to the recompiler to emulate this instruction. 701 */ 702 if (pRegFrame->eflags.Bits.u1VM) 703 { 704 STAM_PROFILE_ADV_STOP(&pVM->trpm.s.StatTrap0dDisasm, a); 705 return trpmGCExitTrap(pVM, VINF_EM_RAW_EMULATE_INSTR, pRegFrame); 706 } 707 698 708 /* 699 709 * Decode the instruction. … … 706 716 pRegFrame->cs, pRegFrame->eip, pRegFrame->ss & X86_SEL_RPL, rc)); 707 717 STAM_PROFILE_ADV_STOP(&pVM->trpm.s.StatTrap0dDisasm, a); 708 return trpmGCExitTrap(pVM, VINF_EM_RAW_ GUEST_TRAP, pRegFrame);718 return trpmGCExitTrap(pVM, VINF_EM_RAW_EMULATE_INSTR, pRegFrame); 709 719 } 710 720 -
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlersA.asm
r848 r1089 497 497 498 498 mov eax, dword [esp + CPUMCTXCORE.es] 499 mov [esp + 0ch + ESPOFF], eax ; es499 mov [esp + 1ch + ESPOFF], eax ; es 500 500 mov eax, dword [esp + CPUMCTXCORE.ds] 501 mov [esp + 10h + ESPOFF], eax ; ds501 mov [esp + 20h + ESPOFF], eax ; ds 502 502 mov eax, dword [esp + CPUMCTXCORE.fs] 503 mov [esp + 14h + ESPOFF], eax ; fs503 mov [esp + 24h + ESPOFF], eax ; fs 504 504 mov eax, dword [esp + CPUMCTXCORE.gs] 505 mov [esp + 18h + ESPOFF], eax ; gs505 mov [esp + 28h + ESPOFF], eax ; gs 506 506 507 507 mov eax, [esp + CPUMCTXCORE.eip] … … 914 914 mov edi, [esp + CPUMCTXCORE.edi] 915 915 916 ; In V86 mode DS, ES, FS & GS are restored by the iret 917 test dword [esp + CPUMCTXCORE.eflags], X86_EFL_VM 918 jnz short ti_SkipSelRegs 919 916 920 mov eax, [esp + CPUMCTXCORE.gs] 917 921 TRPM_NP_GP_HANDLER NAME(trpmGCTrapInGeneric), TRPM_TRAP_IN_MOV_GS | TRPM_TRAP_IN_HYPER … … 927 931 mov ds, eax 928 932 933 ti_SkipSelRegs: 929 934 ; finally restore our scratch register eax 930 935 mov eax, [esp + CPUMCTXCORE.eax]
Note:
See TracChangeset
for help on using the changeset viewer.