Changeset 50822 in vbox for trunk/src/VBox/Additions/common/VBoxGuest
- Timestamp:
- Mar 19, 2014 12:42:42 PM (11 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxGuest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r48034 r50822 38 38 VBoxGuest_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxguest\) KBUILD_BASENAME=KBUILD_STR\(vboxguest\) DEBUG_HASH=2 DEBUG_HASH2=3 EXPORT_SYMTAB 39 39 VBoxGuest_DEFS.solaris = VBOX_SVN_REV=$(VBOX_SVN_REV) 40 VBoxGuest_DEFS.win = # VBOX_WITH_VRDP_SESSION_HANDLING40 VBoxGuest_DEFS.win = VBOX_GUESTDRV_WITH_RELEASE_LOGGER # VBOX_WITH_VRDP_SESSION_HANDLING 41 41 VBoxGuest_DEFS.darwin = VBOX_GUESTDRV_WITH_RELEASE_LOGGER 42 42 ifeq ($(KBUILD_TYPE),release) -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
r46876 r50822 98 98 NTSTATUS rc = STATUS_SUCCESS; 99 99 100 Log (("VBoxGuest::DriverEntry.Driver built: %s %s\n", __DATE__, __TIME__));100 LogFunc(("Driver built: %s %s\n", __DATE__, __TIME__)); 101 101 102 102 /* … … 108 108 ULONG ulBuildNo; 109 109 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)); 111 111 if (fCheckedBuild) 112 Log (("VBoxGuest::DriverEntry:Running on a Windows checked build (debug)!\n"));112 LogRelFunc(("Running on a Windows checked build (debug)!\n")); 113 113 #ifdef DEBUG 114 114 vbgdNtDoTests(); … … 132 132 break; 133 133 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)); 135 135 rc = STATUS_DRIVER_UNABLE_TO_LOAD; 136 136 break; … … 150 150 break; 151 151 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)); 153 153 rc = STATUS_DRIVER_UNABLE_TO_LOAD; 154 154 } … … 159 159 default: 160 160 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)); 162 162 else 163 Log (("VBoxGuest::DriverEntry:Too new version %u.%u!\n", ulMajorVer, ulMinorVer));163 LogRelFunc(("Too new version %u.%u!\n", ulMajorVer, ulMinorVer)); 164 164 rc = STATUS_DRIVER_UNABLE_TO_LOAD; 165 165 break; … … 189 189 } 190 190 191 Log (("VBoxGuest::DriverEntry returning %#x\n", rc));191 LogFlowFunc(("Returning %#x\n", rc)); 192 192 return rc; 193 193 } … … 205 205 { 206 206 NTSTATUS rc; 207 Log (("VBoxGuest::vbgdNtGuestAddDevice\n"));207 LogFlowFuncEnter(); 208 208 209 209 /* … … 253 253 /* Driver is ready now. */ 254 254 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)); 256 256 return rc; 257 257 } … … 261 261 else 262 262 { 263 Log (("VBoxGuest::vbgdNtGuestAddDevice:IoAttachDeviceToDeviceStack did not give a nextLowerDriver!\n"));263 LogFlowFunc(("IoAttachDeviceToDeviceStack did not give a nextLowerDriver!\n")); 264 264 rc = STATUS_DEVICE_NOT_CONNECTED; 265 265 } … … 269 269 } 270 270 else 271 Log (("VBoxGuest::vbgdNtGuestAddDevice:IoCreateSymbolicLink failed with rc=%#x!\n", rc));271 LogFlowFunc(("IoCreateSymbolicLink failed with rc=%#x!\n", rc)); 272 272 IoDeleteDevice(pDeviceObject); 273 273 } 274 274 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)); 277 278 return rc; 278 279 } … … 308 309 }; 309 310 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")); 312 313 313 314 switch (uType) … … 315 316 case CmResourceTypePort: 316 317 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)); 320 321 break; 321 322 322 323 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)); 326 327 break; 327 328 328 329 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)); 331 332 break; 332 333 333 334 default: 334 Log (("\n"));335 LogFlowFunc(("\n")); 335 336 break; 336 337 } … … 357 358 #endif 358 359 359 Log (("VBoxGuest::vbgdNtInit\n"));360 LogFlowFuncEnter(); 360 361 361 362 int rc = STATUS_SUCCESS; … … 364 365 * Let's have a look at what our PCI adapter offers. 365 366 */ 366 Log (("VBoxGuest::vbgdNtInit:Starting to scan PCI resources of VBoxGuest ...\n"));367 LogFlowFunc(("Starting to scan PCI resources of VBoxGuest ...\n")); 367 368 368 369 /* Assign the PCI resources. */ … … 401 402 pDevExt->Core.pVMMDevMemory = (VMMDevMemory *)pvMMIOBase; 402 403 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)); 405 406 406 407 int vrc = VBoxGuestInitDevExt(&pDevExt->Core, … … 411 412 if (RT_FAILURE(vrc)) 412 413 { 413 Log (("VBoxGuest::vbgdNtInit: Could not init device extension, rc = %Rrc!\n", vrc));414 LogFlowFunc(("Could not init device extension, rc=%Rrc\n", vrc)); 414 415 rc = STATUS_DEVICE_CONFIGURATION_ERROR; 415 416 } 416 417 } 417 418 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)); 419 420 } 420 421 … … 425 426 if (RT_FAILURE(vrc)) 426 427 { 427 Log (("VBoxGuest::vbgdNtInit: Alloc for pPowerStateRequest failed, rc =%Rrc\n", vrc));428 LogFlowFunc(("Alloc for pPowerStateRequest failed, rc=%Rrc\n", vrc)); 428 429 rc = STATUS_UNSUCCESSFUL; 429 430 } … … 435 436 * Register DPC and ISR. 436 437 */ 437 Log (("VBoxGuest::vbgdNtInit:Initializing DPC/ISR ...\n"));438 LogFlowFunc(("Initializing DPC/ISR ...\n")); 438 439 439 440 IoInitializeDpcRequest(pDevExt->pDeviceObject, vbgdNtDpcHandler); … … 446 447 || pDevExt->interruptVector) 447 448 { 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)); 450 451 451 452 uInterruptVector = HalGetInterruptVector(PCIBus, … … 455 456 &irqLevel, 456 457 &pDevExt->interruptAffinity); 457 Log (("VBoxGuest::vbgdNtInit: HalGetInterruptVector returns vector%u\n", uInterruptVector));458 LogFlowFunc(("HalGetInterruptVector returns vector=%u\n", uInterruptVector)); 458 459 if (uInterruptVector == 0) 459 Log (("VBoxGuest::vbgdNtInit:No interrupt vector found!\n"));460 LogFunc(("No interrupt vector found!\n")); 460 461 } 461 462 else 462 Log (("VBoxGuest::vbgdNtInit:Device does not provide an interrupt!\n"));463 LogFlowFunc(("Device does not provide an interrupt!\n")); 463 464 #endif 464 465 if (pDevExt->interruptVector) 465 466 { 466 Log (("VBoxGuest::vbgdNtInit:Connecting interrupt ...\n"));467 LogFlowFunc(("Connecting interrupt ...\n")); 467 468 468 469 rc = IoConnectInterrupt(&pDevExt->pInterruptObject, /* Out: interrupt object. */ … … 484 485 FALSE); /* Don't save FPU stack. */ 485 486 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)); 487 488 } 488 489 else 489 Log (("VBoxGuest::vbgdNtInit:No interrupt vector found!\n"));490 LogFlowFunc(("No interrupt vector found!\n")); 490 491 } 491 492 492 493 493 494 #ifdef VBOX_WITH_HGCM 494 Log (("VBoxGuest::vbgdNtInit:Allocating kernel session data ...\n"));495 LogFunc(("Allocating kernel session data ...\n")); 495 496 int vrc = VBoxGuestCreateKernelSession(&pDevExt->Core, &pDevExt->pKernelSession); 496 497 if (RT_FAILURE(vrc)) 497 498 { 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)); 499 500 rc = STATUS_UNSUCCESSFUL; 500 501 } … … 504 505 { 505 506 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); 507 509 if (NT_SUCCESS(rcNt)) 508 510 { 509 511 pDevExt->Core.fLoggingEnabled = ulValue >= 0xFF; 510 512 if (pDevExt->Core.fLoggingEnabled) 511 Log (("Logging to releaselog enabled (0x%x)", ulValue));513 LogRelFunc(("Logging to host log enabled (0x%x)", ulValue)); 512 514 } 513 515 514 516 /* Ready to rumble! */ 515 Log (("VBoxGuest::vbgdNtInit:Device is ready!\n"));517 LogRelFunc(("Device is ready!\n")); 516 518 VBOXGUEST_UPDATE_DEVSTATE(pDevExt, WORKING); 517 519 } … … 522 524 * whole bunch of things... */ 523 525 524 Log (("VBoxGuest::vbgdNtInit: Returned with rc =0x%x\n", rc));526 LogFlowFunc(("Returned with rc=0x%x\n", rc)); 525 527 return rc; 526 528 } … … 535 537 NTSTATUS vbgdNtCleanup(PDEVICE_OBJECT pDevObj) 536 538 { 537 Log (("VBoxGuest::vbgdNtCleanup\n"));539 LogFlowFuncEnter(); 538 540 539 541 PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension; … … 566 568 vbgdNtUnmapVMMDevMemory(pDevExt); 567 569 } 570 568 571 return STATUS_SUCCESS; 569 572 } … … 577 580 static void vbgdNtUnload(PDRIVER_OBJECT pDrvObj) 578 581 { 579 Log(("VBoxGuest::vbgdNtGuestUnload\n")); 582 LogFlowFuncEnter(); 583 580 584 #ifdef TARGET_NT4 581 585 vbgdNtCleanup(pDrvObj->DeviceObject); … … 600 604 #endif /* !TARGET_NT4 */ 601 605 602 Log (("VBoxGuest::vbgdNtGuestUnload: returning\n"));606 LogFlowFunc(("Returning\n")); 603 607 } 604 608 … … 621 625 if (pDevExt->devState != WORKING) 622 626 { 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)); 624 628 rc = STATUS_UNSUCCESSFUL; 625 629 } … … 630 634 * (But this is possible.) 631 635 */ 632 Log (("VBoxGuest::vbgdNtGuestCreate:Uhm, we're not a directory!\n"));636 LogFlowFunc(("Uhm, we're not a directory!\n")); 633 637 rc = STATUS_NOT_A_DIRECTORY; 634 638 } … … 638 642 if (pFileObj) 639 643 { 640 Log(("VBoxGuest::vbgdNtGuestCreate: File object type = %d\n", 641 pFileObj->Type)); 644 LogFlowFunc(("File object type=%d\n", pFileObj->Type)); 642 645 643 646 int vrc; … … 667 670 IoCompleteRequest(pIrp, IO_NO_INCREMENT); 668 671 669 Log (("VBoxGuest::vbgdNtGuestCreate: Returning0x%x\n", rc));672 LogFlowFunc(("Returning rc=0x%x\n", rc)); 670 673 return rc; 671 674 } … … 684 687 PFILE_OBJECT pFileObj = pStack->FileObject; 685 688 686 Log (("VBoxGuest::vbgdNtGuestClose: pDevExt=0x%p pFileObj=0x%pFsContext=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)); 688 691 689 692 #ifdef VBOX_WITH_HGCM … … 726 729 pSession = (PVBOXGUESTSESSION)pFileObj->FsContext; 727 730 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)); 730 733 731 734 /* We don't have a session associated with the file object? So this seems … … 735 738 if (pSession == NULL) 736 739 { 737 Log (("VBoxGuest::vbgdNtIOCtl:Using kernel session data ...\n"));740 LogFlowFunc(("Using kernel session data ...\n")); 738 741 pSession = pDevExt->pKernelSession; 739 742 } … … 749 752 case VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION: 750 753 { 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")); 753 756 if (!pDevExt->fVRDPEnabled) 754 757 { … … 756 759 757 760 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)); 760 763 pDevExt->ulOldActiveConsoleId = pSharedUserData->ActiveConsoleId; 761 764 pSharedUserData->ActiveConsoleId = 2; … … 766 769 case VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION: 767 770 { 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")); 770 773 if (pDevExt->fVRDPEnabled) 771 774 { … … 773 776 774 777 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)); 777 780 pSharedUserData->ActiveConsoleId = pDevExt->ulOldActiveConsoleId; 778 781 pDevExt->ulOldActiveConsoleId = 0; … … 792 795 int vrc = VBoxGuestCommonIOCtl(uCmd, &pDevExt->Core, pSession, pBuf, cbData, &cbDataReturned); 793 796 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)); 796 799 797 800 if (RT_SUCCESS(vrc)) … … 799 802 if (RT_UNLIKELY(cbDataReturned > cbData)) 800 803 { 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)); 802 805 cbDataReturned = cbData; 803 806 Status = STATUS_BUFFER_TOO_SMALL; … … 825 828 IoCompleteRequest(pIrp, IO_NO_INCREMENT); 826 829 827 //Log (("VBoxGuest::vbgdNtGuestDeviceControl: returned cbOut=%d rc=%#x\n", cbOut, Status));830 //LogFlowFunc(("Returned cbOut=%d rc=%#x\n", cbOut, Status)); 828 831 return Status; 829 832 } … … 904 907 PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension; 905 908 906 Log (("VBoxGuest::vbgdNtGuestSystemControl\n"));909 LogFlowFuncEnter(); 907 910 908 911 /* Always pass it on to the next driver. */ … … 924 927 PVBOXGUESTDEVEXTWIN pDevExt = (PVBOXGUESTDEVEXTWIN)pDevObj->DeviceExtension; 925 928 926 Log (("VBoxGuest::vbgdNtGuestShutdown\n"));929 LogFlowFuncEnter(); 927 930 928 931 VMMDevPowerStateRequest *pReq = pDevExt->pPowerStateRequest; … … 934 937 int rc = VbglGRPerform(&pReq->header); 935 938 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 941 942 return STATUS_SUCCESS; 942 943 } … … 952 953 NTSTATUS vbgdNtNotSupportedStub(PDEVICE_OBJECT pDevObj, PIRP pIrp) 953 954 { 954 Log (("VBoxGuest::vbgdNtGuestNotSupportedStub\n"));955 LogFlowFuncEnter(); 955 956 956 957 pIrp->IoStatus.Information = 0; … … 973 974 { 974 975 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. */ 978 981 if (ASMAtomicXchgU32(&pDevExt->Core.u32MousePosChangedSeq, 0)) 979 982 { … … 1008 1011 return FALSE; 1009 1012 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));*/ 1012 1015 1013 1016 /* Enter the common ISR routine and do the actual work. */ … … 1018 1021 if (fIRQTaken) 1019 1022 { 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 1025 1033 IoRequestDpc(pDevExt->pDeviceObject, pDevExt->pCurrentIrp, NULL); 1026 1034 } … … 1089 1097 { 1090 1098 /* 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)); 1093 1101 1094 1102 NTSTATUS rc = STATUS_SUCCESS; … … 1107 1115 if (rangeCount < PCI_TYPE0_ADDRESSES) 1108 1116 { 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)); 1113 1121 1114 1122 /* Save the IO port base. */ … … 1123 1131 pBaseAddress->ResourceMapped = FALSE; 1124 1132 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)); 1129 1137 1130 1138 /* Next item ... */ … … 1136 1144 case CmResourceTypeInterrupt: 1137 1145 { 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)); 1142 1150 1143 1151 /* Save information. */ … … 1159 1167 if (rangeCount < PCI_TYPE0_ADDRESSES) 1160 1168 { 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)); 1165 1173 1166 1174 /* We only care about read/write memory. */ … … 1179 1187 pBaseAddress->ResourceMapped = FALSE; 1180 1188 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)); 1185 1193 1186 1194 /* Next item ... */ … … 1188 1196 } 1189 1197 else 1190 { 1191 Log(("VBoxGuest::vbgdNtScanPCIResourceList: Ignoring memory: Flags = %08x\n", 1192 pPartialData->Flags)); 1193 } 1198 LogFlowFunc(("Ignoring memory: Flags=%08x\n", pPartialData->Flags)); 1194 1199 } 1195 1200 break; … … 1198 1203 default: 1199 1204 { 1200 Log (("VBoxGuest::vbgdNtScanPCIResourceList: Unhandled resource found, type =%d\n", pPartialData->Type));1205 LogFlowFunc(("Unhandled resource found, type=%d\n", pPartialData->Type)); 1201 1206 break; 1202 1207 } … … 1232 1237 { 1233 1238 VMMDevMemory *pVMMDevMemory = (VMMDevMemory *)MmMapIoSpace(PhysAddr, cbToMap, MmNonCached); 1234 Log (("VBoxGuest::vbgdNtMapVMMDevMemory:pVMMDevMemory = 0x%x\n", pVMMDevMemory));1239 LogFlowFunc(("pVMMDevMemory = 0x%x\n", pVMMDevMemory)); 1235 1240 if (pVMMDevMemory) 1236 1241 { 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)); 1239 1244 1240 1245 /* Check version of the structure; do we have the right memory version? */ … … 1246 1251 *pcbMMIO = pVMMDevMemory->u32Size; 1247 1252 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)); 1250 1255 } 1251 1256 else 1252 1257 { 1253 1258 /* 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 1255 1261 vbgdNtUnmapVMMDevMemory(pDevExt); 1256 1262 rc = STATUS_UNSUCCESSFUL; … … 1271 1277 void vbgdNtUnmapVMMDevMemory(PVBOXGUESTDEVEXTWIN pDevExt) 1272 1278 { 1273 Log (("VBoxGuest::vbgdNtUnmapVMMDevMemory:pVMMDevMemory = 0x%x\n", pDevExt->Core.pVMMDevMemory));1279 LogFlowFunc(("pVMMDevMemory = 0x%x\n", pDevExt->Core.pVMMDevMemory)); 1274 1280 if (pDevExt->Core.pVMMDevMemory) 1275 1281 { … … 1353 1359 1354 1360 #ifdef DEBUG 1355 1356 1361 /** 1357 1362 * A quick implementation of AtomicTestAndClear for uint32_t and multiple bits. … … 1402 1407 vbgdNtTestAtomicTestAndClearBitsU32(0x22, 0x23, 0x22); 1403 1408 } 1404 1405 1409 #endif /* DEBUG */ 1406 1410 … … 1551 1555 return VINF_SUCCESS; 1552 1556 } 1553 1554 1557 #endif /* VBOX_WITH_DPC_LATENCY_CHECKER */ 1555 1558
Note:
See TracChangeset
for help on using the changeset viewer.