VirtualBox

Ignore:
Timestamp:
Mar 19, 2014 12:42:42 PM (11 years ago)
Author:
vboxsync
Message:

VBoxGuest/VBoxGuest-win.cpp: Logging.

Location:
trunk/src/VBox/Additions/common/VBoxGuest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk

    r48034 r50822  
    3838 VBoxGuest_DEFS.linux    = KBUILD_MODNAME=KBUILD_STR\(vboxguest\) KBUILD_BASENAME=KBUILD_STR\(vboxguest\) DEBUG_HASH=2 DEBUG_HASH2=3 EXPORT_SYMTAB
    3939 VBoxGuest_DEFS.solaris  = VBOX_SVN_REV=$(VBOX_SVN_REV)
    40  VBoxGuest_DEFS.win      = # VBOX_WITH_VRDP_SESSION_HANDLING
     40 VBoxGuest_DEFS.win      = VBOX_GUESTDRV_WITH_RELEASE_LOGGER # VBOX_WITH_VRDP_SESSION_HANDLING
    4141 VBoxGuest_DEFS.darwin   = VBOX_GUESTDRV_WITH_RELEASE_LOGGER
    4242 ifeq ($(KBUILD_TYPE),release)
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp

    r46876 r50822  
    9898    NTSTATUS rc = STATUS_SUCCESS;
    9999
    100     Log(("VBoxGuest::DriverEntry. Driver built: %s %s\n", __DATE__, __TIME__));
     100    LogFunc(("Driver built: %s %s\n", __DATE__, __TIME__));
    101101
    102102    /*
     
    108108    ULONG ulBuildNo;
    109109    BOOLEAN fCheckedBuild = PsGetVersion(&ulMajorVer, &ulMinorVer, &ulBuildNo, NULL);
    110     Log(("VBoxGuest::DriverEntry: Running on Windows NT version %u.%u, build %u\n", ulMajorVer, ulMinorVer, ulBuildNo));
     110    LogRelFunc(("Running on Windows NT version %u.%u, build %u\n", ulMajorVer, ulMinorVer, ulBuildNo));
    111111    if (fCheckedBuild)
    112         Log(("VBoxGuest::DriverEntry: Running on a Windows checked build (debug)!\n"));
     112        LogRelFunc(("Running on a Windows checked build (debug)!\n"));
    113113#ifdef DEBUG
    114114    vbgdNtDoTests();
     
    132132                    break;
    133133                default:
    134                     Log(("VBoxGuest::DriverEntry: Unknown version of Windows (%u.%u), refusing!\n", ulMajorVer, ulMinorVer));
     134                    LogRelFunc(("Unknown version of Windows (%u.%u), refusing!\n", ulMajorVer, ulMinorVer));
    135135                    rc = STATUS_DRIVER_UNABLE_TO_LOAD;
    136136                    break;
     
    150150                    break;
    151151                default:
    152                     Log(("VBoxGuest::DriverEntry: Unknown version of Windows (%u.%u), refusing!\n", ulMajorVer, ulMinorVer));
     152                    LogRelFunc(("Unknown version of Windows (%u.%u), refusing!\n", ulMajorVer, ulMinorVer));
    153153                    rc = STATUS_DRIVER_UNABLE_TO_LOAD;
    154154            }
     
    159159        default:
    160160            if (ulMajorVer < 4)
    161                 Log(("VBoxGuest::DriverEntry: At least Windows NT4 required! (%u.%u)\n", ulMajorVer, ulMinorVer));
     161                LogRelFunc(("At least Windows NT4 required! (%u.%u)\n", ulMajorVer, ulMinorVer));
    162162            else
    163                 Log(("VBoxGuest::DriverEntry: Too new version %u.%u!\n", ulMajorVer, ulMinorVer));
     163                LogRelFunc(("Too new version %u.%u!\n", ulMajorVer, ulMinorVer));
    164164            rc = STATUS_DRIVER_UNABLE_TO_LOAD;
    165165            break;
     
    189189    }
    190190
    191     Log(("VBoxGuest::DriverEntry returning %#x\n", rc));
     191    LogFlowFunc(("Returning %#x\n", rc));
    192192    return rc;
    193193}
     
    205205{
    206206    NTSTATUS rc;
    207     Log(("VBoxGuest::vbgdNtGuestAddDevice\n"));
     207    LogFlowFuncEnter();
    208208
    209209    /*
     
    253253                    /* Driver is ready now. */
    254254                    pDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
    255                     Log(("VBoxGuest::vbgdNtGuestAddDevice: returning with rc = 0x%x (success)\n", rc));
     255                    LogFlowFunc(("Returning with rc=0x%x (success)\n", rc));
    256256                    return rc;
    257257                }
     
    261261            else
    262262            {
    263                 Log(("VBoxGuest::vbgdNtGuestAddDevice: IoAttachDeviceToDeviceStack did not give a nextLowerDriver!\n"));
     263                LogFlowFunc(("IoAttachDeviceToDeviceStack did not give a nextLowerDriver!\n"));
    264264                rc = STATUS_DEVICE_NOT_CONNECTED;
    265265            }
     
    269269        }
    270270        else
    271             Log(("VBoxGuest::vbgdNtGuestAddDevice: IoCreateSymbolicLink failed with rc=%#x!\n", rc));
     271            LogFlowFunc(("IoCreateSymbolicLink failed with rc=%#x!\n", rc));
    272272        IoDeleteDevice(pDeviceObject);
    273273    }
    274274    else
    275         Log(("VBoxGuest::vbgdNtGuestAddDevice: IoCreateDevice failed with rc=%#x!\n", rc));
    276     Log(("VBoxGuest::vbgdNtGuestAddDevice: returning with rc = 0x%x\n", rc));
     275        LogFlowFunc(("IoCreateDevice failed with rc=%#x!\n", rc));
     276
     277    LogFlowFunc(("Returning with rc=0x%x\n", rc));
    277278    return rc;
    278279}
     
    308309        };
    309310
    310         Log(("VBoxGuest::vbgdNtShowDeviceResources: Type %s",
    311              uType < RT_ELEMENTS(s_apszName) ? s_apszName[uType] : "Unknown"));
     311        LogFlowFunc(("Type=%s",
     312                     uType < RT_ELEMENTS(s_apszName) ? s_apszName[uType] : "Unknown"));
    312313
    313314        switch (uType)
     
    315316            case CmResourceTypePort:
    316317            case CmResourceTypeMemory:
    317                 Log(("VBoxGuest::vbgdNtShowDeviceResources: Start %8X%8.8lX length %X\n",
    318                      pResource->u.Port.Start.HighPart, pResource->u.Port.Start.LowPart,
    319                      pResource->u.Port.Length));
     318                LogFlowFunc(("Start %8X%8.8lX, length=%X\n",
     319                             pResource->u.Port.Start.HighPart, pResource->u.Port.Start.LowPart,
     320                             pResource->u.Port.Length));
    320321                break;
    321322
    322323            case CmResourceTypeInterrupt:
    323                 Log(("VBoxGuest::vbgdNtShowDeviceResources: Level %X, Vector %X, Affinity %X\n",
    324                      pResource->u.Interrupt.Level, pResource->u.Interrupt.Vector,
    325                      pResource->u.Interrupt.Affinity));
     324                LogFlowFunc(("Level=%X, vector=%X, affinity=%X\n",
     325                             pResource->u.Interrupt.Level, pResource->u.Interrupt.Vector,
     326                             pResource->u.Interrupt.Affinity));
    326327                break;
    327328
    328329            case CmResourceTypeDma:
    329                 Log(("VBoxGuest::vbgdNtShowDeviceResources: Channel %d, Port %X\n",
    330                      pResource->u.Dma.Channel, pResource->u.Dma.Port));
     330                LogFlowFunc(("Channel %d, Port %X\n",
     331                             pResource->u.Dma.Channel, pResource->u.Dma.Port));
    331332                break;
    332333
    333334            default:
    334                 Log(("\n"));
     335                LogFlowFunc(("\n"));
    335336                break;
    336337        }
     
    357358#endif
    358359
    359     Log(("VBoxGuest::vbgdNtInit\n"));
     360    LogFlowFuncEnter();
    360361
    361362    int rc = STATUS_SUCCESS;
     
    364365     * Let's have a look at what our PCI adapter offers.
    365366     */
    366     Log(("VBoxGuest::vbgdNtInit: Starting to scan PCI resources of VBoxGuest ...\n"));
     367    LogFlowFunc(("Starting to scan PCI resources of VBoxGuest ...\n"));
    367368
    368369    /* Assign the PCI resources. */
     
    401402            pDevExt->Core.pVMMDevMemory = (VMMDevMemory *)pvMMIOBase;
    402403
    403             Log(("VBoxGuest::vbgdNtInit: pvMMIOBase = 0x%p, pDevExt = 0x%p, pDevExt->Core.pVMMDevMemory = 0x%p\n",
    404                  pvMMIOBase, pDevExt, pDevExt ? pDevExt->Core.pVMMDevMemory : NULL));
     404            LogFlowFunc(("pvMMIOBase=0x%p, pDevExt=0x%p, pDevExt->Core.pVMMDevMemory=0x%p\n",
     405                         pvMMIOBase, pDevExt, pDevExt ? pDevExt->Core.pVMMDevMemory : NULL));
    405406
    406407            int vrc = VBoxGuestInitDevExt(&pDevExt->Core,
     
    411412            if (RT_FAILURE(vrc))
    412413            {
    413                 Log(("VBoxGuest::vbgdNtInit: Could not init device extension, rc = %Rrc!\n", vrc));
     414                LogFlowFunc(("Could not init device extension, rc=%Rrc\n", vrc));
    414415                rc = STATUS_DEVICE_CONFIGURATION_ERROR;
    415416            }
    416417        }
    417418        else
    418             Log(("VBoxGuest::vbgdNtInit: Could not map physical address of VMMDev, rc = 0x%x!\n", rc));
     419            LogFlowFunc(("Could not map physical address of VMMDev, rc=0x%x\n", rc));
    419420    }
    420421
     
    425426        if (RT_FAILURE(vrc))
    426427        {
    427             Log(("VBoxGuest::vbgdNtInit: Alloc for pPowerStateRequest failed, rc = %Rrc\n", vrc));
     428            LogFlowFunc(("Alloc for pPowerStateRequest failed, rc=%Rrc\n", vrc));
    428429            rc = STATUS_UNSUCCESSFUL;
    429430        }
     
    435436         * Register DPC and ISR.
    436437         */
    437         Log(("VBoxGuest::vbgdNtInit: Initializing DPC/ISR ...\n"));
     438        LogFlowFunc(("Initializing DPC/ISR ...\n"));
    438439
    439440        IoInitializeDpcRequest(pDevExt->pDeviceObject, vbgdNtDpcHandler);
     
    446447            || pDevExt->interruptVector)
    447448        {
    448             Log(("VBoxGuest::vbgdNtInit: Getting interrupt vector (HAL): Bus: %u, IRQL: %u, Vector: %u\n",
    449                  pDevExt->busNumber, pDevExt->interruptLevel, pDevExt->interruptVector));
     449            LogFlowFunc(("Getting interrupt vector (HAL): Bus=%u, IRQL=%u, Vector=%u\n",
     450                         pDevExt->busNumber, pDevExt->interruptLevel, pDevExt->interruptVector));
    450451
    451452            uInterruptVector = HalGetInterruptVector(PCIBus,
     
    455456                                                     &irqLevel,
    456457                                                     &pDevExt->interruptAffinity);
    457             Log(("VBoxGuest::vbgdNtInit: HalGetInterruptVector returns vector %u\n", uInterruptVector));
     458            LogFlowFunc(("HalGetInterruptVector returns vector=%u\n", uInterruptVector));
    458459            if (uInterruptVector == 0)
    459                 Log(("VBoxGuest::vbgdNtInit: No interrupt vector found!\n"));
     460                LogFunc(("No interrupt vector found!\n"));
    460461        }
    461462        else
    462             Log(("VBoxGuest::vbgdNtInit: Device does not provide an interrupt!\n"));
     463            LogFlowFunc(("Device does not provide an interrupt!\n"));
    463464#endif
    464465        if (pDevExt->interruptVector)
    465466        {
    466             Log(("VBoxGuest::vbgdNtInit: Connecting interrupt ...\n"));
     467            LogFlowFunc(("Connecting interrupt ...\n"));
    467468
    468469            rc = IoConnectInterrupt(&pDevExt->pInterruptObject,                 /* Out: interrupt object. */
     
    484485                                    FALSE);                                     /* Don't save FPU stack. */
    485486            if (NT_ERROR(rc))
    486                 Log(("VBoxGuest::vbgdNtInit: Could not connect interrupt, rc = 0x%x\n", rc));
     487                LogFlowFunc(("Could not connect interrupt, rc=0x%x\n", rc));
    487488        }
    488489        else
    489             Log(("VBoxGuest::vbgdNtInit: No interrupt vector found!\n"));
     490            LogFlowFunc(("No interrupt vector found!\n"));
    490491    }
    491492
    492493
    493494#ifdef VBOX_WITH_HGCM
    494     Log(("VBoxGuest::vbgdNtInit: Allocating kernel session data ...\n"));
     495    LogFunc(("Allocating kernel session data ...\n"));
    495496    int vrc = VBoxGuestCreateKernelSession(&pDevExt->Core, &pDevExt->pKernelSession);
    496497    if (RT_FAILURE(vrc))
    497498    {
    498         Log(("VBoxGuest::vbgdNtInit: Failed to allocated kernel session data! rc = %Rrc\n", rc));
     499        LogFlowFunc(("Failed to allocated kernel session data, rc=%Rrc\n", rc));
    499500        rc = STATUS_UNSUCCESSFUL;
    500501    }
     
    504505    {
    505506        ULONG ulValue = 0;
    506         NTSTATUS rcNt = vbgdNtRegistryReadDWORD(RTL_REGISTRY_SERVICES, L"VBoxGuest", L"LoggingEnabled", &ulValue);
     507        NTSTATUS rcNt = vbgdNtRegistryReadDWORD(RTL_REGISTRY_SERVICES,
     508                                                L"VBoxGuest", L"LoggingEnabled", &ulValue);
    507509        if (NT_SUCCESS(rcNt))
    508510        {
    509511            pDevExt->Core.fLoggingEnabled = ulValue >= 0xFF;
    510512            if (pDevExt->Core.fLoggingEnabled)
    511                 Log(("Logging to release log enabled (0x%x)", ulValue));
     513                LogRelFunc(("Logging to host log enabled (0x%x)", ulValue));
    512514        }
    513515
    514516        /* Ready to rumble! */
    515         Log(("VBoxGuest::vbgdNtInit: Device is ready!\n"));
     517        LogRelFunc(("Device is ready!\n"));
    516518        VBOXGUEST_UPDATE_DEVSTATE(pDevExt, WORKING);
    517519    }
     
    522524     *        whole bunch of things... */
    523525
    524     Log(("VBoxGuest::vbgdNtInit: Returned with rc = 0x%x\n", rc));
     526    LogFlowFunc(("Returned with rc=0x%x\n", rc));
    525527    return rc;
    526528}
     
    535537NTSTATUS vbgdNtCleanup(PDEVICE_OBJECT pDevObj)
    536538{
    537     Log(("VBoxGuest::vbgdNtCleanup\n"));
     539    LogFlowFuncEnter();
    538540
    539541    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
     
    566568        vbgdNtUnmapVMMDevMemory(pDevExt);
    567569    }
     570
    568571    return STATUS_SUCCESS;
    569572}
     
    577580static void vbgdNtUnload(PDRIVER_OBJECT pDrvObj)
    578581{
    579     Log(("VBoxGuest::vbgdNtGuestUnload\n"));
     582    LogFlowFuncEnter();
     583
    580584#ifdef TARGET_NT4
    581585    vbgdNtCleanup(pDrvObj->DeviceObject);
     
    600604#endif /* !TARGET_NT4 */
    601605
    602     Log(("VBoxGuest::vbgdNtGuestUnload: returning\n"));
     606    LogFlowFunc(("Returning\n"));
    603607}
    604608
     
    621625    if (pDevExt->devState != WORKING)
    622626    {
    623         Log(("VBoxGuest::vbgdNtGuestCreate: device is not working currently: %d!\n", pDevExt->devState));
     627        LogFlowFunc(("Device is not working currently, state=%d\n", pDevExt->devState));
    624628        rc = STATUS_UNSUCCESSFUL;
    625629    }
     
    630634         * (But this is possible.)
    631635         */
    632         Log(("VBoxGuest::vbgdNtGuestCreate: Uhm, we're not a directory!\n"));
     636        LogFlowFunc(("Uhm, we're not a directory!\n"));
    633637        rc = STATUS_NOT_A_DIRECTORY;
    634638    }
     
    638642        if (pFileObj)
    639643        {
    640             Log(("VBoxGuest::vbgdNtGuestCreate: File object type = %d\n",
    641                  pFileObj->Type));
     644            LogFlowFunc(("File object type=%d\n", pFileObj->Type));
    642645
    643646            int vrc;
     
    667670    IoCompleteRequest(pIrp, IO_NO_INCREMENT);
    668671
    669     Log(("VBoxGuest::vbgdNtGuestCreate: Returning 0x%x\n", rc));
     672    LogFlowFunc(("Returning rc=0x%x\n", rc));
    670673    return rc;
    671674}
     
    684687    PFILE_OBJECT        pFileObj = pStack->FileObject;
    685688
    686     Log(("VBoxGuest::vbgdNtGuestClose: pDevExt=0x%p pFileObj=0x%p FsContext=0x%p\n",
    687          pDevExt, pFileObj, pFileObj->FsContext));
     689    LogFlowFunc(("pDevExt=0x%p, pFileObj=0x%p, FsContext=0x%p\n",
     690                 pDevExt, pFileObj, pFileObj->FsContext));
    688691
    689692#ifdef VBOX_WITH_HGCM
     
    726729        pSession = (PVBOXGUESTSESSION)pFileObj->FsContext;
    727730
    728     Log(("VBoxGuest::vbgdNtIOCtl: uCmd=%u, pDevExt=0x%p, pSession=0x%p\n",
    729          uCmd, pDevExt, pSession));
     731    LogFlowFunc(("uCmd=%u, pDevExt=0x%p, pSession=0x%p\n",
     732                 uCmd, pDevExt, pSession));
    730733
    731734    /* We don't have a session associated with the file object? So this seems
     
    735738    if (pSession == NULL)
    736739    {
    737         Log(("VBoxGuest::vbgdNtIOCtl: Using kernel session data ...\n"));
     740        LogFlowFunc(("Using kernel session data ...\n"));
    738741        pSession = pDevExt->pKernelSession;
    739742    }
     
    749752        case VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION:
    750753        {
    751             LogRel(("VBoxGuest::vbgdNtIOCtl: ENABLE_VRDP_SESSION: Currently: %sabled\n",
    752                     pDevExt->fVRDPEnabled? "en": "dis"));
     754            LogRelFunc(("ENABLE_VRDP_SESSION: Currently: %sabled\n",
     755                        pDevExt->fVRDPEnabled? "en": "dis"));
    753756            if (!pDevExt->fVRDPEnabled)
    754757            {
     
    756759
    757760                pDevExt->fVRDPEnabled            = true;
    758                 LogRel(("VBoxGuest::vbgdNtIOCtl: ENABLE_VRDP_SESSION: Current active console ID: 0x%08X\n",
    759                         pSharedUserData->ActiveConsoleId));
     761                LogRelFunc(("ENABLE_VRDP_SESSION: Current active console ID: 0x%08X\n",
     762                            pSharedUserData->ActiveConsoleId));
    760763                pDevExt->ulOldActiveConsoleId    = pSharedUserData->ActiveConsoleId;
    761764                pSharedUserData->ActiveConsoleId = 2;
     
    766769        case VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION:
    767770        {
    768             LogRel(("VBoxGuest::vbgdNtIOCtl: DISABLE_VRDP_SESSION: Currently: %sabled\n",
    769                     pDevExt->fVRDPEnabled? "en": "dis"));
     771            LogRelFunc(("DISABLE_VRDP_SESSION: Currently: %sabled\n",
     772                        pDevExt->fVRDPEnabled? "en": "dis"));
    770773            if (pDevExt->fVRDPEnabled)
    771774            {
     
    773776
    774777                pDevExt->fVRDPEnabled            = false;
    775                 Log(("VBoxGuest::vbgdNtIOCtl: DISABLE_VRDP_SESSION: Current active console ID: 0x%08X\n",
    776                      pSharedUserData->ActiveConsoleId));
     778                LogFlowFunc(("DISABLE_VRDP_SESSION: Current active console ID: 0x%08X\n",
     779                             pSharedUserData->ActiveConsoleId));
    777780                pSharedUserData->ActiveConsoleId = pDevExt->ulOldActiveConsoleId;
    778781                pDevExt->ulOldActiveConsoleId    = 0;
     
    792795            int vrc = VBoxGuestCommonIOCtl(uCmd, &pDevExt->Core, pSession, pBuf, cbData, &cbDataReturned);
    793796
    794             Log(("VBoxGuest::vbgdNtGuestDeviceControl: rc=%Rrc, pBuf=0x%p, cbData=%u, cbDataReturned=%u\n",
    795                  vrc, pBuf, cbData, cbDataReturned));
     797            LogFlowFunc(("rc=%Rrc, pBuf=0x%p, cbData=%u, cbDataReturned=%u\n",
     798                         vrc, pBuf, cbData, cbDataReturned));
    796799
    797800            if (RT_SUCCESS(vrc))
     
    799802                if (RT_UNLIKELY(cbDataReturned > cbData))
    800803                {
    801                     Log(("VBoxGuest::vbgdNtGuestDeviceControl: Too much output data %u - expected %u!\n", cbDataReturned, cbData));
     804                    LogFlowFunc(("Too much output data %u - expected %u!\n", cbDataReturned, cbData));
    802805                    cbDataReturned = cbData;
    803806                    Status = STATUS_BUFFER_TOO_SMALL;
     
    825828    IoCompleteRequest(pIrp, IO_NO_INCREMENT);
    826829
    827     //Log(("VBoxGuest::vbgdNtGuestDeviceControl: returned cbOut=%d rc=%#x\n", cbOut, Status));
     830    //LogFlowFunc(("Returned cbOut=%d rc=%#x\n", cbOut, Status));
    828831    return Status;
    829832}
     
    904907    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
    905908
    906     Log(("VBoxGuest::vbgdNtGuestSystemControl\n"));
     909    LogFlowFuncEnter();
    907910
    908911    /* Always pass it on to the next driver. */
     
    924927    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
    925928
    926     Log(("VBoxGuest::vbgdNtGuestShutdown\n"));
     929    LogFlowFuncEnter();
    927930
    928931    VMMDevPowerStateRequest *pReq = pDevExt->pPowerStateRequest;
     
    934937        int rc = VbglGRPerform(&pReq->header);
    935938        if (RT_FAILURE(rc))
    936         {
    937             Log(("VBoxGuest::vbgdNtGuestShutdown: Error performing request to VMMDev! "
    938                      "rc = %Rrc\n", rc));
    939         }
    940     }
     939            LogFlowFunc(("Error performing request to VMMDev, rc=%Rrc\n", rc));
     940    }
     941
    941942    return STATUS_SUCCESS;
    942943}
     
    952953NTSTATUS vbgdNtNotSupportedStub(PDEVICE_OBJECT pDevObj, PIRP pIrp)
    953954{
    954     Log(("VBoxGuest::vbgdNtGuestNotSupportedStub\n"));
     955    LogFlowFuncEnter();
    955956
    956957    pIrp->IoStatus.Information = 0;
     
    973974{
    974975    PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension;
    975     Log(("VBoxGuest::vbgdNtGuestDpcHandler: pDevExt=0x%p\n", pDevExt));
    976 
    977     /* test & reset the counter */
     976#ifndef DEBUG_andy
     977    LogFlowFunc(("pDevExt=0x%p\n", pDevExt));
     978#endif
     979
     980    /* Test & reset the counter. */
    978981    if (ASMAtomicXchgU32(&pDevExt->Core.u32MousePosChangedSeq, 0))
    979982    {
     
    10081011        return FALSE;
    10091012
    1010     /*Log(("VBoxGuest::vbgdNtGuestIsrHandler: pDevExt = 0x%p, pVMMDevMemory = 0x%p\n",
    1011              pDevExt, pDevExt ? pDevExt->pVMMDevMemory : NULL));*/
     1013    /*LogFlowFunc(("pDevExt=0x%p, pVMMDevMemory=0x%p\n",
     1014                   pDevExt, pDevExt ? pDevExt->pVMMDevMemory : NULL));*/
    10121015
    10131016    /* Enter the common ISR routine and do the actual work. */
     
    10181021    if (fIRQTaken)
    10191022    {
    1020         Log(("VBoxGuest::vbgdNtGuestIsrHandler: IRQ was taken! pInterrupt = 0x%p, pDevExt = 0x%p\n",
    1021              pInterrupt, pDevExt));
    1022         if (ASMAtomicUoReadU32(&pDevExt->Core.u32MousePosChangedSeq) || !RTListIsEmpty(&pDevExt->Core.WakeUpList))
    1023         {
    1024             Log(("VBoxGuest::vbgdNtGuestIsrHandler: Requesting DPC ...\n"));
     1023#ifndef DEBUG_andy
     1024        LogFlowFunc(("IRQ was taken! pInterrupt=0x%p, pDevExt=0x%p\n",
     1025                     pInterrupt, pDevExt));
     1026#endif
     1027        if (ASMAtomicUoReadU32(   &pDevExt->Core.u32MousePosChangedSeq)
     1028                               || !RTListIsEmpty(&pDevExt->Core.WakeUpList))
     1029        {
     1030#ifndef DEBUG_andy
     1031            LogFlowFunc(("Requesting DPC ...\n"));
     1032#endif
    10251033            IoRequestDpc(pDevExt->pDeviceObject, pDevExt->pCurrentIrp, NULL);
    10261034        }
     
    10891097{
    10901098    /* Enumerate the resource list. */
    1091     Log(("VBoxGuest::vbgdNtScanPCIResourceList: Found %d resources\n",
    1092          pResList->List->PartialResourceList.Count));
     1099    LogFlowFunc(("Found %d resources\n",
     1100                 pResList->List->PartialResourceList.Count));
    10931101
    10941102    NTSTATUS rc = STATUS_SUCCESS;
     
    11071115                if (rangeCount < PCI_TYPE0_ADDRESSES)
    11081116                {
    1109                     Log(("VBoxGuest::vbgdNtScanPCIResourceList: I/O range: Base = %08x:%08x, Length = %08x\n",
    1110                          pPartialData->u.Port.Start.HighPart,
    1111                          pPartialData->u.Port.Start.LowPart,
    1112                          pPartialData->u.Port.Length));
     1117                    LogFlowFunc(("I/O range: Base=%08x:%08x, length=%08x\n",
     1118                                 pPartialData->u.Port.Start.HighPart,
     1119                                 pPartialData->u.Port.Start.LowPart,
     1120                                 pPartialData->u.Port.Length));
    11131121
    11141122                    /* Save the IO port base. */
     
    11231131                    pBaseAddress->ResourceMapped = FALSE;
    11241132
    1125                     Log(("VBoxGuest::vbgdNtScanPCIResourceList: I/O range for VMMDev found! Base = %08x:%08x, Length = %08x\n",
    1126                          pPartialData->u.Port.Start.HighPart,
    1127                          pPartialData->u.Port.Start.LowPart,
    1128                          pPartialData->u.Port.Length));
     1133                    LogFlowFunc(("I/O range for VMMDev found! Base=%08x:%08x, length=%08x\n",
     1134                                 pPartialData->u.Port.Start.HighPart,
     1135                                 pPartialData->u.Port.Start.LowPart,
     1136                                 pPartialData->u.Port.Length));
    11291137
    11301138                    /* Next item ... */
     
    11361144            case CmResourceTypeInterrupt:
    11371145            {
    1138                 Log(("VBoxGuest::vbgdNtScanPCIResourceList: Interrupt: Level = %x, Vector = %x, Mode = %x\n",
    1139                      pPartialData->u.Interrupt.Level,
    1140                      pPartialData->u.Interrupt.Vector,
    1141                      pPartialData->Flags));
     1146                LogFlowFunc(("Interrupt: Level=%x, vector=%x, mode=%x\n",
     1147                             pPartialData->u.Interrupt.Level,
     1148                             pPartialData->u.Interrupt.Vector,
     1149                             pPartialData->Flags));
    11421150
    11431151                /* Save information. */
     
    11591167                if (rangeCount < PCI_TYPE0_ADDRESSES)
    11601168                {
    1161                     Log(("VBoxGuest::vbgdNtScanPCIResourceList: Memory range: Base = %08x:%08x, Length = %08x\n",
    1162                          pPartialData->u.Memory.Start.HighPart,
    1163                          pPartialData->u.Memory.Start.LowPart,
    1164                          pPartialData->u.Memory.Length));
     1169                    LogFlowFunc(("Memory range: Base=%08x:%08x, length=%08x\n",
     1170                                 pPartialData->u.Memory.Start.HighPart,
     1171                                 pPartialData->u.Memory.Start.LowPart,
     1172                                 pPartialData->u.Memory.Length));
    11651173
    11661174                    /* We only care about read/write memory. */
     
    11791187                        pBaseAddress->ResourceMapped = FALSE;
    11801188
    1181                         Log(("VBoxGuest::vbgdNtScanPCIResourceList: Memory range for VMMDev found! Base = %08x:%08x, Length = %08x\n",
    1182                              pPartialData->u.Memory.Start.HighPart,
    1183                              pPartialData->u.Memory.Start.LowPart,
    1184                              pPartialData->u.Memory.Length));
     1189                        LogFlowFunc(("Memory range for VMMDev found! Base = %08x:%08x, Length = %08x\n",
     1190                                     pPartialData->u.Memory.Start.HighPart,
     1191                                     pPartialData->u.Memory.Start.LowPart,
     1192                                     pPartialData->u.Memory.Length));
    11851193
    11861194                        /* Next item ... */
     
    11881196                    }
    11891197                    else
    1190                     {
    1191                         Log(("VBoxGuest::vbgdNtScanPCIResourceList: Ignoring memory: Flags = %08x\n",
    1192                              pPartialData->Flags));
    1193                     }
     1198                        LogFlowFunc(("Ignoring memory: Flags=%08x\n", pPartialData->Flags));
    11941199                }
    11951200                break;
     
    11981203            default:
    11991204            {
    1200                 Log(("VBoxGuest::vbgdNtScanPCIResourceList: Unhandled resource found, type = %d\n", pPartialData->Type));
     1205                LogFlowFunc(("Unhandled resource found, type=%d\n", pPartialData->Type));
    12011206                break;
    12021207            }
     
    12321237    {
    12331238         VMMDevMemory *pVMMDevMemory = (VMMDevMemory *)MmMapIoSpace(PhysAddr, cbToMap, MmNonCached);
    1234          Log(("VBoxGuest::vbgdNtMapVMMDevMemory: pVMMDevMemory = 0x%x\n", pVMMDevMemory));
     1239         LogFlowFunc(("pVMMDevMemory = 0x%x\n", pVMMDevMemory));
    12351240         if (pVMMDevMemory)
    12361241         {
    1237              Log(("VBoxGuest::vbgdNtMapVMMDevMemory: VMMDevMemory: Version = 0x%x, Size = %d\n",
    1238                   pVMMDevMemory->u32Version, pVMMDevMemory->u32Size));
     1242             LogFlowFunc(("VMMDevMemory: Version = 0x%x, Size = %d\n",
     1243                          pVMMDevMemory->u32Version, pVMMDevMemory->u32Size));
    12391244
    12401245             /* Check version of the structure; do we have the right memory version? */
     
    12461251                     *pcbMMIO = pVMMDevMemory->u32Size;
    12471252
    1248                  Log(("VBoxGuest::vbgdNtMapVMMDevMemory: VMMDevMemory found and mapped! pvMMIOBase = 0x%p\n",
    1249                       *ppvMMIOBase));
     1253                 LogFlowFunc(("VMMDevMemory found and mapped! pvMMIOBase = 0x%p\n",
     1254                              *ppvMMIOBase));
    12501255             }
    12511256             else
    12521257             {
    12531258                 /* Not our version, refuse operation and unmap the memory. */
    1254                  Log(("VBoxGuest::vbgdNtMapVMMDevMemory: Wrong version (%u), refusing operation!\n", pVMMDevMemory->u32Version));
     1259                 LogFlowFunc(("Wrong version (%u), refusing operation!\n", pVMMDevMemory->u32Version));
     1260
    12551261                 vbgdNtUnmapVMMDevMemory(pDevExt);
    12561262                 rc = STATUS_UNSUCCESSFUL;
     
    12711277void vbgdNtUnmapVMMDevMemory(PVBOXGUESTDEVEXTWIN pDevExt)
    12721278{
    1273     Log(("VBoxGuest::vbgdNtUnmapVMMDevMemory: pVMMDevMemory = 0x%x\n", pDevExt->Core.pVMMDevMemory));
     1279    LogFlowFunc(("pVMMDevMemory = 0x%x\n", pDevExt->Core.pVMMDevMemory));
    12741280    if (pDevExt->Core.pVMMDevMemory)
    12751281    {
     
    13531359
    13541360#ifdef DEBUG
    1355 
    13561361/**
    13571362 * A quick implementation of AtomicTestAndClear for uint32_t and multiple bits.
     
    14021407    vbgdNtTestAtomicTestAndClearBitsU32(0x22, 0x23, 0x22);
    14031408}
    1404 
    14051409#endif /* DEBUG */
    14061410
     
    15511555    return VINF_SUCCESS;
    15521556}
    1553 
    15541557#endif /* VBOX_WITH_DPC_LATENCY_CHECKER */
    15551558
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