VirtualBox

Changeset 86098 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Sep 13, 2020 7:17:19 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140330
Message:

VMM/DBGF: Rework part 1 to make it work well with SMP VMs. bugref:9822

Location:
trunk/include/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/dbg.h

    r85121 r86098  
    682682    DECLCALLBACKMEMBER(CPUMMODE, pfnGetCpuMode,(PDBGCCMDHLP pCmdHlp));
    683683
     684    /**
     685     * Prints the register set of the given CPU.
     686     *
     687     * @returns VBox status code.
     688     * @param   pCmdHlp     Pointer to the command callback structure.
     689     * @param   idCpu       The CPU ID to print the register set of.
     690     * @param   f64BitMode  True to dump 64-bit state, false to dump 32-bit state,
     691     *                      -1 to use the current CPU mode.
     692     * @param   fTerse      Flag to indicate whether to dump the complete register set.
     693     */
     694    DECLCALLBACKMEMBER(int, pfnRegPrintf, (PDBGCCMDHLP pCmdHlp, VMCPUID idCpu, int f64BitMode, bool fTerse));
     695
    684696    /** End marker (DBGCCMDHLP_MAGIC). */
    685697    uint32_t                u32EndMarker;
     
    982994{
    983995    return pCmdHlp->pfnGetCpuMode(pCmdHlp);
     996}
     997
     998/**
     999 * @copydoc DBGCCMDHLP::pfnRegPrintf
     1000 */
     1001DECLINLINE(int) DBGCCmdHlpRegPrintf(PDBGCCMDHLP pCmdHlp, VMCPUID idCpu, int f64BitMode, bool fTerse)
     1002{
     1003    return pCmdHlp->pfnRegPrintf(pCmdHlp, idCpu, f64BitMode, fTerse);
    9841004}
    9851005
  • trunk/include/VBox/err.h

    r84858 r86098  
    276276 * debugger to the VM. */
    277277#define VERR_DBGF_ALREADY_ATTACHED          (-1201)
    278 /** Tried to halt a debugger which was already halted.
    279  * (This is a warning and not an error.) */
     278/** Tried to halt a VM or CPU that was already halted. */
    280279#define VWRN_DBGF_ALREADY_HALTED            1202
    281280/** The DBGF has no more free breakpoint slots. */
     
    323322/** Internal processing error \#1 in the DBGF event tracing code. */
    324323#define VERR_DBGF_TRACER_IPE_1              (-1221)
     324/** Tried to resume a VM or CPU that is already fully running. */
     325#define VWRN_DBGF_ALREADY_RUNNING           (-1222)
    325326/** @} */
    326327
  • trunk/include/VBox/vmm/dbgf.h

    r85121 r86098  
    490490    /** Context */
    491491    DBGFEVENTCTX    enmCtx;
     492    /** The vCPU/EMT which generated the event. */
     493    VMCPUID         idCpu;
     494    /** Reserved. */
     495    uint32_t        uReserved;
    492496    /** Type specific data. */
    493497    union
     
    534538            /** Number of arguments. */
    535539            uint8_t                 cArgs;
    536             /** Alignmnet padding. */
     540            /** Alignment padding. */
    537541            uint8_t                 uPadding[7];
    538542            /** Arguments. */
    539             uint64_t                auArgs[6];
     543            uint64_t                auArgs[5];
    540544        } Generic;
    541545
    542546        /** Padding for ensuring that the structure is 8 byte aligned. */
    543         uint64_t        au64Padding[7];
     547        uint64_t        au64Padding[6];
    544548    } u;
    545549} DBGFEVENT;
    546550AssertCompileSizeAlignment(DBGFEVENT, 8);
     551AssertCompileSize(DBGFEVENT, 64);
    547552/** Pointer to VMM Debug Event. */
    548553typedef DBGFEVENT *PDBGFEVENT;
     
    583588VMMR3DECL(int)          DBGFR3Attach(PUVM pUVM);
    584589VMMR3DECL(int)          DBGFR3Detach(PUVM pUVM);
    585 VMMR3DECL(int)          DBGFR3EventWait(PUVM pUVM, RTMSINTERVAL cMillies, PCDBGFEVENT *ppEvent);
    586 VMMR3DECL(int)          DBGFR3Halt(PUVM pUVM);
    587 VMMR3DECL(bool)         DBGFR3IsHalted(PUVM pUVM);
     590VMMR3DECL(int)          DBGFR3EventWait(PUVM pUVM, RTMSINTERVAL cMillies, PDBGFEVENT pEvent);
     591VMMR3DECL(int)          DBGFR3Halt(PUVM pUVM, VMCPUID idCpu);
     592VMMR3DECL(bool)         DBGFR3IsHalted(PUVM pUVM, VMCPUID idCpu);
    588593VMMR3DECL(int)          DBGFR3QueryWaitable(PUVM pUVM);
    589 VMMR3DECL(int)          DBGFR3Resume(PUVM pUVM);
     594VMMR3DECL(int)          DBGFR3Resume(PUVM pUVM, VMCPUID idCpu);
    590595VMMR3DECL(int)          DBGFR3InjectNMI(PUVM pUVM, VMCPUID idCpu);
    591596VMMR3DECL(int)          DBGFR3Step(PUVM pUVM, VMCPUID idCpu);
  • trunk/include/VBox/vmm/vm.h

    r85965 r86098  
    251251        struct DBGFCPU      s;
    252252#endif
    253         uint8_t             padding[256];       /* multiple of 64 */
     253        uint8_t             padding[512];       /* multiple of 64 */
    254254    } dbgf;
    255255
     
    285285
    286286    /** Align the following members on page boundary. */
    287     uint8_t                 abAlignment2[3448];
     287    uint8_t                 abAlignment2[3192];
    288288
    289289    /** PGM part. */
  • trunk/include/VBox/vmm/vm.mac

    r85965 r86098  
    6969    .pdm                    resb 256
    7070    .iom                    resb 512
    71     .dbgf                   resb 256
     71    .dbgf                   resb 512
    7272    .gim                    resb 512
    7373    .apic                   resb 3840
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