VirtualBox

Changeset 13865 in vbox


Ignore:
Timestamp:
Nov 5, 2008 2:14:11 PM (16 years ago)
Author:
vboxsync
Message:

SUP: pass idCpu up on all platforms (save OS/2), handle it in ring-0 on solaris, linux and freebsd.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h

    r13858 r13865  
    251251int     suplibOsTerm(PSUPLIBDATA pThis);
    252252int     suplibOsIOCtl(PSUPLIBDATA pThis, uintptr_t uFunction, void *pvReq, size_t cbReq);
    253 int     suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCPU);
     253int     suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, uintptr_t idCpu);
    254254int     suplibOsPageAlloc(PSUPLIBDATA pThis, size_t cPages, void **ppvPages);
    255255int     suplibOsPageFree(PSUPLIBDATA pThis, void *pvPages, size_t cPages);
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp

    r13858 r13865  
    271271
    272272
    273 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
     273int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, uintptr_t idCpu)
    274274{
    275275    int rc = ioctl(pThis->hDevice, uFunction, NULL);
  • trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c

    r13862 r13865  
    371371        ||  ulCmd == SUP_IOCTL_FAST_DO_HWACC_RUN
    372372        ||  ulCmd == SUP_IOCTL_FAST_DO_NOP)
    373         return supdrvIOCtlFast(uCmd, 0 /* @todo VMCPU id. */, &g_VBoxDrvFreeBSDDevExt, pSession);
     373        return supdrvIOCtlFast(uCmd, *(uint32_t *)pvData, &g_VBoxDrvFreeBSDDevExt, pSession);
    374374
    375375    return VBoxDrvFreeBSDIOCtlSlow(pSession, ulCmd, pvData, pTd);
  • trunk/src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp

    r13858 r13865  
    167167
    168168
    169 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
     169int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, uintptr_t idCpu)
    170170{
    171     int rc = ioctl(pThis->hDevice, uFunction, NULL);
     171    int rc = ioctl(pThis->hDevice, uFunction, idCpu);
    172172    if (rc == -1)
    173173        rc = errno;
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r13861 r13865  
    712712                  || uCmd == SUP_IOCTL_FAST_DO_HWACC_RUN
    713713                  || uCmd == SUP_IOCTL_FAST_DO_NOP))
    714         return supdrvIOCtlFast(uCmd, 0 /* @todo VMCPU id. */, &g_DevExt, (PSUPDRVSESSION)pFilp->private_data);
     714        return supdrvIOCtlFast(uCmd, ulArg, &g_DevExt, (PSUPDRVSESSION)pFilp->private_data);
    715715    return VBoxDrvLinuxIOCtlSlow(pFilp, uCmd, ulArg);
    716716
     
    722722                  || uCmd == SUP_IOCTL_FAST_DO_HWACC_RUN
    723723                  || uCmd == SUP_IOCTL_FAST_DO_NOP))
    724         rc = supdrvIOCtlFast(uCmd, 0 /* @todo VMCPU id. */, &g_DevExt, (PSUPDRVSESSION)pFilp->private_data);
     724        rc = supdrvIOCtlFast(uCmd, ulArg, &g_DevExt, (PSUPDRVSESSION)pFilp->private_data);
    725725    else
    726726        rc = VBoxDrvLinuxIOCtlSlow(pFilp, uCmd, ulArg);
  • trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp

    r13858 r13865  
    202202
    203203
    204 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
    205 {
    206     int rc = ioctl(pThis->hDevice, uFunction, NULL);
     204int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, uintptr_t idCpu)
     205{
     206    int rc = ioctl(pThis->hDevice, uFunction, idCpu);
    207207    if (rc == -1)
    208208        rc = -errno;
  • trunk/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp

    r13858 r13865  
    153153
    154154
    155 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
     155int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, uintptr_t idCpu)
    156156{
     157    NOREF(idCpu);
    157158    int32_t rcRet = VERR_INTERNAL_ERROR;
    158159    int rc = DosDevIOCtl((HFILE)pThis->hDevice, SUP_CTL_CATEGORY_FAST, uFunction,
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c

    r13863 r13865  
    664664        ||  Cmd == SUP_IOCTL_FAST_DO_NOP)
    665665    {
    666         *pVal = supdrvIOCtlFast(Cmd, 0 /* @todo VMCPU id. */, &g_DevExt, pSession);
     666        *pVal = supdrvIOCtlFast(Cmd, pArgs, &g_DevExt, pSession);
    667667        return 0;
    668668    }
  • trunk/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp

    r13858 r13865  
    160160
    161161
    162 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
     162int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, uintptr_t idCpu)
    163163{
    164     int rc = ioctl(pThis->hDevice, uFunction, NULL);
     164    int rc = ioctl(pThis->hDevice, uFunction, idCpu);
    165165    if (rc == -1)
    166166        rc = errno;
  • trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp

    r13858 r13865  
    504504
    505505
    506 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, unsigned idCpu)
     506int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, uintptr_t idCpu)
    507507{
    508508    /*
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