Changeset 26512 in vbox
- Timestamp:
- Feb 14, 2010 9:47:37 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.scm-settings
r26511 r26512 51 51 --filter-out-dirs "*/src/VBox/Additions/solaris/SharedFolders/solaris10/sys/." 52 52 --filter-out-dirs "*/src/VBox/HostServices/SharedOpenGL/." 53 --filter-out-dirs "*/src/VBox/HostDrivers/VBoxNetFlt/solaris/include/." 54 --filter-out-dirs "*/src/VBox/HostDrivers/VBoxUSB/solaris/include/." 53 55 --filter-out-dirs "*/src/VBox/GuestHost/OpenGL/*/." 54 56 --filter-out-dirs "*/src/VBox/Devices/PC/Etherboot-src/*/." … … 71 73 --filter-out-files "*/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxFsDxe/fsw_strfunc.h" 72 74 --filter-out-files "*/src/VBox/Devices/Audio/sys-queue.h" 75 --filter-out-files "*/src/VBox/HostDrivers/VBoxUSB/os2/usbcalls.h" 73 76 74 77 … … 100 103 --filter-out-dirs "*/src/VBox/Devices/PC/PXE/." 101 104 */src/VBox/Additions/solaris/Installer/postinstall.sh: --no-convert-tabs 105 */src/VBox/HostDrivers/Support/solaris/mod.sh: --no-convert-tabs 102 106 103 107 # --no-convert-tabs -
trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp
r22077 r26512 267 267 { 268 268 if (RT_LIKELY(ioctl(pThis->hDevice, uFunction, pvReq) >= 0)) 269 269 return VINF_SUCCESS; 270 270 return RTErrConvertFromErrno(errno); 271 271 } -
trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp
r22632 r26512 182 182 */ 183 183 if (RT_LIKELY(ioctl(pThis->hDevice, uFunction, pvReq) >= 0)) 184 184 return VINF_SUCCESS; 185 185 186 186 /* This is the reverse operation of the one found in SUPDrv-linux.c */ … … 217 217 char *pvPages = (char *)mmap(NULL, cbMmap, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 218 218 if (pvPages == MAP_FAILED) 219 219 return VERR_NO_MEMORY; 220 220 221 221 if (pThis->fSysMadviseWorks) 222 222 { 223 224 225 226 227 228 229 230 231 223 /* 224 * It is not fatal if we fail here but a forked child (e.g. the ALSA sound server) 225 * could crash. Linux < 2.6.16 does not implement madvise(MADV_DONTFORK) but the 226 * kernel seems to split bigger VMAs and that is all that we want -- later we set the 227 * VM_DONTCOPY attribute in supdrvOSLockMemOne(). 228 */ 229 if (madvise (pvPages, cbMmap, MADV_DONTFORK)) 230 LogRel(("SUPLib: madvise %p-%p failed\n", pvPages, cbMmap)); 231 *ppvPages = pvPages; 232 232 } 233 233 else 234 234 { 235 236 237 238 239 240 241 242 235 /* 236 * madvise(MADV_DONTFORK) is not available (most probably Linux 2.4). Enclose any 237 * mmapped region by two unmapped pages to guarantee that there is exactly one VM 238 * area struct of the very same size as the mmap area. 239 */ 240 mprotect(pvPages, PAGE_SIZE, PROT_NONE); 241 mprotect(pvPages + cbMmap - PAGE_SIZE, PAGE_SIZE, PROT_NONE); 242 *ppvPages = pvPages + PAGE_SIZE; 243 243 } 244 244 memset(*ppvPages, 0, cPages << PAGE_SHIFT); -
trunk/src/VBox/HostDrivers/Support/win/VBoxDrv.rc
r22077 r26512 36 36 VS_VERSION_INFO VERSIONINFO 37 37 FILEVERSION VBOX_VERSION_MAJOR_NR,VBOX_VERSION_MINOR_NR,VBOX_VERSION_BUILD_NR,0 38 PRODUCTVERSION 38 PRODUCTVERSION VBOX_VERSION_MAJOR_NR,VBOX_VERSION_MINOR_NR,VBOX_VERSION_BUILD_NR,0 39 39 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 40 40 FILEFLAGS 0x0L … … 49 49 VALUE "CompanyName", VBOX_RC_COMPANY_NAME 50 50 VALUE "FileDescription", "VirtualBox Support Driver\0" 51 VALUE "FileVersion", 51 VALUE "FileVersion", VBOX_VERSION_MAJOR "." VBOX_VERSION_MINOR "." VBOX_VERSION_BUILD ".r" VBOX_SVN_REV "\0" 52 52 VALUE "InternalName", "VBoxDrv.sys\0" 53 53 VALUE "LegalCopyright", VBOX_RC_LEGAL_COPYRIGHT 54 54 VALUE "OriginalFilename", "VBoxDrv.sys\0" 55 VALUE "ProductName", 55 VALUE "ProductName", "Sun VirtualBox\0" 56 56 VALUE "ProductVersion", VBOX_VERSION_MAJOR "." VBOX_VERSION_MINOR "." VBOX_VERSION_BUILD ".r" VBOX_SVN_REV "\0" 57 57 END -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.c
r26163 r26512 2188 2188 if(RT_FAILURE(rc)) 2189 2189 { 2190 2191 2190 Assert(0); 2191 Status = Context.Status != NDIS_STATUS_SUCCESS ? Context.Status : NDIS_STATUS_FAILURE; 2192 2192 break; 2193 2193 } … … 2206 2206 { 2207 2207 Assert(0); 2208 2208 Status = Context.Status != NDIS_STATUS_SUCCESS ? Context.Status : NDIS_STATUS_FAILURE; 2209 2209 /* release netflt */ 2210 2210 vboxNetFltRelease(pInstance, false); … … 3545 3545 for(;;) 3546 3546 { 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3547 if(fActive) 3548 { 3549 if(!pThis->u.s.cModePassThruRefs) 3550 { 3551 break; 3552 } 3553 } 3554 else 3555 { 3556 if(!pThis->u.s.cModeNetFltRefs) 3557 { 3558 break; 3559 } 3560 } 3561 vboxNetFltWinSleep(2); 3562 3562 } 3563 3563 3564 3564 if(!vboxNetFltWinReferenceAdapt(pAdapt)) 3565 3565 return; 3566 3566 #ifndef VBOXNETADP 3567 3567 -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.h
r24217 r26512 484 484 DECLINLINE(void) vboxNetFltWinReferenceModeNetFlt(PVBOXNETFLTINS pIns) 485 485 { 486 486 ASMAtomicIncU32((volatile uint32_t *)&pIns->u.s.cModeNetFltRefs); 487 487 } 488 488 489 489 DECLINLINE(void) vboxNetFltWinReferenceModePassThru(PVBOXNETFLTINS pIns) 490 490 { 491 491 ASMAtomicIncU32((volatile uint32_t *)&pIns->u.s.cModePassThruRefs); 492 492 } 493 493 494 494 DECLINLINE(void) vboxNetFltWinIncReferenceModeNetFlt(PVBOXNETFLTINS pIns, uint32_t v) 495 495 { 496 496 ASMAtomicAddU32((volatile uint32_t *)&pIns->u.s.cModeNetFltRefs, v); 497 497 } 498 498 499 499 DECLINLINE(void) vboxNetFltWinIncReferenceModePassThru(PVBOXNETFLTINS pIns, uint32_t v) 500 500 { 501 501 ASMAtomicAddU32((volatile uint32_t *)&pIns->u.s.cModePassThruRefs, v); 502 502 } 503 503 504 504 DECLINLINE(void) vboxNetFltWinDereferenceModeNetFlt(PVBOXNETFLTINS pIns) 505 505 { 506 506 ASMAtomicDecU32((volatile uint32_t *)&pIns->u.s.cModeNetFltRefs); 507 507 } 508 508 509 509 DECLINLINE(void) vboxNetFltWinDereferenceModePassThru(PVBOXNETFLTINS pIns) 510 510 { 511 511 ASMAtomicDecU32((volatile uint32_t *)&pIns->u.s.cModePassThruRefs); 512 512 } 513 513 514 514 DECLINLINE(void) vboxNetFltWinDecReferenceModeNetFlt(PVBOXNETFLTINS pIns, uint32_t v) 515 515 { 516 517 516 Assert(v); 517 ASMAtomicAddU32((volatile uint32_t *)&pIns->u.s.cModeNetFltRefs, (uint32_t)(-((int32_t)v))); 518 518 } 519 519 520 520 DECLINLINE(void) vboxNetFltWinDecReferenceModePassThru(PVBOXNETFLTINS pIns, uint32_t v) 521 521 { 522 523 522 Assert(v); 523 ASMAtomicAddU32((volatile uint32_t *)&pIns->u.s.cModePassThruRefs, (uint32_t)(-((int32_t)v))); 524 524 } 525 525 … … 593 593 DECLINLINE(void) vboxNetFltWinDecReferenceDevice(PADAPT pAdapt, PADAPT_DEVICE pState, uint32_t v) 594 594 { 595 595 Assert(v); 596 596 ASMAtomicAddU32((uint32_t volatile *)&pState->cReferences, (uint32_t)(-((int32_t)v))); 597 597 } … … 607 607 DECLINLINE(bool) vboxNetFltWinDoIncReferenceDevice(PADAPT pAdapt, PADAPT_DEVICE pState, uint32_t v) 608 608 { 609 609 Assert(v); 610 610 if (vboxNetFltWinGetPowerState(pState) == NdisDeviceStateD0 && vboxNetFltWinGetOpState(pState) == kVBoxNetDevOpState_Initialized) 611 611 { … … 678 678 if(!ASMAtomicUoReadBool(&(pNetFlt)->fActive)) 679 679 { 680 680 vboxNetFltWinReferenceModePassThru(pNetFlt); 681 681 RTSpinlockRelease((pNetFlt)->hSpinlock, &Tmp); 682 682 *pbNetFltActive = false; … … 685 685 686 686 vboxNetFltRetain((pNetFlt), true /* fBusy */); 687 687 vboxNetFltWinReferenceModeNetFlt(pNetFlt); 688 688 RTSpinlockRelease((pNetFlt)->hSpinlock, &Tmp); 689 689 … … 760 760 if(!ASMAtomicUoReadBool(&(pNetFlt)->fActive)) 761 761 { 762 762 vboxNetFltWinIncReferenceModePassThru(pNetFlt, v); 763 763 764 764 RTSpinlockRelease((pNetFlt)->hSpinlock, &Tmp); … … 769 769 vboxNetFltRetain(pNetFlt, true /* fBusy */); 770 770 771 771 vboxNetFltWinIncReferenceModeNetFlt(pNetFlt, v); 772 772 773 773 RTSpinlockRelease(pNetFlt->hSpinlock, &Tmp); … … 794 794 } 795 795 796 796 vboxNetFltWinDecReferenceModeNetFlt(pNetFlt, n); 797 797 } 798 798 … … 801 801 vboxNetFltRelease(pNetFlt, true); 802 802 803 803 vboxNetFltWinDereferenceModeNetFlt(pNetFlt); 804 804 } 805 805 -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFlt-win.rc
r21407 r26512 30 30 VS_VERSION_INFO VERSIONINFO 31 31 FILEVERSION VBOX_VERSION_MAJOR_NR,VBOX_VERSION_MINOR_NR,VBOX_VERSION_BUILD_NR,0 32 PRODUCTVERSION 32 PRODUCTVERSION VBOX_VERSION_MAJOR_NR,VBOX_VERSION_MINOR_NR,VBOX_VERSION_BUILD_NR,0 33 33 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 34 34 FILEFLAGS 0x0L … … 43 43 VALUE "CompanyName", VBOX_RC_COMPANY_NAME 44 44 VALUE "FileDescription", DESCRIPTION_STR 45 VALUE "FileVersion", 45 VALUE "FileVersion", VBOX_VERSION_MAJOR "." VBOX_VERSION_MINOR "." VBOX_VERSION_BUILD ".r" VBOX_SVN_REV "\0" 46 46 VALUE "InternalName", FILENAME_STR 47 47 VALUE "LegalCopyright", VBOX_RC_LEGAL_COPYRIGHT 48 48 VALUE "OriginalFilename", FILENAME_STR 49 VALUE "ProductName", 49 VALUE "ProductName", "Sun VirtualBox\0" 50 50 VALUE "ProductVersion", VBOX_VERSION_MAJOR "." VBOX_VERSION_MINOR "." VBOX_VERSION_BUILD ".r" VBOX_SVN_REV "\0" 51 51 END -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltMp-win.c
r26163 r26512 818 818 if(bNetFltActive) 819 819 { 820 821 820 cNetFltRefs = cNumberOfPackets; 821 cPassThruRefs = 0; 822 822 } 823 823 else 824 824 { 825 826 825 cPassThruRefs = cNumberOfPackets; 826 cNetFltRefs = 0; 827 827 } 828 828 … … 1061 1061 else if(fAdaptActive) 1062 1062 { 1063 1063 pAdapt->fProcessingPacketFilter = VBOXNETFLT_PFP_PASSTHRU; 1064 1064 /* we're cleaning it in RequestComplete */ 1065 1065 } … … 1386 1386 { 1387 1387 /* need to disable cleaning promiscuous here ?? */ 1388 1388 bool fNetFltActive; 1389 1389 const bool fAdaptActive = vboxNetFltWinReferenceAdaptNetFlt(pNetFlt, pAdapt, &fNetFltActive); 1390 1390 -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltPt-win.c
r26163 r26512 582 582 if(Oid == OID_GEN_CURRENT_PACKET_FILTER && VBOXNETFLT_PROMISCUOUS_SUPPORTED(pAdapt)) 583 583 { 584 585 586 587 588 589 590 591 592 584 /* we're here _ONLY_ in the passthru mode */ 585 Assert(pAdapt->fProcessingPacketFilter == VBOXNETFLT_PFP_PASSTHRU); 586 if(pAdapt->fProcessingPacketFilter == VBOXNETFLT_PFP_PASSTHRU) 587 { 588 PVBOXNETFLTINS pNetFltIf = PADAPT_2_PVBOXNETFLTINS(pAdapt); 589 Assert(!pNetFltIf->fActive); 590 vboxNetFltWinDereferenceModePassThru(pNetFltIf); 591 vboxNetFltWinDereferenceAdapt(pAdapt); 592 } 593 593 594 594 if(Status == NDIS_STATUS_SUCCESS) … … 617 617 if(pAdapt->fProcessingPacketFilter == VBOXNETFLT_PFP_NETFLT) 618 618 { 619 619 Assert(pNetFltIf->fActive); 620 620 if(Status == NDIS_STATUS_SUCCESS) 621 621 { … … 629 629 else if(pAdapt->fProcessingPacketFilter == VBOXNETFLT_PFP_PASSTHRU) 630 630 { 631 631 Assert(!pNetFltIf->fActive); 632 632 633 633 if(Status == NDIS_STATUS_SUCCESS) -
trunk/src/VBox/HostDrivers/VBoxNetFlt/win/WinNetConfig.cpp
r25439 r26512 1753 1753 if(winEr != ERROR_INSUFFICIENT_BUFFER) 1754 1754 { 1755 1755 Log(L"VBoxNetCfgWinEnumNetDevices: SetupDiGetDeviceRegistryPropertyW (1) failed winErr(%d)\n", winEr); 1756 1756 hr = HRESULT_FROM_WIN32(winEr); 1757 1757 break; … … 1775 1775 { 1776 1776 winEr = GetLastError(); 1777 1777 Log(L"VBoxNetCfgWinEnumNetDevices: SetupDiGetDeviceRegistryPropertyW (2) failed winErr(%d)\n", winEr); 1778 1778 hr = HRESULT_FROM_WIN32(winEr); 1779 1779 break; … … 1809 1809 else 1810 1810 { 1811 1812 1813 1811 DWORD winEr = GetLastError(); 1812 Log(L"VBoxNetCfgWinEnumNetDevices: SetupDiGetClassDevsExW failed winErr(%d)\n", winEr); 1813 hr = HRESULT_FROM_WIN32(winEr); 1814 1814 } 1815 1815
Note:
See TracChangeset
for help on using the changeset viewer.