Changeset 26290 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 5, 2010 2:27:19 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57359
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r26289 r26290 1392 1392 } 1393 1393 1394 case VMMDevReq_GetStatisticsChangeRequest:1395 {1396 Log(("VMMDevReq_GetStatisticsChangeRequest\n"));1397 if (pRequestHeader->size != sizeof(VMMDevGetStatisticsChangeRequest))1398 {1399 AssertFailed();1400 pRequestHeader->rc = VERR_INVALID_PARAMETER;1401 }1402 else1403 {1404 VMMDevGetStatisticsChangeRequest *statIntervalChangeRequest = (VMMDevGetStatisticsChangeRequest*)pRequestHeader;1405 /* just pass on the information */1406 Log(("VMMDev: returning statistics interval %d seconds\n", pThis->u32StatIntervalSize));1407 statIntervalChangeRequest->u32StatInterval = pThis->u32StatIntervalSize;1408 1409 if (statIntervalChangeRequest->eventAck == VMMDEV_EVENT_STATISTICS_INTERVAL_CHANGE_REQUEST)1410 {1411 /* Remember which mode the client has queried. */1412 pThis->u32LastStatIntervalSize= pThis->u32StatIntervalSize;1413 }1414 1415 pRequestHeader->rc = VINF_SUCCESS;1416 }1417 break;1418 }1419 1420 1394 case VMMDevReq_ReportGuestStats: 1421 1395 { … … 2069 2043 } 2070 2044 2071 static DECLCALLBACK(int) vmmdevSetStatisticsInterval(PPDMIVMMDEVPORT pInterface, uint32_t ulStatInterval)2072 {2073 VMMDevState *pThis = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);2074 PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);2075 2076 /* Verify that the new resolution is different and that guest does not yet know about it. */2077 bool fSame = (pThis->u32LastStatIntervalSize == ulStatInterval);2078 2079 Log(("vmmdevSetStatisticsInterval: old=%d. new=%d\n", pThis->u32LastStatIntervalSize, ulStatInterval));2080 2081 if (!fSame)2082 {2083 /* we could validate the information here but hey, the guest can do that as well! */2084 pThis->u32StatIntervalSize = ulStatInterval;2085 2086 /* IRQ so the guest knows what's going on */2087 VMMDevNotifyGuest (pThis, VMMDEV_EVENT_STATISTICS_INTERVAL_CHANGE_REQUEST);2088 }2089 2090 PDMCritSectLeave(&pThis->CritSect);2091 return VINF_SUCCESS;2092 }2093 2094 2045 2095 2046 static DECLCALLBACK(int) vmmdevSetCredentials(PPDMIVMMDEVPORT pInterface, const char *pszUsername, … … 2479 2430 /* disabled memory ballooning */ 2480 2431 pThis->u32LastMemoryBalloonSize = 0; 2481 2482 /* disabled statistics updating */2483 pThis->u32LastStatIntervalSize = 0;2484 2432 2485 2433 /* Clear the "HGCM event enabled" flag so the event can be automatically reenabled. */ … … 2593 2541 pThis->IPort.pfnRequestSeamlessChange = vmmdevRequestSeamlessChange; 2594 2542 pThis->IPort.pfnSetMemoryBalloon = vmmdevSetMemoryBalloon; 2595 pThis->IPort.pfnSetStatisticsInterval = vmmdevSetStatisticsInterval;2596 2543 pThis->IPort.pfnVRDPChange = vmmdevVRDPChange; 2597 2544 pThis->IPort.pfnCpuHotUnplug = vmmdevCpuHotUnplug;
Note:
See TracChangeset
for help on using the changeset viewer.