Changeset 72493 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Jun 10, 2018 4:08:44 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 122978
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInternal.h
r72488 r72493 57 57 * Includes the VEX decoding. */ 58 58 #define IEM_WITH_VEX 59 60 61 /** @def IEM_VERIFICATION_MODE_FULL62 * Shorthand for:63 * defined(IEM_VERIFICATION_MODE) && !defined(IEM_VERIFICATION_MODE_MINIMAL)64 */65 #if (defined(IEM_VERIFICATION_MODE) && !defined(IEM_VERIFICATION_MODE_MINIMAL) && !defined(IEM_VERIFICATION_MODE_FULL)) \66 || defined(DOXYGEN_RUNNING)67 # define IEM_VERIFICATION_MODE_FULL68 #endif69 70 59 71 60 /** @def IEM_CFG_TARGET_CPU … … 191 180 /** Pointer to a const FPU result consisting of two output values and FSW. */ 192 181 typedef IEMFPURESULTTWO const *PCIEMFPURESULTTWO; 193 194 195 196 #ifdef IEM_VERIFICATION_MODE_FULL197 198 /**199 * Verification event type.200 */201 typedef enum IEMVERIFYEVENT202 {203 IEMVERIFYEVENT_INVALID = 0,204 IEMVERIFYEVENT_IOPORT_READ,205 IEMVERIFYEVENT_IOPORT_WRITE,206 IEMVERIFYEVENT_IOPORT_STR_READ,207 IEMVERIFYEVENT_IOPORT_STR_WRITE,208 IEMVERIFYEVENT_RAM_WRITE,209 IEMVERIFYEVENT_RAM_READ210 } IEMVERIFYEVENT;211 212 /** Checks if the event type is a RAM read or write. */213 # define IEMVERIFYEVENT_IS_RAM(a_enmType) ((a_enmType) == IEMVERIFYEVENT_RAM_WRITE || (a_enmType) == IEMVERIFYEVENT_RAM_READ)214 215 /**216 * Verification event record.217 */218 typedef struct IEMVERIFYEVTREC219 {220 /** Pointer to the next record in the list. */221 struct IEMVERIFYEVTREC *pNext;222 /** The event type. */223 IEMVERIFYEVENT enmEvent;224 /** The event data. */225 union226 {227 /** IEMVERIFYEVENT_IOPORT_READ */228 struct229 {230 RTIOPORT Port;231 uint8_t cbValue;232 } IOPortRead;233 234 /** IEMVERIFYEVENT_IOPORT_WRITE */235 struct236 {237 RTIOPORT Port;238 uint8_t cbValue;239 uint32_t u32Value;240 } IOPortWrite;241 242 /** IEMVERIFYEVENT_IOPORT_STR_READ */243 struct244 {245 RTIOPORT Port;246 uint8_t cbValue;247 RTGCUINTREG cTransfers;248 } IOPortStrRead;249 250 /** IEMVERIFYEVENT_IOPORT_STR_WRITE */251 struct252 {253 RTIOPORT Port;254 uint8_t cbValue;255 RTGCUINTREG cTransfers;256 } IOPortStrWrite;257 258 /** IEMVERIFYEVENT_RAM_READ */259 struct260 {261 RTGCPHYS GCPhys;262 uint32_t cb;263 } RamRead;264 265 /** IEMVERIFYEVENT_RAM_WRITE */266 struct267 {268 RTGCPHYS GCPhys;269 uint32_t cb;270 uint8_t ab[512];271 } RamWrite;272 } u;273 } IEMVERIFYEVTREC;274 /** Pointer to an IEM event verification records. */275 typedef IEMVERIFYEVTREC *PIEMVERIFYEVTREC;276 277 #endif /* IEM_VERIFICATION_MODE_FULL */278 182 279 183 … … 674 578 uint32_t cLongJumps; 675 579 uint32_t uAlignment6; /**< Alignment padding. */ 676 #ifdef IEM_VERIFICATION_MODE_FULL677 /** The Number of I/O port reads that has been performed. */678 uint32_t cIOReads;679 /** The Number of I/O port writes that has been performed. */680 uint32_t cIOWrites;681 /** Set if no comparison to REM is currently performed.682 * This is used to skip past really slow bits. */683 bool fNoRem;684 /** Saved fNoRem flag used by #iemInitExec and #iemUninitExec. */685 bool fNoRemSavedByExec;686 /** Indicates that RAX and RDX differences should be ignored since RDTSC687 * and RDTSCP are timing sensitive. */688 bool fIgnoreRaxRdx;689 /** Indicates that a MOVS instruction with overlapping source and destination690 * was executed, causing the memory write records to be incorrrect. */691 bool fOverlappingMovs;692 /** Set if there are problematic memory accesses (MMIO, write monitored, ++). */693 bool fProblematicMemory;694 /** This is used to communicate a CPL changed caused by IEMInjectTrap that695 * CPUM doesn't yet reflect. */696 uint8_t uInjectCpl;697 /** To prevent EMR3HmSingleInstruction from triggering endless recursion via698 * emR3ExecuteInstruction and iemExecVerificationModeCheck. */699 uint8_t cVerifyDepth;700 bool afAlignment7[2];701 /** Mask of undefined eflags.702 * The verifier will any difference in these flags. */703 uint32_t fUndefinedEFlags;704 /** The CS of the instruction being interpreted. */705 RTSEL uOldCs;706 /** The RIP of the instruction being interpreted. */707 uint64_t uOldRip;708 /** The physical address corresponding to abOpcodes[0]. */709 RTGCPHYS GCPhysOpcodes;710 #endif711 580 /** @} */ 712 581 … … 754 623 /** Pointer to instruction statistics for ring-3 context. */ 755 624 R3PTRTYPE(PIEMINSTRSTATS) pStatsR3; 756 757 #ifdef IEM_VERIFICATION_MODE_FULL758 /** The event verification records for what IEM did (LIFO). */759 R3PTRTYPE(PIEMVERIFYEVTREC) pIemEvtRecHead;760 /** Insertion point for pIemEvtRecHead. */761 R3PTRTYPE(PIEMVERIFYEVTREC *) ppIemEvtRecNext;762 /** The event verification records for what the other party did (FIFO). */763 R3PTRTYPE(PIEMVERIFYEVTREC) pOtherEvtRecHead;764 /** Insertion point for pOtherEvtRecHead. */765 R3PTRTYPE(PIEMVERIFYEVTREC *) ppOtherEvtRecNext;766 /** List of free event records. */767 R3PTRTYPE(PIEMVERIFYEVTREC) pFreeEvtRec;768 #endif769 625 } IEMCPU; 770 626 AssertCompileMemberOffset(IEMCPU, fCurXcpt, 0x48); … … 782 638 * @param a_pVCpu The cross context virtual CPU structure of the calling thread. 783 639 */ 784 #if !defined(IEM_VERIFICATION_MODE_FULL) && !defined(IEM_VERIFICATION_MODE) \ 785 && !defined(IEM_VERIFICATION_MODE_MINIMAL) && defined(VMCPU_INCL_CPUM_GST_CTX) 786 # define IEM_GET_CTX(a_pVCpu) (&(a_pVCpu)->cpum.GstCtx) 787 #else 788 # define IEM_GET_CTX(a_pVCpu) ((a_pVCpu)->iem.s.CTX_SUFF(pCtx)) 789 #endif 640 #define IEM_GET_CTX(a_pVCpu) (&(a_pVCpu)->cpum.GstCtx) 790 641 791 642 /** @def IEM_CTX_ASSERT … … 1074 925 } IEMACCESSCRX; 1075 926 1076 /**1077 * Tests if verification mode is enabled.1078 *1079 * This expands to @c false when IEM_VERIFICATION_MODE is not defined and1080 * should therefore cause the compiler to eliminate the verification branch1081 * of an if statement. */1082 #ifdef IEM_VERIFICATION_MODE_FULL1083 # define IEM_VERIFICATION_ENABLED(a_pVCpu) (!(a_pVCpu)->iem.s.fNoRem)1084 #elif defined(IEM_VERIFICATION_MODE_MINIMAL)1085 # define IEM_VERIFICATION_ENABLED(a_pVCpu) (true)1086 #else1087 # define IEM_VERIFICATION_ENABLED(a_pVCpu) (false)1088 #endif1089 1090 /**1091 * Tests if full verification mode is enabled.1092 *1093 * This expands to @c false when IEM_VERIFICATION_MODE_FULL is not defined and1094 * should therefore cause the compiler to eliminate the verification branch1095 * of an if statement. */1096 #ifdef IEM_VERIFICATION_MODE_FULL1097 # define IEM_FULL_VERIFICATION_ENABLED(a_pVCpu) (!(a_pVCpu)->iem.s.fNoRem)1098 #else1099 # define IEM_FULL_VERIFICATION_ENABLED(a_pVCpu) (false)1100 #endif1101 1102 /**1103 * Tests if full verification mode is enabled again REM.1104 *1105 * This expands to @c false when IEM_VERIFICATION_MODE_FULL is not defined and1106 * should therefore cause the compiler to eliminate the verification branch1107 * of an if statement. */1108 #ifdef IEM_VERIFICATION_MODE_FULL1109 # ifdef IEM_VERIFICATION_MODE_FULL_HM1110 # define IEM_FULL_VERIFICATION_REM_ENABLED(a_pVCpu) (!(a_pVCpu)->iem.s.fNoRem && !HMIsEnabled((a_pVCpu)->CTX_SUFF(pVM)))1111 # else1112 # define IEM_FULL_VERIFICATION_REM_ENABLED(a_pVCpu) (!(a_pVCpu)->iem.s.fNoRem)1113 # endif1114 #else1115 # define IEM_FULL_VERIFICATION_REM_ENABLED(a_pVCpu) (false)1116 #endif1117 1118 /** @def IEM_VERIFICATION_MODE1119 * Indicates that one of the verfication modes are enabled.1120 */1121 #if (defined(IEM_VERIFICATION_MODE_FULL) || defined(IEM_VERIFICATION_MODE_MINIMAL)) && !defined(IEM_VERIFICATION_MODE) \1122 || defined(DOXYGEN_RUNNING)1123 # define IEM_VERIFICATION_MODE1124 #endif1125 927 1126 928 /** … … 1130 932 * 1131 933 * This is a NOOP if the verifier isn't compiled in. 1132 */ 1133 #ifdef IEM_VERIFICATION_MODE_FULL 1134 # define IEMOP_VERIFICATION_UNDEFINED_EFLAGS(a_fEfl) do { pVCpu->iem.s.fUndefinedEFlags |= (a_fEfl); } while (0) 1135 #else 1136 # define IEMOP_VERIFICATION_UNDEFINED_EFLAGS(a_fEfl) do { } while (0) 1137 #endif 934 * 935 * @note We're temporarily keeping this until code is converted to new 936 * disassembler style opcode handling. 937 */ 938 #define IEMOP_VERIFICATION_UNDEFINED_EFLAGS(a_fEfl) do { } while (0) 1138 939 1139 940 -
trunk/src/VBox/VMM/include/PDMInternal.h
r69474 r72493 57 57 /** @def PDMCRITSECT_STRICT 58 58 * Enables/disables PDM critsect strictness like deadlock detection. */ 59 #if (defined(RT_LOCK_STRICT) && defined(IN_RING3) && !defined( IEM_VERIFICATION_MODE) && !defined(PDMCRITSECT_STRICT)) \59 #if (defined(RT_LOCK_STRICT) && defined(IN_RING3) && !defined(PDMCRITSECT_STRICT)) \ 60 60 || defined(DOXYGEN_RUNNING) 61 61 # define PDMCRITSECT_STRICT … … 65 65 * Enables/disables PDM read/write critsect strictness like deadlock 66 66 * detection. */ 67 #if (defined(RT_LOCK_STRICT) && defined(IN_RING3) && !defined( IEM_VERIFICATION_MODE) && !defined(PDMCRITSECTRW_STRICT)) \67 #if (defined(RT_LOCK_STRICT) && defined(IN_RING3) && !defined(PDMCRITSECTRW_STRICT)) \ 68 68 || defined(DOXYGEN_RUNNING) 69 69 # define PDMCRITSECTRW_STRICT
Note:
See TracChangeset
for help on using the changeset viewer.