VirtualBox

Changeset 104509 in vbox


Ignore:
Timestamp:
May 3, 2024 2:14:36 PM (11 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
163032
Message:

VMM: Some more GCM cleanup. bugref:9735 bugref:10683

Location:
trunk
Files:
3 edited

Legend:

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

    r104507 r104509  
    5959#endif /* IN_RING3 */
    6060
    61 VMMDECL(bool)               GCMIsEnabled(PVM pVM);
    6261VMM_INT_DECL(bool)          GCMShouldTrapXcptDE(PVMCPUCC pVCpu);
    6362VMM_INT_DECL(VBOXSTRICTRC)  GCMXcptDE(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr);
  • trunk/src/VBox/VMM/VMMAll/GCMAll.cpp

    r104508 r104509  
    3939
    4040
    41 /**
    42  * Checks whether GCM is enabled for this VM.
    43  *
    44  * @retval  true if GCM is on.
    45  * @retval  false if no GCM fixer is enabled.
    46  *
    47  * @param   pVM       The cross context VM structure.
    48  */
    49 VMMDECL(bool) GCMIsEnabled(PVM pVM)
    50 {
    51     return pVM->gcm.s.fFixerSet != GCMFIXER_NONE;
    52 }
    53 
    54 
    55 /**
    56  * Gets the GCM fixers configured for this VM.
    57  *
    58  * @returns The GCM provider Id.
    59  * @param   pVM     The cross context VM structure.
    60  */
    61 VMMDECL(int32_t) GCMGetFixers(PVM pVM)
    62 {
    63     return pVM->gcm.s.fFixerSet;
    64 }
    65 
    6641
    6742/**
     
    7449VMM_INT_DECL(bool) GCMShouldTrapXcptDE(PVMCPUCC pVCpu)
    7550{
    76     LogFlowFunc(("entered\n"));
     51    LogFunc(("GCM checking if #DE needs trapping\n"));
    7752    PVM pVM = pVCpu->CTX_SUFF(pVM);
    78     if (!GCMIsEnabled(pVM))
    79         return false;
    80 
    81     LogFunc(("GCM checking if #DE needs trapping\n"));
    8253
    8354    /* See if the enabled fixers need to intercept #DE. */
     
    11586{
    11687    PVMCC pVM = pVCpu->CTX_SUFF(pVM);
    117     Assert(GCMIsEnabled(pVM));
     88    Assert(pVM->gcm.s.fFixerSet & (GCMFIXER_DBZ_DOS | GCMFIXER_DBZ_OS2 | GCMFIXER_DBZ_WIN9X));
    11889    Assert(pDis || pcbInstr);
    11990    RT_NOREF(pDis);
  • trunk/src/VBox/VMM/include/GCMInternal.h

    r104507 r104509  
    4343
    4444/** The saved state version. */
    45 #define GCM_SAVED_STATE_VERSION         1
     45#define GCM_SAVED_STATE_VERSION     1
    4646
    4747/**
    4848 * GCM Fixer Identifiers.
    4949 * @remarks Part of saved state!
     50 * @{
    5051 */
    51 typedef enum GCMFIXERID
    52 {
    53     /** None. */
    54     GCMFIXER_NONE       = 0,
    55     /** DOS division by zero, the worst. Includes Windows 3.x. */
    56     GCMFIXER_DBZ_DOS    = RT_BIT(0),
    57     /** OS/2 (any version) division by zero. */
    58     GCMFIXER_DBZ_OS2    = RT_BIT(1),
    59     /** Windows 9x division by zero. */
    60     GCMFIXER_DBZ_WIN9X  = RT_BIT(2),
    61     /** 32-bit hack. */
    62     GCMFIXER_32BIT_HACK = 0x7fffffff
    63 } GCMFIXERID;
    64 AssertCompileSize(GCMFIXERID, sizeof(uint32_t));
     52/** DOS division by zero, the worst. Includes Windows 3.x. */
     53#define GCMFIXER_DBZ_DOS            RT_BIT_32(0)
     54/** OS/2 (any version) division by zero. */
     55#define GCMFIXER_DBZ_OS2            RT_BIT_32(1)
     56/** Windows 9x division by zero. */
     57#define GCMFIXER_DBZ_WIN9X          RT_BIT_32(2)
     58/** @} */
    6559
    6660/**
     
    7165    /** The provider that is active for this VM. */
    7266    uint32_t                        fFixerSet;
    73 
    7467} GCM;
    7568/** Pointer to GCM VM instance data. */
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