VirtualBox

Ignore:
Timestamp:
Mar 5, 2018 10:59:17 AM (7 years ago)
Author:
vboxsync
Message:

SUPDrv,VMMR0: Prepped for extending the fast I/O control interface a bit for NEM; SUPDRV version increment. bugref:9044

Location:
trunk/src/VBox/HostDrivers/Support/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r71136 r71198  
    11291129         * the session and iCmd, and does not return anything.
    11301130         */
    1131         if (   uCmd == SUP_IOCTL_FAST_DO_RAW_RUN
    1132             || uCmd == SUP_IOCTL_FAST_DO_HM_RUN
    1133             || uCmd == SUP_IOCTL_FAST_DO_NOP)
    1134         {
    1135             int rc = supdrvIOCtlFast(uCmd, (unsigned)(uintptr_t)pvOutput/* VMCPU id */, pDevExt, pSession);
     1131        if (   (uCmd & 3) == METHOD_NEITHER
     1132            && (uint32_t)((uCmd - SUP_IOCTL_FAST_DO_FIRST) >> 2) < (uint32_t)32)
     1133        {
     1134            int rc = supdrvIOCtlFast((uCmd - SUP_IOCTL_FAST_DO_FIRST) >> 2,
     1135                                     (unsigned)(uintptr_t)pvOutput/* VMCPU id */,
     1136                                     pDevExt, pSession);
    11361137            pIoStatus->Status      = RT_SUCCESS(rc) ? STATUS_SUCCESS : STATUS_INVALID_PARAMETER;
    11371138            pIoStatus->Information = 0; /* Could be used to pass rc if we liked. */
     
    13181319#endif
    13191320
    1320         ULONG ulCmd = pStack->Parameters.DeviceIoControl.IoControlCode;
    1321         if (   ulCmd == SUP_IOCTL_FAST_DO_RAW_RUN
    1322             || ulCmd == SUP_IOCTL_FAST_DO_HM_RUN
    1323             || ulCmd == SUP_IOCTL_FAST_DO_NOP)
    1324         {
    1325             int rc = supdrvIOCtlFast(ulCmd, (unsigned)(uintptr_t)pIrp->UserBuffer /* VMCPU id */, pDevExt, pSession);
     1321        ULONG uCmd = pStack->Parameters.DeviceIoControl.IoControlCode;
     1322        if (   (uCmd & 3) == METHOD_NEITHER
     1323            && (uint32_t)((uCmd - SUP_IOCTL_FAST_DO_FIRST) >> 2) < (uint32_t)32)
     1324        {
     1325            int rc = supdrvIOCtlFast((uCmd - SUP_IOCTL_FAST_DO_FIRST) >> 2,
     1326                                     (unsigned)(uintptr_t)pIrp->UserBuffer /* VMCPU id */,
     1327                                     pDevExt, pSession);
    13261328
    13271329            /* Complete the I/O request. */
  • trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp

    r69500 r71198  
    673673    Assert(cbReq == RT_MAX(pHdr->cbIn, pHdr->cbOut));
    674674# ifdef USE_NT_DEVICE_IO_CONTROL_FILE
    675     IO_STATUS_BLOCK Ios;
    676     Ios.Status = -1;
    677     Ios.Information = 0;
     675    IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
    678676    NTSTATUS rcNt = NtDeviceIoControlFile((HANDLE)pThis->hDevice, NULL /*hEvent*/, NULL /*pfnApc*/, NULL /*pvApcCtx*/, &Ios,
    679677                                          (ULONG)uFunction,
     
    703701     */
    704702# ifdef USE_NT_DEVICE_IO_CONTROL_FILE
    705     IO_STATUS_BLOCK Ios;
    706     Ios.Status = -1;
    707     Ios.Information = 0;
     703    IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
    708704    NTSTATUS rcNt = NtDeviceIoControlFile((HANDLE)pThis->hDevice, NULL /*hEvent*/, NULL /*pfnApc*/, NULL /*pvApcCtx*/, &Ios,
    709705                                          (ULONG)uFunction,
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