- Timestamp:
- Jul 17, 2008 12:06:56 PM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r10680 r10720 524 524 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr) 525 525 { 526 #if 0 /* temp hack. */527 526 /* 528 527 * The following operations don't belong here. … … 533 532 ("%#x\n", uOperation), 534 533 VERR_INTERNAL_ERROR); 535 #else536 if ( ( uOperation == SUP_VMMR0_DO_RAW_RUN537 || uOperation == SUP_VMMR0_DO_HWACC_RUN538 || uOperation == SUP_VMMR0_DO_NOP)539 && !pReqHdr540 && !u64Arg)541 return (int) SUPCallVMMR0Fast(pVMR0, uOperation);542 #endif543 534 544 535 /* fake */ … … 598 589 599 590 #else 600 if (RT_LIKELY(uOperation == SUP_VMMR0_DO_RAW_RUN)) 601 { 602 Assert(!pvArg); 603 return suplibOsIOCtlFast(SUP_IOCTL_FAST_DO_RAW_RUN); 604 } 605 if (RT_LIKELY(uOperation == SUP_VMMR0_DO_HWACC_RUN)) 606 { 607 Assert(!pvArg); 608 return suplibOsIOCtlFast(SUP_IOCTL_FAST_DO_HWACC_RUN); 609 } 610 if (RT_LIKELY(uOperation == SUP_VMMR0_DO_NOP)) 611 { 612 Assert(!pvArg); 613 return suplibOsIOCtlFast(SUP_IOCTL_FAST_DO_NOP); 614 } 591 /* 592 * The following operations don't belong here. 593 */ 594 AssertMsgReturn( uOperation != SUP_VMMR0_DO_RAW_RUN 595 && uOperation != SUP_VMMR0_DO_HWACC_RUN 596 && uOperation != SUP_VMMR0_DO_NOP, 597 ("%#x\n", uOperation), 598 VERR_INTERNAL_ERROR); 615 599 return SUPCallVMMR0Ex(pVMR0, uOperation, (uintptr_t)pvArg, NULL); 616 600 #endif -
trunk/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp
r10256 r10720 171 171 { 172 172 int32_t rcRet = VERR_INTERNAL_ERROR; 173 ULONG cbRet = sizeof(rcRet);174 173 int rc = DosDevIOCtl(g_hDevice, SUP_CTL_CATEGORY_FAST, uFunction, 175 174 NULL, 0, NULL, 176 &rcRet, sizeof(rcRet), &cbRet);175 NULL, 0, NULL); 177 176 if (RT_LIKELY(rc == NO_ERROR)) 178 177 rc = rcRet; -
trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
r10662 r10720 296 296 int rc; 297 297 298 /* We're here with METHOD_NEITHER, which means no parameter validation has been performed. Do not use input 299 * or write to output parameters! 300 */ 301 298 302 /* Raise the IRQL to DISPATCH_LEVEl to prevent Windows from rescheduling us to another CPU/core. */ 299 303 Assert(KeGetCurrentIrql() <= DISPATCH_LEVEL); … … 304 308 /* Complete the I/O request. */ 305 309 NTSTATUS rcNt = pIrp->IoStatus.Status = STATUS_SUCCESS; 306 pIrp->IoStatus.Information = sizeof(rc);307 __try308 {309 *(int *)pIrp->UserBuffer = rc;310 }311 __except(EXCEPTION_EXECUTE_HANDLER)312 {313 rcNt = pIrp->IoStatus.Status = GetExceptionCode();314 dprintf(("VBoxSupDrvDeviceContorl: Exception Code %#x\n", rcNt));315 }316 310 IoCompleteRequest(pIrp, IO_NO_INCREMENT); 317 311 return rcNt; -
trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp
r10256 r10720 645 645 */ 646 646 int rc = VERR_INTERNAL_ERROR; 647 DWORD cbReturned = (ULONG)sizeof(rc); 648 if (DeviceIoControl(g_hDevice, uFunction, NULL, 0, &rc, (DWORD)sizeof(rc), &cbReturned, NULL)) 647 if (DeviceIoControl(g_hDevice, uFunction, NULL, 0, NULL, 0, NULL, NULL)) 649 648 return rc; 650 649 return suplibConvertWin32Err(GetLastError()); -
trunk/src/VBox/VMM/VMM.cpp
r10450 r10720 1949 1949 rc = VERR_GENERAL_FAILURE; 1950 1950 #else 1951 rc = SUPCallVMMR0(pVM->pVMR0, VMMR0_DO_RAW_RUN, NULL); 1951 rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN); 1952 if (RT_LIKELY(rc == VINF_SUCCESS)) 1953 rc = pVM->vmm.s.iLastGCRc; 1952 1954 #endif 1953 1955 } while (rc == VINF_EM_RAW_INTERRUPT_HYPER); … … 1998 2000 #else 1999 2001 rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN); 2002 if (RT_LIKELY(rc == VINF_SUCCESS)) 2003 rc = pVM->vmm.s.iLastGCRc; 2000 2004 #endif 2001 2005 } while (rc == VINF_EM_RAW_INTERRUPT_HYPER); … … 2078 2082 rc = VERR_GENERAL_FAILURE; 2079 2083 #else 2080 rc = SUPCallVMMR0(pVM->pVMR0, VMMR0_DO_RAW_RUN, NULL); 2084 rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN); 2085 if (RT_LIKELY(rc == VINF_SUCCESS)) 2086 rc = pVM->vmm.s.iLastGCRc; 2081 2087 #endif 2082 2088 } while (rc == VINF_EM_RAW_INTERRUPT_HYPER); … … 2132 2138 rc = VERR_GENERAL_FAILURE; 2133 2139 #else 2134 rc = SUPCallVMMR0(pVM->pVMR0, VMMR0_DO_RAW_RUN, NULL); 2140 rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN); 2141 if (RT_LIKELY(rc == VINF_SUCCESS)) 2142 rc = pVM->vmm.s.iLastGCRc; 2135 2143 #endif 2136 2144 } while (rc == VINF_EM_RAW_INTERRUPT_HYPER);
Note:
See TracChangeset
for help on using the changeset viewer.