VirtualBox

Changeset 40901 in vbox


Ignore:
Timestamp:
Apr 13, 2012 12:45:18 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77449
Message:

Let the other hosts use page lists again.

Location:
trunk/src/VBox/Additions/common/VBoxGuestLib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp

    r40359 r40901  
    260260                if (fIsUser)
    261261                    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))
    265263                {
    266264                    cb = pSrcParm->u.Pointer.size;
     
    401399                    pParmInfo->cLockBufs = iLockBuf + 1;
    402400
    403                     if (VBGLR0_CAN_USE_PHYS_PAGE_LIST())
     401                    if (VBGLR0_CAN_USE_PHYS_PAGE_LIST(/*a_fLocked =*/ false))
    404402                    {
    405403                        size_t const cPages = RTR0MemObjSize(hObj) >> PAGE_SHIFT;
     
    539537            case VMMDevHGCMParmType_LinAddr_Locked_Out:
    540538            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))
    544540                {
    545541                    *pDstParm = *pSrcParm;
     
    560556                    Assert(iParm == pParmInfo->aLockBufs[iLockBuf].iParm);
    561557
    562                     if (VBGLR0_CAN_USE_PHYS_PAGE_LIST())
     558                    if (VBGLR0_CAN_USE_PHYS_PAGE_LIST(/*a_fLocked =*/ false))
    563559                    {
    564560                        HGCMPageListInfo   *pDstPgLst = (HGCMPageListInfo *)((uint8_t *)pHGCMCall + offExtra);
     
    805801            case VMMDevHGCMParmType_LinAddr_Locked_Out:
    806802            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))
    810804                {
    811805                    pDstParm->u.Pointer.size = pSrcParm->u.Pointer.size;
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h

    r38407 r40901  
    1 /* $Revision$ */
     1/* Id: 73443 $ */
    22/** @file
    33 * VBoxGuestLibR0 - Internal header.
     
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    121121
    122122/**
    123  * Internal macro for checking whether we can pass phyical page lists to the
     123 * Internal macro for checking whether we can pass physical page lists to the
    124124 * host.
    125125 *
    126126 * 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.
    127136 */
    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
    134144#else
    135 #define VBGLR0_CAN_USE_PHYS_PAGE_LIST() \
     145# define VBGLR0_CAN_USE_PHYS_PAGE_LIST(a_fLocked) \
    136146    ( !!(g_vbgldata.hostVersion.features & VMMDEV_HVF_HGCM_PHYS_PAGE_LIST) )
    137147#endif
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VbglR0CanUsePhysPageList.cpp

    r28800 r40901  
    3737    int rc = vbglR0Enter();
    3838    return RT_SUCCESS(rc)
    39         && VBGLR0_CAN_USE_PHYS_PAGE_LIST();
     39        && VBGLR0_CAN_USE_PHYS_PAGE_LIST(/*a_fLocked =*/ false);
    4040}
    4141
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette