Changeset 60771 in vbox
- Timestamp:
- Apr 29, 2016 8:49:59 PM (9 years ago)
- Location:
- trunk/src/VBox/Runtime/r0drv/nt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp
r60769 r60771 61 61 /** HalRequestIpi, version valid up to windows vista?? */ 62 62 PFNHALREQUESTIPI_PRE_W7 g_pfnrtHalRequestIpiPreW7; 63 /** HalSendSoftwareInterrupt, introduced in AMD64 version of W2K3. */64 PFNHALSENDSOFTWAREINTERRUPT g_pfnrtNtHalSendSoftwareInterrupt;65 63 /** Worker for RTMpPokeCpu. */ 66 64 PFNRTSENDIPI g_pfnrtMpPokeCpuWorker; … … 227 225 g_pfnrtHalRequestIpiW7Plus = NULL; 228 226 g_pfnrtHalRequestIpiPreW7 = NULL; 229 g_pfnrtNtHalSendSoftwareInterrupt = NULL;230 227 g_pfnrtKeIpiGenericCall = NULL; 231 228 g_pfnrtKeInitializeAffinityEx = NULL; … … 248 245 g_pfnrtHalRequestIpiW7Plus = (PFNHALREQUESTIPI_W7PLUS)MmGetSystemRoutineAddress(&RoutineName); 249 246 g_pfnrtHalRequestIpiPreW7 = (PFNHALREQUESTIPI_PRE_W7)g_pfnrtHalRequestIpiW7Plus; 250 251 RtlInitUnicodeString(&RoutineName, L"HalSendSoftwareInterrupt");252 g_pfnrtNtHalSendSoftwareInterrupt = (PFNHALSENDSOFTWAREINTERRUPT)MmGetSystemRoutineAddress(&RoutineName);253 247 254 248 RtlInitUnicodeString(&RoutineName, L"KeIpiGenericCall"); … … 412 406 * 413 407 * On Vista and later the DPC method doesn't seem to reliably send IPIs, 414 * so we have to use alternative methods. The NtHalSendSoftwareInterrupt 415 * is preferrable, but it's AMD64 only. The NalRequestIpip method changed 416 * in Windows 7 with the lots-of-processors-support, but it's the only 417 * targeted IPI game in town if we cannot use KeInsertQueueDpc. Worst case 418 * we use broadcast IPIs. 408 * so we have to use alternative methods. 409 * 410 * On AMD64 We used to use the HalSendSoftwareInterrupt API (also x86 on 411 * W10+), it looks faster and more convenient to use, however we're either 412 * using it wrong or it doesn't reliably do what we want (see @bugref{8343}). 413 * 414 * The HalRequestIpip API is thus far the only alternative to KeInsertQueueDpc 415 * for doing targetted IPIs. Trouble with this API is that it changed 416 * fundamentally in Window 7 when they added support for lots of processors. 417 * 418 * If we really think we cannot use KeInsertQueueDpc, we use the broadcast IPI 419 * API KeIpiGenericCall. 419 420 */ 420 421 if ( OsVerInfo.uMajorVer > 6 … … 426 427 g_pfnrtMpPokeCpuWorker = rtMpPokeCpuUsingDpc; 427 428 #ifndef IPRT_TARGET_NT4 428 # if 0 /* Currently disabled as we're checking whether it's responsible for @bugref{8343} (smp windows performance issue). */ 429 if (g_pfnrtNtHalSendSoftwareInterrupt && true /* don't do this, SMP performance regression. */) 430 { 431 DbgPrint("IPRT: RTMpPoke => rtMpPokeCpuUsingHalSendSoftwareInterrupt\n"); 432 g_pfnrtMpPokeCpuWorker = rtMpPokeCpuUsingHalSendSoftwareInterrupt; 433 } 434 else 435 #endif 436 if ( g_pfnrtHalRequestIpiW7Plus 437 && g_pfnrtKeInitializeAffinityEx 438 && g_pfnrtKeAddProcessorAffinityEx 439 && g_pfnrtKeGetProcessorIndexFromNumber) 429 if ( g_pfnrtHalRequestIpiW7Plus 430 && g_pfnrtKeInitializeAffinityEx 431 && g_pfnrtKeAddProcessorAffinityEx 432 && g_pfnrtKeGetProcessorIndexFromNumber) 440 433 { 441 434 DbgPrint("IPRT: RTMpPoke => rtMpPokeCpuUsingHalReqestIpiW7Plus\n"); -
trunk/src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h
r60267 r60771 79 79 int __stdcall rtMpPokeCpuUsingDpc(RTCPUID idCpu); 80 80 int __stdcall rtMpPokeCpuUsingBroadcastIpi(RTCPUID idCpu); 81 int __stdcall rtMpPokeCpuUsingHalSendSoftwareInterrupt(RTCPUID idCpu);82 81 int __stdcall rtMpPokeCpuUsingHalReqestIpiW7Plus(RTCPUID idCpu); 83 82 int __stdcall rtMpPokeCpuUsingHalReqestIpiPreW7(RTCPUID idCpu); -
trunk/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp
r60704 r60771 738 738 #ifndef IPRT_TARGET_NT4 739 739 if ( !pArgs->fExecuting 740 && ( g_pfnrtMpPokeCpuWorker == rtMpPokeCpuUsingHalSendSoftwareInterrupt 741 || g_pfnrtMpPokeCpuWorker == rtMpPokeCpuUsingHalReqestIpiW7Plus 740 && ( g_pfnrtMpPokeCpuWorker == rtMpPokeCpuUsingHalReqestIpiW7Plus 742 741 || g_pfnrtMpPokeCpuWorker == rtMpPokeCpuUsingHalReqestIpiPreW7)) 743 742 RTMpPokeCpu(idCpu); … … 820 819 821 820 /** 822 * RTMpPokeCpu worker that uses HalSendSoftwareInterrupt to get the job done.823 *824 * This is only really available on AMD64, at least at the time of writing.825 *826 * @returns VINF_SUCCESS827 * @param idCpu The CPU identifier.828 */829 int rtMpPokeCpuUsingHalSendSoftwareInterrupt(RTCPUID idCpu)830 {831 g_pfnrtNtHalSendSoftwareInterrupt(idCpu, DISPATCH_LEVEL);832 return VINF_SUCCESS;833 }834 835 836 /**837 821 * RTMpPokeCpu worker that uses the Windows 7 and later version of 838 822 * HalRequestIpip to get the job done.
Note:
See TracChangeset
for help on using the changeset viewer.