VirtualBox

Ignore:
Timestamp:
Mar 21, 2024 9:37:32 AM (11 months ago)
Author:
vboxsync
Message:

ValKit/bs3kit,bs3-cpu-instr-3: Don't set g_uBs3TrapEipHint automatically in Bs3TrapSetJmpAndRestoreWithExtCtx as we don't know the actual trap/exit EIP and it may have a different value in the top word from pCtxRestore->rip. Instead the caller has to set it like with Bs3RegCtxRestore. bugref:9898

Location:
trunk/src/VBox/ValidationKit/bootsectors
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-3.c32

    r103931 r103980  
    864864                             * Execute.
    865865                             */
     866                            g_uBs3TrapEipHint = Ctx.rip.u32 + (bXcptExpect == X86_XCPT_DB ? cbInstr + 1 : 0);
    866867                            Bs3TrapSetJmpAndRestoreWithExtCtxAndRm(&Ctx, pExtCtx, &TrapFrame, pExtCtxOut);
    867868
     
    93799380                             * Execute.
    93809381                             */
     9382                            g_uBs3TrapEipHint = Ctx.rip.u32 + (bXcptExpect == X86_XCPT_DB ? cbInstr + 1 : 0);
    93819383                            Bs3TrapSetJmpAndRestoreWithExtCtxAndRm(&Ctx, pExtCtx, &TrapFrame, pExtCtxOut);
    93829384
     
    1020110203                             * Execute.
    1020210204                             */
     10205                            g_uBs3TrapEipHint = Ctx.rip.u32 + (bXcptExpect == X86_XCPT_DB ? cbInstr + 1 : 0);
    1020310206                            Bs3TrapSetJmpAndRestoreWithExtCtxAndRm(&Ctx, pExtCtx, &TrapFrame, pExtCtxOut);
    1020410207
     
    1243212435                                 * Execute.
    1243312436                                 */
     12437                                g_uBs3TrapEipHint = Ctx.rip.u32 + (bXcptExpect == X86_XCPT_DB ? cbInstr + 1 : 0);
    1243412438                                Bs3TrapSetJmpAndRestoreWithExtCtxAndRm(&Ctx, pExtCtx, &TrapFrame, pExtCtxOut);
    1243512439
     
    1279412798                             * Execute.
    1279512799                             */
     12800                            g_uBs3TrapEipHint = Ctx.rip.u32 + (bXcptExpect == X86_XCPT_DB ? cbInstr + 1 : 0);
    1279612801                            Bs3TrapSetJmpAndRestoreWithExtCtxAndRm(&Ctx, pExtCtx, &TrapFrame, pExtCtxOut);
    1279712802
     
    1333713342                             * Execute.
    1333813343                             */
     13344                            g_uBs3TrapEipHint = Ctx.rip.u32 + (bXcptExpect == X86_XCPT_DB ? cbInstr + 1 : 0);
    1333913345                            Bs3TrapSetJmpAndRestoreWithExtCtxAndRm(&Ctx, pExtCtx, &TrapFrame, pExtCtxOut);
    1334013346
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetJmpAndRestoreWithExtCtx.c

    r98103 r103980  
    5050    Bs3ExtCtxRestoreEx(pExtCtxRestore);
    5151    if (Bs3TrapSetJmp(pTrapFrame))
    52     {
    53 #if TMPL_BITS == 32
    54         g_uBs3TrapEipHint = pCtxRestore->rip.u32;
    55 #endif
    5652        Bs3RegCtxRestore(pCtxRestore, BS3REGCTXRESTORE_F_NO_V86_ASSIST);
    57     }
    5853    g_fBs3TrapNoV86Assist = false;
    5954    Bs3ExtCtxSaveEx(pExtCtxTrap);
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