VirtualBox

Changeset 105072 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Jun 28, 2024 12:03:20 PM (7 months ago)
Author:
vboxsync
Message:

VMM/IEM,DBGF,bs3-cpu-weird-1: Early data breakpoint support, mostly untested except for the ring transition tests in bs3-cpu-weird-1. bugref:10715

Location:
trunk/src/VBox/VMM/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/IEMInline.h

    r104988 r105072  
    579579    /*
    580580     * Check for hardware instruction breakpoints.
     581     * Note! Guest breakpoints are only checked after POP SS or MOV SS on AMD CPUs.
    581582     */
    582583    if (RT_LIKELY(!(pVCpu->iem.s.fExec & IEM_F_PENDING_BRK_INSTR)))
     
    585586    {
    586587        VBOXSTRICTRC rcStrict = DBGFBpCheckInstruction(pVCpu->CTX_SUFF(pVM), pVCpu,
    587                                                        pVCpu->cpum.GstCtx.rip + pVCpu->cpum.GstCtx.cs.u64Base);
     588                                                       pVCpu->cpum.GstCtx.rip + pVCpu->cpum.GstCtx.cs.u64Base,
     589                                                          !(pVCpu->cpum.GstCtx.rflags.uBoth & CPUMCTX_INHIBIT_SHADOW_SS)
     590                                                       || IEM_IS_GUEST_CPU_AMD(pVCpu));
    588591        if (RT_LIKELY(rcStrict == VINF_SUCCESS))
    589592        { /* likely */ }
     
    622625    /*
    623626     * Check for hardware instruction breakpoints.
     627    * Note! Guest breakpoints are only checked after POP SS or MOV SS on AMD CPUs.
    624628     */
    625629    if (RT_LIKELY(!(pVCpu->iem.s.fExec & IEM_F_PENDING_BRK_INSTR)))
     
    628632    {
    629633        VBOXSTRICTRC rcStrict = DBGFBpCheckInstruction(pVCpu->CTX_SUFF(pVM), pVCpu,
    630                                                        pVCpu->cpum.GstCtx.rip + pVCpu->cpum.GstCtx.cs.u64Base);
     634                                                       pVCpu->cpum.GstCtx.rip + pVCpu->cpum.GstCtx.cs.u64Base,
     635                                                          !(pVCpu->cpum.GstCtx.rflags.uBoth & CPUMCTX_INHIBIT_SHADOW_SS)
     636                                                       || IEM_IS_GUEST_CPU_AMD(pVCpu));
    631637        if (RT_LIKELY(rcStrict == VINF_SUCCESS))
    632638        { /* likely */ }
     
    21112117            if (pVCpu->cpum.GstCtx.eflags.uBoth & X86_EFL_TF)
    21122118                pVCpu->cpum.GstCtx.dr[6] |= X86_DR6_BS;
    2113             pVCpu->cpum.GstCtx.dr[6] |= (pVCpu->cpum.GstCtx.eflags.uBoth & CPUMCTX_DBG_HIT_DRX_MASK) >> CPUMCTX_DBG_HIT_DRX_SHIFT;
     2119            pVCpu->cpum.GstCtx.dr[6] |= (pVCpu->cpum.GstCtx.eflags.uBoth & CPUMCTX_DBG_HIT_DRX_MASK_NONSILENT)
     2120                                     >> CPUMCTX_DBG_HIT_DRX_SHIFT;
    21142121            LogFlowFunc(("Guest #DB fired at %04X:%016llX: DR6=%08X, RFLAGS=%16RX64\n",
    21152122                         pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip, (unsigned)pVCpu->cpum.GstCtx.dr[6],
     
    28282835    pVCpu->cpum.GstCtx.dr[6] &= ~X86_DR6_B_MASK;
    28292836    pVCpu->cpum.GstCtx.dr[6] |= X86_DR6_BS
    2830                              |  (pVCpu->cpum.GstCtx.eflags.uBoth & CPUMCTX_DBG_HIT_DRX_MASK) >> CPUMCTX_DBG_HIT_DRX_SHIFT;
     2837                             | (   (pVCpu->cpum.GstCtx.eflags.uBoth & CPUMCTX_DBG_HIT_DRX_MASK_NONSILENT)
     2838                                >> CPUMCTX_DBG_HIT_DRX_SHIFT);
    28312839    /** @todo Do we set all pending \#DB events, or just one? */
    28322840    LogFlowFunc(("Guest #DB fired at %04X:%016llX: DR6=%08X, RFLAGS=%16RX64 (popf)\n",
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r105036 r105072  
    19811981    R3PTRTYPE(PIEMTB)       pTbLookupEntryDummyR3;
    19821982
     1983    /** Dummy TLB entry used for accesses to pages with databreakpoints. */
     1984    IEMTLBENTRY             DataBreakpointTlbe;
     1985
    19831986    /** Threaded TB statistics: Times TB execution was broken off before reaching the end. */
    19841987    STAMCOUNTER             StatTbThreadedExecBreaks;
     
    22012204    STAMCOUNTER             StatMemBounceBufferMapPhys;
    22022205    /** @} */
    2203 
    2204     uint64_t                au64Padding[1];
     2206                                       
     2207    uint64_t                au64Padding[5];
    22052208    /** @} */
    22062209
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