- Timestamp:
- Feb 12, 2007 1:46:39 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMM.cpp
r463 r847 2776 2776 2777 2777 /* 2778 * Interrupt masking. 2779 */ 2780 RTPrintf("VMM: interrupt masking...\n"); RTStrmFlush(g_pStdOut); RTThreadSleep(250); 2781 for (i = 0; i < 10000; i++) 2782 { 2783 uint64_t StartTick = ASMReadTSC(); 2784 rc = vmmR3DoGCTest(pVM, VMMGC_DO_TESTCASE_INTERRUPT_MASKING, 0); 2785 if (rc != VINF_SUCCESS) 2786 { 2787 RTPrintf("VMM: Interrupt masking failed: rc=%Vrc\n", rc); 2788 return rc; 2789 } 2790 uint64_t Ticks = ASMReadTSC() - StartTick; 2791 if (Ticks < (g_pSUPGlobalInfoPage->u64CpuHz / 10000)) 2792 RTPrintf("Warning: Ticks=%RU64 (< %RU64)\n", Ticks, g_pSUPGlobalInfoPage->u64CpuHz / 10000); 2793 } 2794 2795 /* 2778 2796 * Interrupt forwarding. 2779 2797 */ -
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 */ -
trunk/src/VBox/VMM/VMMInternal.h
r271 r847 358 358 /** Switching testing and profiling stub. */ 359 359 VMMGC_DO_TESTCASE_NOP, 360 /** Testcase for checking interrupt masking.. */ 361 VMMGC_DO_TESTCASE_INTERRUPT_MASKING, 360 362 361 363 /** The usual 32-bit hack. */
Note:
See TracChangeset
for help on using the changeset viewer.