VirtualBox

Changeset 1145 in vbox


Ignore:
Timestamp:
Mar 2, 2007 9:20:44 AM (18 years ago)
Author:
vboxsync
Message:

Forgot to clear ds, es, fs & gs for interrupt/trap in V86 mode.
Put eflags including virtualized bits on the interrupt stack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/TRPMAll.cpp

    r1144 r1145  
    600600                if (rc == VINF_SUCCESS)
    601601                {
    602                     Log(("TRAP%02X: Handler %04X:%08X Stack %04X:%08X RPL=%d CR2=%08X\n", iGate, GuestIdte.Gen.u16SegSel, pHandler, ss_r0, esp_r0, (pRegFrame->ss & X86_SEL_RPL), pVM->trpm.s.uActiveCR2));
    603 
    604602                    /** if eflags.Bits.u1VM then push gs, fs, ds, es */
    605603                    if (eflags.Bits.u1VM)
    606604                    {
     605                        Log(("TRAP%02X: (VM) Handler %04X:%08X Stack %04X:%08X RPL=%d CR2=%08X\n", iGate, GuestIdte.Gen.u16SegSel, pHandler, ss_r0, esp_r0, (pRegFrame->ss & X86_SEL_RPL), pVM->trpm.s.uActiveCR2));
    607606                        CTXSUFF(pTrapStack)[--idx] = pRegFrame->gs;
    608607                        CTXSUFF(pTrapStack)[--idx] = pRegFrame->fs;
    609608                        CTXSUFF(pTrapStack)[--idx] = pRegFrame->ds;
    610609                        CTXSUFF(pTrapStack)[--idx] = pRegFrame->es;
     610
     611                        /* clear ds, es, fs & gs in current context */
     612                        pRegFrame->ds = pRegFrame->es = pRegFrame->fs = pRegFrame->gs = 0;
    611613                    }
     614                    else
     615                        Log(("TRAP%02X: Handler %04X:%08X Stack %04X:%08X RPL=%d CR2=%08X\n", iGate, GuestIdte.Gen.u16SegSel, pHandler, ss_r0, esp_r0, (pRegFrame->ss & X86_SEL_RPL), pVM->trpm.s.uActiveCR2));
    612616
    613617                    if (fConforming == false && dpl < cpl)
     
    621625                    }
    622626
    623                     /* @note we use the original eflags, not the copy that includes the virtualized bits! */
    624                     CTXSUFF(pTrapStack)[--idx] = pRegFrame->eflags.u32;
     627                    /* @note we use the eflags copy, that includes the virtualized bits! */
     628                    CTXSUFF(pTrapStack)[--idx] = eflags.u32;
    625629
    626630                    if ((pRegFrame->cs & X86_SEL_RPL) == 1 && !eflags.Bits.u1VM)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette