Changeset 40901 in vbox
- Timestamp:
- Apr 13, 2012 12:45:18 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77449
- Location:
- trunk/src/VBox/Additions/common/VBoxGuestLib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp
r40359 r40901 260 260 if (fIsUser) 261 261 return VERR_INVALID_PARAMETER; 262 /* always perform it as !VBGLR0_CAN_USE_PHYS_PAGE_LIST() since otherwise 263 * we end up creating a RTR0MEMOBJ and doing page lock again, which leads to undefined behavior and possible BSOD on Win */ 264 //if (!VBGLR0_CAN_USE_PHYS_PAGE_LIST()) 262 if (!VBGLR0_CAN_USE_PHYS_PAGE_LIST(/*a_fLocked =*/ true)) 265 263 { 266 264 cb = pSrcParm->u.Pointer.size; … … 401 399 pParmInfo->cLockBufs = iLockBuf + 1; 402 400 403 if (VBGLR0_CAN_USE_PHYS_PAGE_LIST( ))401 if (VBGLR0_CAN_USE_PHYS_PAGE_LIST(/*a_fLocked =*/ false)) 404 402 { 405 403 size_t const cPages = RTR0MemObjSize(hObj) >> PAGE_SHIFT; … … 539 537 case VMMDevHGCMParmType_LinAddr_Locked_Out: 540 538 case VMMDevHGCMParmType_LinAddr_Locked: 541 /* always perform it as !VBGLR0_CAN_USE_PHYS_PAGE_LIST() since otherwise 542 * we end up creating a RTR0MEMOBJ and doing page lock again, which leads to undefined behavior and possible BSOD on Win */ 543 // if (!VBGLR0_CAN_USE_PHYS_PAGE_LIST()) 539 if (!VBGLR0_CAN_USE_PHYS_PAGE_LIST(/*a_fLocked =*/ true)) 544 540 { 545 541 *pDstParm = *pSrcParm; … … 560 556 Assert(iParm == pParmInfo->aLockBufs[iLockBuf].iParm); 561 557 562 if (VBGLR0_CAN_USE_PHYS_PAGE_LIST( ))558 if (VBGLR0_CAN_USE_PHYS_PAGE_LIST(/*a_fLocked =*/ false)) 563 559 { 564 560 HGCMPageListInfo *pDstPgLst = (HGCMPageListInfo *)((uint8_t *)pHGCMCall + offExtra); … … 805 801 case VMMDevHGCMParmType_LinAddr_Locked_Out: 806 802 case VMMDevHGCMParmType_LinAddr_Locked: 807 /* always perform it as !VBGLR0_CAN_USE_PHYS_PAGE_LIST() since otherwise 808 * we end up creating a RTR0MEMOBJ and doing page lock again, which leads to undefined behavior and possible BSOD on Win */ 809 // if (!VBGLR0_CAN_USE_PHYS_PAGE_LIST()) 803 if (!VBGLR0_CAN_USE_PHYS_PAGE_LIST(/*a_fLocked =*/ true)) 810 804 { 811 805 pDstParm->u.Pointer.size = pSrcParm->u.Pointer.size; -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h
r38407 r40901 1 /* $Revision$ */1 /* Id: 73443 $ */ 2 2 /** @file 3 3 * VBoxGuestLibR0 - Internal header. … … 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 121 121 122 122 /** 123 * Internal macro for checking whether we can pass phy ical page lists to the123 * Internal macro for checking whether we can pass physical page lists to the 124 124 * host. 125 125 * 126 126 * ASSUMES that vbglR0Enter has been called already. 127 * 128 * @param a_fLocked For the windows shared folders workarounds. 129 * 130 * @remarks Disable the PageList feature for 64-bit Windows, because shared 131 * folders do not work, if this is enabled. This should be reenabled 132 * again when the problem is fixed. 133 * @remarks Disabled the PageList feature for 32-bit Windows, see xTracker 134 * ticket 6096 and public ticket 10290. Hopefully this is the same 135 * issue as on Windows/AMD64. 127 136 */ 128 #if defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64) 129 /* Disable the PageList feature for 64 bit Windows, because shared folders do not work, 130 * if this is enabled. This should be reenabled again when the problem is fixed. 131 */ 132 #define VBGLR0_CAN_USE_PHYS_PAGE_LIST() \ 133 ( 0 ) 137 #if defined(RT_OS_WINDOWS) 138 # ifdef RT_ARCH_AMD64 139 # define VBGLR0_CAN_USE_PHYS_PAGE_LIST(a_fLocked) ( 0 ) 140 # else 141 # define VBGLR0_CAN_USE_PHYS_PAGE_LIST(a_fLocked) \ 142 ( !(a_fLocked) && (g_vbgldata.hostVersion.features & VMMDEV_HVF_HGCM_PHYS_PAGE_LIST) ) 143 # endif 134 144 #else 135 # define VBGLR0_CAN_USE_PHYS_PAGE_LIST() \145 # define VBGLR0_CAN_USE_PHYS_PAGE_LIST(a_fLocked) \ 136 146 ( !!(g_vbgldata.hostVersion.features & VMMDEV_HVF_HGCM_PHYS_PAGE_LIST) ) 137 147 #endif -
trunk/src/VBox/Additions/common/VBoxGuestLib/VbglR0CanUsePhysPageList.cpp
r28800 r40901 37 37 int rc = vbglR0Enter(); 38 38 return RT_SUCCESS(rc) 39 && VBGLR0_CAN_USE_PHYS_PAGE_LIST( );39 && VBGLR0_CAN_USE_PHYS_PAGE_LIST(/*a_fLocked =*/ false); 40 40 } 41 41
Note:
See TracChangeset
for help on using the changeset viewer.