VirtualBox

Ignore:
Timestamp:
Aug 11, 2015 2:39:19 PM (9 years ago)
Author:
vboxsync
Message:

iprt/r0drv/linux: Preserve EFLAGS/AC where ever it may possibly be thought to change when calling kernel code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/mp-r0drv-linux.c

    r56290 r57276  
    249249RTDECL(int) RTMpOnAll(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
    250250{
     251    IPRT_LINUX_SAVE_EFL_AC();
    251252    int rc;
    252253    RTMPARGS Args;
     
    301302
    302303    RTThreadPreemptRestore(&PreemptState);
     304    IPRT_LINUX_RESTORE_EFL_AC();
    303305    return VINF_SUCCESS;
    304306}
     
    308310RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
    309311{
     312    IPRT_LINUX_SAVE_EFL_AC();
    310313    int rc;
    311314    RTMPARGS Args;
     
    327330
    328331    Assert(rc == 0); NOREF(rc);
     332    IPRT_LINUX_RESTORE_EFL_AC();
    329333    return VINF_SUCCESS;
    330334}
     
    356360RTDECL(int) RTMpOnPair(RTCPUID idCpu1, RTCPUID idCpu2, uint32_t fFlags, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
    357361{
     362    IPRT_LINUX_SAVE_EFL_AC();
    358363    int rc;
    359364    RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
     
    443448        rc = VERR_CPU_NOT_FOUND;
    444449    RTThreadPreemptRestore(&PreemptState);;
     450    IPRT_LINUX_RESTORE_EFL_AC();
    445451    return rc;
    446452}
     
    478484RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
    479485{
     486    IPRT_LINUX_SAVE_EFL_AC();
    480487    int rc;
    481488    RTMPARGS Args;
     
    517524
    518525    NOREF(rc);
     526    IPRT_LINUX_RESTORE_EFL_AC();
    519527    return rc;
    520528}
     
    539547#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
    540548    int rc;
     549    IPRT_LINUX_SAVE_EFL_AC();
    541550
    542551    if (!RTMpIsCpuPossible(idCpu))
     
    554563    NOREF(rc);
    555564    Assert(rc == 0);
     565    IPRT_LINUX_RESTORE_EFL_AC();
    556566    return VINF_SUCCESS;
    557567
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