VirtualBox

Changeset 57274 in vbox


Ignore:
Timestamp:
Aug 11, 2015 1:46:14 PM (9 years ago)
Author:
vboxsync
Message:

iprt/r0drv/darwin: The remaining (hopefully) places where we might possibly need to preserve EFLAGS.AC.

Location:
trunk/src/VBox/Runtime/r0drv/darwin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp

    r56699 r57274  
    216216    if (!pThis)
    217217        return VERR_NO_MEMORY;
     218    IPRT_DARWIN_SAVE_EFL_AC();
    218219
    219220    errno_t rc;
     
    257258            default:
    258259                AssertMsgFailed(("RTFileOpen received an invalid RW value, fOpen=%#x\n", fOpen));
     260                IPRT_DARWIN_RESTORE_EFL_AC();
    259261                return VERR_INVALID_PARAMETER;
    260262        }
     
    265267        {
    266268            *phFile = pThis;
     269            IPRT_DARWIN_RESTORE_EFL_AC();
    267270            return VINF_SUCCESS;
    268271        }
     
    274277    RTMemFree(pThis);
    275278
     279    IPRT_DARWIN_RESTORE_EFL_AC();
    276280    return rc;
    277281}
     
    288292    pThis->u32Magic = ~RTFILE_MAGIC;
    289293
     294    IPRT_DARWIN_SAVE_EFL_AC();
    290295    errno_t rc = vnode_close(pThis->hVnode, pThis->fOpenMode & (FREAD | FWRITE), pThis->hVfsCtx);
     296    IPRT_DARWIN_RESTORE_EFL_AC();
    291297
    292298    RTMemFree(pThis);
     
    303309    off_t offNative = (off_t)off;
    304310    AssertReturn((RTFOFF)offNative == off, VERR_OUT_OF_RANGE);
     311    IPRT_DARWIN_SAVE_EFL_AC();
    305312
    306313#if 0 /* Added in 10.6, grr. */
     
    316323        *pcbRead = cbToRead - cbLeft;
    317324    }
     325    IPRT_DARWIN_RESTORE_EFL_AC();
    318326    return !rc ? VINF_SUCCESS : RTErrConvertFromErrno(rc);
    319327
     
    321329    uio_t hUio = uio_create(1, offNative, UIO_SYSSPACE, UIO_READ);
    322330    if (!hUio)
     331    {
     332        IPRT_DARWIN_RESTORE_EFL_AC();
    323333        return VERR_NO_MEMORY;
     334    }
    324335    errno_t rc;
    325336    if (uio_addiov(hUio, (user_addr_t)(uintptr_t)pvBuf, cbToRead) == 0)
     
    334345        rc = VERR_INTERNAL_ERROR_3;
    335346    uio_free(hUio);
     347    IPRT_DARWIN_RESTORE_EFL_AC();
    336348    return rc;
    337349
  • trunk/src/VBox/Runtime/r0drv/darwin/initterm-r0drv-darwin.cpp

    r56290 r57274  
    5252DECLHIDDEN(int) rtR0InitNative(void)
    5353{
     54    IPRT_DARWIN_SAVE_EFL_AC();
     55
    5456    /*
    5557     * Create the lock group.
     
    8688        rtR0TermNative();
    8789
     90    IPRT_DARWIN_RESTORE_EFL_AC();
    8891    return rc;
    8992}
     
    9295DECLHIDDEN(void) rtR0TermNative(void)
    9396{
     97    IPRT_DARWIN_SAVE_EFL_AC();
     98
    9499    /*
    95100     * Preemption hacks before the lock group.
     
    105110        g_pDarwinLockGroup = NULL;
    106111    }
     112
     113    IPRT_DARWIN_RESTORE_EFL_AC();
    107114}
    108115
  • trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp

    r57074 r57274  
    10541054DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt)
    10551055{
     1056    IPRT_DARWIN_SAVE_EFL_AC();
     1057
    10561058    /* Get the map for the object. */
    10571059    vm_map_t pVmMap = rtR0MemObjDarwinGetMap(pMem);
    10581060    if (!pVmMap)
     1061    {
     1062        IPRT_DARWIN_RESTORE_EFL_AC();
    10591063        return VERR_NOT_SUPPORTED;
    1060 
    1061     IPRT_DARWIN_SAVE_EFL_AC();
     1064    }
    10621065
    10631066    /*
     
    11541157    RTHCPHYS            PhysAddr;
    11551158    PRTR0MEMOBJDARWIN   pMemDarwin = (PRTR0MEMOBJDARWIN)pMem;
     1159    IPRT_DARWIN_SAVE_EFL_AC();
    11561160
    11571161#ifdef USE_VM_MAP_WIRE
     
    11961200        }
    11971201
     1202        IPRT_DARWIN_RESTORE_EFL_AC();
    11981203        AssertReturn(PgNo, NIL_RTHCPHYS);
    11991204        PhysAddr = (RTHCPHYS)PgNo << PAGE_SHIFT;
     
    12191224        addr64_t Addr = pMemDesc->getPhysicalSegment64(iPage * PAGE_SIZE, NULL);
    12201225#endif
     1226        IPRT_DARWIN_RESTORE_EFL_AC();
    12211227        AssertMsgReturn(Addr, ("iPage=%u\n", iPage), NIL_RTHCPHYS);
    12221228        PhysAddr = Addr;
  • trunk/src/VBox/Runtime/r0drv/darwin/mp-r0drv-darwin.cpp

    r57074 r57274  
    4949static int rtMpDarwinInitMaxCpus(void)
    5050{
     51    IPRT_DARWIN_SAVE_EFL_AC();
     52
    5153    int32_t cCpus = -1;
    5254    size_t  oldLen = sizeof(cCpus);
     
    5961
    6062    ASMAtomicWriteS32(&g_cMaxCpus, cCpus);
     63
     64    IPRT_DARWIN_RESTORE_EFL_AC();
    6165    return cCpus;
    6266}
     
    294298    if (g_pfnR0DarwinCpuInterrupt == NULL)
    295299        return VERR_NOT_SUPPORTED;
     300    IPRT_DARWIN_SAVE_EFL_AC(); /* paranoia */
    296301    g_pfnR0DarwinCpuInterrupt(idCpu);
     302    IPRT_DARWIN_RESTORE_EFL_AC();
    297303    return VINF_SUCCESS;
    298304}
  • trunk/src/VBox/Runtime/r0drv/darwin/thread2-r0drv-darwin.cpp

    r56290 r57274  
    173173{
    174174    RT_ASSERT_PREEMPTIBLE();
     175    IPRT_DARWIN_SAVE_EFL_AC();
    175176
    176177    thread_t NativeThread;
     
    180181        *pNativeThread = (RTNATIVETHREAD)NativeThread;
    181182        thread_deallocate(NativeThread);
     183        IPRT_DARWIN_RESTORE_EFL_AC();
    182184        return VINF_SUCCESS;
    183185    }
     186    IPRT_DARWIN_RESTORE_EFL_AC();
    184187    return RTErrConvertFromMachKernReturn(kr);
    185188}
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