VirtualBox

Changeset 97406 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Nov 5, 2022 12:42:14 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154411
Message:

VMM/IEM,CPUM: Partial single stepping support in the interpreter. bugref:9898

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/cpumctx.h

    r97287 r97406  
    276276/** Mask of internal flags kept with EFLAGS, 64-bit version.
    277277 * The first 3 available bits are taken by CPUMCTX_INHIBIT_SHADOW_SS,
    278  * CPUMCTX_INHIBIT_SHADOW_STI and CPUMCTX_INHIBIT_NMI.
    279  */
    280 #define CPUMX86EFLAGS_INT_MASK_64   UINT64_C(0x0000000007000000)
     278 * CPUMCTX_INHIBIT_SHADOW_STI and CPUMCTX_INHIBIT_NMI.  The next 4 bits are
     279 * taken by CPUMCTX_DBG_HIT_DRX_MASK.
     280 */
     281#define CPUMX86EFLAGS_INT_MASK_64   UINT64_C(0x000000007f000000)
    281282/** Mask of internal flags kept with EFLAGS, 32-bit version. */
    282 #define CPUMX86EFLAGS_INT_MASK_32           UINT32_C(0x07000000)
     283#define CPUMX86EFLAGS_INT_MASK_32           UINT32_C(0x7f000000)
    283284
    284285
     
    10251026 * other interrupts, including NMI interrupts, are received until the NMI
    10261027 * handler has completed executing."  This flag indicates that these
    1027  * conditions are currently active.  */
     1028 * conditions are currently active.
     1029 *
     1030 * @todo this does not really need to be in the lower 32-bits of EFLAGS.
     1031 */
    10281032#define CPUMCTX_INHIBIT_NMI             RT_BIT_32(2 + CPUMX86EFLAGS_HW_BITS)
    10291033
     
    10321036AssertCompile(CPUMCTX_INHIBIT_ALL_MASK < UINT32_MAX);
    10331037/** @} */
     1038
     1039/** @name CPUMCTX_DBG_XXX - Pending debug events.
     1040 * @{ */
     1041/** Hit guest DR0 breakpoint. */
     1042#define CPUMCTX_DBG_HIT_DR0             RT_BIT_32(CPUMCTX_DBG_HIT_DR0_BIT)
     1043#define CPUMCTX_DBG_HIT_DR0_BIT         (3 + CPUMX86EFLAGS_HW_BITS)
     1044/** Hit guest DR1 breakpoint. */
     1045#define CPUMCTX_DBG_HIT_DR1             RT_BIT_32(CPUMCTX_DBG_HIT_DR1_BIT)
     1046#define CPUMCTX_DBG_HIT_DR1_BIT         (4 + CPUMX86EFLAGS_HW_BITS)
     1047/** Hit guest DR2 breakpoint. */
     1048#define CPUMCTX_DBG_HIT_DR2             RT_BIT_32(CPUMCTX_DBG_HIT_DR2_BIT)
     1049#define CPUMCTX_DBG_HIT_DR2_BIT         (5 + CPUMX86EFLAGS_HW_BITS)
     1050/** Hit guest DR3 breakpoint. */
     1051#define CPUMCTX_DBG_HIT_DR3             RT_BIT_32(CPUMCTX_DBG_HIT_DR3_BIT)
     1052#define CPUMCTX_DBG_HIT_DR3_BIT         (6 + CPUMX86EFLAGS_HW_BITS)
     1053/** Shift for the CPUMCTX_DBG_HIT_DRx bits. */
     1054#define CPUMCTX_DBG_HIT_DRX_SHIFT       CPUMCTX_DBG_HIT_DR0_BIT
     1055/** Mask of all guest pending DR0-DR3 breakpoint indicators. */
     1056#define CPUMCTX_DBG_HIT_DRX_MASK       (CPUMCTX_DBG_HIT_DR0 | CPUMCTX_DBG_HIT_DR1 | CPUMCTX_DBG_HIT_DR2 | CPUMCTX_DBG_HIT_DR3)
     1057AssertCompile(CPUMCTX_DBG_HIT_DRX_MASK < UINT32_MAX);
     1058/** @}  */
     1059
    10341060
    10351061
  • trunk/include/VBox/vmm/vm.h

    r97286 r97406  
    539539#define VMCPU_FF_VMX_MTF                    RT_BIT_64(VMCPU_FF_VMX_MTF_BIT)
    540540#define VMCPU_FF_VMX_MTF_BIT                32
    541 /** VMX APIC-write emulation pending.  */
     541/** VMX APIC-write emulation pending.
     542 * @todo possible candidate for internal EFLAGS, or maybe just a summary bit
     543 *       (see also VMCPU_FF_VMX_INT_WINDOW). */
    542544#define VMCPU_FF_VMX_APIC_WRITE             RT_BIT_64(VMCPU_FF_VMX_APIC_WRITE_BIT)
    543545#define VMCPU_FF_VMX_APIC_WRITE_BIT         33
    544 /** VMX interrupt-window event pending. */
     546/** VMX interrupt-window event pending.
     547 *
     548 * "Pending" is misleading here, it would be better to say that the event need
     549 * to be generated at the next opportunity and that this flag causes it to be
     550 * polled for on every instruction boundrary and such.
     551 *
     552 * @todo Change the IEM side of this to not poll but to track down the places
     553 *       where it can be generated and set an internal EFLAGS bit that causes it
     554 *       to be checked out when finishing the current instruction. */
    545555#define VMCPU_FF_VMX_INT_WINDOW             RT_BIT_64(VMCPU_FF_VMX_INT_WINDOW_BIT)
    546556#define VMCPU_FF_VMX_INT_WINDOW_BIT         34
    547 /** VMX NMI-window event pending. */
     557/** VMX NMI-window event pending.
     558 * Same "pending" comment and todo in VMCPU_FF_VMX_INT_WINDOW. */
    548559#define VMCPU_FF_VMX_NMI_WINDOW             RT_BIT_64(VMCPU_FF_VMX_NMI_WINDOW_BIT)
    549560#define VMCPU_FF_VMX_NMI_WINDOW_BIT         35
Note: See TracChangeset for help on using the changeset viewer.

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