Changeset 847 in vbox for trunk/src/VBox/VMM/VMMGC/VMMGC.cpp
- Timestamp:
- Feb 12, 2007 1:46:39 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMGC/VMMGC.cpp
r421 r847 28 28 #include "VMMInternal.h" 29 29 #include <VBox/vm.h> 30 #include <VBox/sup.h> 30 31 #include <VBox/err.h> 31 32 #include <VBox/log.h> … … 94 95 95 96 /* 97 * Delay for ~100us. 98 */ 99 case VMMGC_DO_TESTCASE_INTERRUPT_MASKING: 100 { 101 uint64_t u64MaxTicks = (g_pSUPGlobalInfoPage ? g_pSUPGlobalInfoPage->u64CpuHz : _2G) / 10000; 102 uint64_t u64StartTSC = ASMReadTSC(); 103 uint64_t u64TicksNow; 104 uint32_t volatile i = 0; 105 106 do 107 { 108 /* waste some time and protect against getting stuck. */ 109 for (uint32_t volatile j = 0; j < 1000; j++, i++) 110 if (i > _2G32) 111 return VERR_GENERAL_FAILURE; 112 113 /* check if we're done.*/ 114 u64TicksNow = ASMReadTSC() - u64StartTSC; 115 } while (u64TicksNow < u64MaxTicks); 116 117 return VINF_SUCCESS; 118 } 119 120 /* 96 121 * Trap testcases and unknown operations. 97 122 */
Note:
See TracChangeset
for help on using the changeset viewer.