VirtualBox

Changeset 62645 in vbox for trunk/src


Ignore:
Timestamp:
Jul 28, 2016 9:47:09 PM (8 years ago)
Author:
vboxsync
Message:

TRPM: Fixed ancient TRPMCPU structure misalignment caught by MSC warning. Stupid #pragma pack(4).

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/TRPM.cpp

    r62478 r62645  
    895895    }
    896896    SSMR3PutBool(pSSM,      HMIsEnabled(pVM));
    897     PVMCPU pVCpu = &pVM->aCpus[0];  /* raw mode implies 1 VCPU */
     897    PVMCPU pVCpu = &pVM->aCpus[0];          /* raw mode implies 1 VCPU */
    898898    SSMR3PutUInt(pSSM,      VM_WHEN_RAW_MODE(VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_TRPM_SYNC_IDT), 0));
    899899    SSMR3PutMem(pSSM,       &pTrpm->au32IdtPatched[0], sizeof(pTrpm->au32IdtPatched));
    900     SSMR3PutU32(pSSM, ~0);              /* separator. */
     900    SSMR3PutU32(pSSM, UINT32_MAX);          /* separator. */
    901901
    902902    /*
     
    913913    }
    914914
    915     return SSMR3PutU32(pSSM, ~0);       /* terminator */
     915    return SSMR3PutU32(pSSM, UINT32_MAX);   /* terminator */
    916916}
    917917
     
    12261226 * Check if address is a gate handler (interrupt or trap).
    12271227 *
    1228  * @returns gate nr or ~0 is not found
     1228 * @returns gate nr or UINT32_MAX is not found
    12291229 *
    12301230 * @param   pVM         The cross context VM structure.
     
    12501250        }
    12511251    }
    1252     return ~0;
     1252    return UINT32_MAX;
    12531253}
    12541254
  • trunk/src/VBox/VMM/include/TRPMInternal.h

    r62478 r62645  
    177177#endif
    178178} TRPM;
     179#pragma pack()
    179180
    180181/** Pointer to TRPM Data. */
     
    228229    RTGCUINT                uSavedVector; /**< @todo don't use RTGCUINT */
    229230
     231    /** Saved errorcode. */
     232    RTGCUINT                uSavedErrorCode;
     233
     234    /** Saved cr2. */
     235    RTGCUINTPTR             uSavedCR2;
     236
    230237    /** Saved trap type. */
    231238    TRPMEVENT               enmSavedType;
    232 
    233     /** Saved errorcode. */
    234     RTGCUINT                uSavedErrorCode;
    235 
    236     /** Saved cr2. */
    237     RTGCUINTPTR             uSavedCR2;
    238 
    239     /** Previous trap vector # - for debugging. */
    240     RTGCUINT                uPrevVector;
    241239
    242240    /** Instruction length for software interrupts and software exceptions
     
    249247    /** Padding. */
    250248    uint8_t                 au8Padding[2];
     249
     250    /** Previous trap vector # - for debugging. */
     251    RTGCUINT                uPrevVector;
    251252} TRPMCPU;
    252253
    253254/** Pointer to TRPMCPU Data. */
    254255typedef TRPMCPU *PTRPMCPU;
    255 
    256 #pragma pack()
    257256
    258257
  • trunk/src/VBox/VMM/include/TRPMInternal.mac

    r62478 r62645  
    7575    .uActiveCR2         RTGCPTR_RES 1
    7676    .uSavedVector       RTGCPTR_RES 1
    77     .enmSavedType       resd 1
    7877    .uSavedErrorCode    RTGCPTR_RES 1
    7978    .uSavedCR2          RTGCPTR_RES 1
    80     .uPrevVector        RTGCPTR_RES 1
     79    .enmSavedType       resd 1
    8180    .cbInstr            resb 1
    8281    .cbSavedInstr       resb 1
    8382    .au8Padding         resb 2
     83    .uPrevVector        RTGCPTR_RES 1
    8484endstruc
    8585
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