Changeset 23200 in vbox
- Timestamp:
- Sep 21, 2009 4:13:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/HWACCMAll.cpp
r23198 r23200 104 104 } 105 105 106 #ifdef IN_RING0 107 /** 108 * Dummy RTMpOnSpecific handler since RTMpPokeCpu couldn't be used. 109 * 110 */ 111 static DECLCALLBACK(void) hwaccmFlushHandler(RTCPUID idCpu, void *pvUser1, void *pvUser2) 112 { 113 return; 114 } 115 116 /** 117 * Wrapper for RTMpPokeCpu to deal with VERR_NOT_SUPPORTED 118 * 119 */ 120 void hwaccmMpPokeCpu(RTCPUID idHostCpu) 121 { 122 int rc = RTMpPokeCpu(idHostCpu); 123 # ifdef RT_OS_WINDOWS 124 AssertRC(rc); 125 # else 126 /* Not implemented on some platforms (Darwin, Linux kernel < 2.6.19); fall back to a less efficient implementation (broadcast). */ 127 if (rc == VERR_NOT_SUPPORTED) 128 RTMpOnSpecific(idHostCpu, hwaccmFlushHandler, 0, 0); 129 # endif 130 } 131 #endif 132 106 133 #ifndef IN_RC 107 134 /** … … 133 160 RTCPUID idHostCpu = pVCpu->hwaccm.s.idEnteredCpu; 134 161 if (idHostCpu != NIL_RTCPUID) 135 RTMpPokeCpu(idHostCpu);162 hwaccmMpPokeCpu(idHostCpu); 136 163 #else 137 164 VMR3NotifyCpuFFU(pVCpu->pUVCpu, VMNOTIFYFF_FLAGS_POKE); … … 148 175 149 176 /** 150 * Dummy RTMpOnSpecific handler since RTMpPokeCpu couldn't be used.151 *152 */153 static DECLCALLBACK(void) hwaccmFlushHandler(RTCPUID idCpu, void *pvUser1, void *pvUser2)154 {155 return;156 }157 158 159 /**160 177 * Flush the TLBs of all VCPUs 161 178 * … … 188 205 RTCPUID idHostCpu = pVCpu->hwaccm.s.idEnteredCpu; 189 206 if (idHostCpu != NIL_RTCPUID) 190 { 191 int rc = RTMpPokeCpu(idHostCpu); 192 # ifdef RT_OS_WINDOWS 193 AssertRC(rc); 194 # else 195 /* Not implemented on some platforms (Darwin, Linux kernel < 2.6.19); fall back to a less efficient implementation (broadcast). */ 196 if (rc == VERR_NOT_SUPPORTED) 197 RTMpOnSpecific(idHostCpu, hwaccmFlushHandler, 0, 0); 198 # endif 199 } 207 hwaccmMpPokeCpu(idHostCpu); 200 208 #else 201 209 VMR3NotifyCpuFFU(pVCpu->pUVCpu, VMNOTIFYFF_FLAGS_POKE); … … 269 277 { 270 278 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatTlbShootdownFlush); 271 #ifdef IN_RING0279 # ifdef IN_RING0 272 280 RTCPUID idHostCpu = pVCpu->hwaccm.s.idEnteredCpu; 273 281 if (idHostCpu != NIL_RTCPUID) 274 RTMpPokeCpu(idHostCpu);275 #else282 hwaccmMpPokeCpu(idHostCpu); 283 # else 276 284 VMR3NotifyCpuFFU(pVCpu->pUVCpu, VMNOTIFYFF_FLAGS_POKE); 277 #endif285 # endif 278 286 } 279 287 else
Note:
See TracChangeset
for help on using the changeset viewer.