VirtualBox

Changeset 100723 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jul 28, 2023 7:23:31 AM (18 months ago)
Author:
vboxsync
Message:

VMM/ARM: Add debug system registers in the vCPU state, bugref:10387, bugref:10390

File:
1 edited

Legend:

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

    r100118 r100723  
    119119#ifndef VBOX_FOR_DTRACE_LIB
    120120AssertCompileSize(CPUMCTXSYSREG, 8);
     121
     122
     123/**
     124 * A debug register state (control and value), these are held together
     125 * because they will be accessed together very often and thus minimizes
     126 * stress on the cache.
     127 */
     128typedef struct CPUMCTXSYSREGDBG
     129{
     130    /** The control register. */
     131    CPUMCTXSYSREG   Ctrl;
     132    /** The value register. */
     133    CPUMCTXSYSREG   Value;
     134} CPUMCTXSYSREGDBG;
     135/** Pointer to a debug register state. */
     136typedef CPUMCTXSYSREGDBG *PCPUMCTXSYSREGDBG;
     137/** Pointer to a const debug register state. */
     138typedef const CPUMCTXSYSREGDBG *PCCPUMCTXSYSREGDBG;
    121139#endif
    122140
     
    128146{
    129147    /** The general purpose register array view. */
    130     CPUMCTXGREG     aGRegs[31];
     148    CPUMCTXGREG         aGRegs[31];
    131149    /** The NEON SIMD & FP register array view. */
    132     CPUMCTXVREG     aVRegs[32];
     150    CPUMCTXVREG         aVRegs[32];
    133151    /** The stack registers (EL0, EL1). */
    134     CPUMCTXSYSREG   aSpReg[2];
     152    CPUMCTXSYSREG       aSpReg[2];
    135153    /** The program counter. */
    136     CPUMCTXSYSREG   Pc;
     154    CPUMCTXSYSREG       Pc;
    137155    /** The SPSR (Saved Program Status Register) (EL1 only). */
    138     CPUMCTXSYSREG   Spsr;
     156    CPUMCTXSYSREG       Spsr;
    139157    /** The ELR (Exception Link Register) (EL1 only). */
    140     CPUMCTXSYSREG   Elr;
     158    CPUMCTXSYSREG       Elr;
    141159    /** The SCTLR_EL1 register. */
    142     CPUMCTXSYSREG   Sctlr;
     160    CPUMCTXSYSREG       Sctlr;
    143161    /** THe TCR_EL1 register. */
    144     CPUMCTXSYSREG   Tcr;
     162    CPUMCTXSYSREG       Tcr;
    145163    /** The TTBR0_EL1 register. */
    146     CPUMCTXSYSREG   Ttbr0;
     164    CPUMCTXSYSREG       Ttbr0;
    147165    /** The TTBR1_EL1 register. */
    148     CPUMCTXSYSREG   Ttbr1;
     166    CPUMCTXSYSREG       Ttbr1;
    149167    /** The VBAR_EL1 register. */
    150     CPUMCTXSYSREG   VBar;
     168    CPUMCTXSYSREG       VBar;
     169    /** Breakpoint registers, DBGB{C,V}<n>_EL1. */
     170    CPUMCTXSYSREGDBG    aBp[16];
     171    /** Watchpoint registers, DBGW{C,V}<n>_EL1. */
     172    CPUMCTXSYSREGDBG    aWp[16];
    151173
    152174    /** Floating point control register. */
    153     uint64_t        fpcr;
     175    uint64_t            fpcr;
    154176    /** Floating point status register. */
    155     uint64_t        fpsr;
     177    uint64_t            fpsr;
    156178    /** The internal PSTATE state (as given from SPSR_EL2). */
    157     uint64_t        fPState;
    158 
    159     uint32_t        fPadding0;
     179    uint64_t            fPState;
     180
     181    uint32_t            fPadding0;
    160182
    161183    /** OS lock status accessed through OSLAR_EL1 and OSLSR_EL1. */
    162     bool            fOsLck;
    163 
    164     uint8_t         afPadding1[7];
     184    bool                fOsLck;
     185
     186    uint8_t             afPadding1[7];
    165187
    166188    /** Externalized state tracker, CPUMCTX_EXTRN_XXX. */
    167     uint64_t        fExtrn;
     189    uint64_t            fExtrn;
    168190
    169191    /** The CNTV_CTL_EL0 register, always synced during VM-exit. */
    170     uint64_t        CntvCtlEl0;
     192    uint64_t            CntvCtlEl0;
    171193    /** The CNTV_CVAL_EL0 register, always synced during VM-exit. */
    172     uint64_t        CntvCValEl0;
    173 
    174     uint64_t        au64Padding2[6];
     194    uint64_t            CntvCValEl0;
     195
     196    uint64_t            au64Padding2[6];
    175197} CPUMCTX;
    176198
     
    233255#define CPUMCTX_EXTRN_FPSR                      UINT64_C(0x0000000000008000)
    234256
     257/** Debug system registers are kept externally. */
     258#define CPUMCTX_EXTRN_SYSREG_DEBUG              UINT64_C(0x0000000000010000)
    235259/** Various system registers (rarely accessed) are kept externally. */
    236 #define CPUMCTX_EXTRN_SYSREG                    UINT64_C(0x0000000000010000)
     260#define CPUMCTX_EXTRN_SYSREG_MISC               UINT64_C(0x0000000000020000)
    237261
    238262/** Mask of bits the keepers can use for state tracking. */
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