VirtualBox

Changeset 60771 in vbox


Ignore:
Timestamp:
Apr 29, 2016 8:49:59 PM (9 years ago)
Author:
vboxsync
Message:

RTMpPoke/nt: Removed all the HalSendSoftwareInterrupt code, don't want to spend time trying to figure out why it doesn't work. Just use HalRequestIpi, then no 32/64 differences either.

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  
    6161/** HalRequestIpi, version valid up to windows vista?? */
    6262PFNHALREQUESTIPI_PRE_W7             g_pfnrtHalRequestIpiPreW7;
    63 /** HalSendSoftwareInterrupt, introduced in AMD64 version of W2K3. */
    64 PFNHALSENDSOFTWAREINTERRUPT         g_pfnrtNtHalSendSoftwareInterrupt;
    6563/** Worker for RTMpPokeCpu. */
    6664PFNRTSENDIPI                        g_pfnrtMpPokeCpuWorker;
     
    227225    g_pfnrtHalRequestIpiW7Plus = NULL;
    228226    g_pfnrtHalRequestIpiPreW7 = NULL;
    229     g_pfnrtNtHalSendSoftwareInterrupt = NULL;
    230227    g_pfnrtKeIpiGenericCall = NULL;
    231228    g_pfnrtKeInitializeAffinityEx = NULL;
     
    248245    g_pfnrtHalRequestIpiW7Plus = (PFNHALREQUESTIPI_W7PLUS)MmGetSystemRoutineAddress(&RoutineName);
    249246    g_pfnrtHalRequestIpiPreW7 = (PFNHALREQUESTIPI_PRE_W7)g_pfnrtHalRequestIpiW7Plus;
    250 
    251     RtlInitUnicodeString(&RoutineName, L"HalSendSoftwareInterrupt");
    252     g_pfnrtNtHalSendSoftwareInterrupt = (PFNHALSENDSOFTWAREINTERRUPT)MmGetSystemRoutineAddress(&RoutineName);
    253247
    254248    RtlInitUnicodeString(&RoutineName, L"KeIpiGenericCall");
     
    412406     *
    413407     * 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.
    419420     */
    420421    if (   OsVerInfo.uMajorVer > 6
     
    426427    g_pfnrtMpPokeCpuWorker = rtMpPokeCpuUsingDpc;
    427428#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)
    440433    {
    441434        DbgPrint("IPRT: RTMpPoke => rtMpPokeCpuUsingHalReqestIpiW7Plus\n");
  • trunk/src/VBox/Runtime/r0drv/nt/internal-r0drv-nt.h

    r60267 r60771  
    7979int __stdcall rtMpPokeCpuUsingDpc(RTCPUID idCpu);
    8080int __stdcall rtMpPokeCpuUsingBroadcastIpi(RTCPUID idCpu);
    81 int __stdcall rtMpPokeCpuUsingHalSendSoftwareInterrupt(RTCPUID idCpu);
    8281int __stdcall rtMpPokeCpuUsingHalReqestIpiW7Plus(RTCPUID idCpu);
    8382int __stdcall rtMpPokeCpuUsingHalReqestIpiPreW7(RTCPUID idCpu);
  • trunk/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp

    r60704 r60771  
    738738#ifndef IPRT_TARGET_NT4
    739739            if (   !pArgs->fExecuting
    740                 && (   g_pfnrtMpPokeCpuWorker == rtMpPokeCpuUsingHalSendSoftwareInterrupt
    741                     || g_pfnrtMpPokeCpuWorker == rtMpPokeCpuUsingHalReqestIpiW7Plus
     740                && (   g_pfnrtMpPokeCpuWorker == rtMpPokeCpuUsingHalReqestIpiW7Plus
    742741                    || g_pfnrtMpPokeCpuWorker == rtMpPokeCpuUsingHalReqestIpiPreW7))
    743742                RTMpPokeCpu(idCpu);
     
    820819
    821820/**
    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_SUCCESS
    827  * @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 /**
    837821 * RTMpPokeCpu worker that uses the Windows 7 and later version of
    838822 * HalRequestIpip to get the job done.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette